Setting Up the Sandbox
Unless stated otherwise, all sandbox configuration steps mirror the production setup. The sections below document only the parameters that differ in the sandbox environment.
Obtaining Sandbox Credentials
To test in the sandbox, you will need a sandbox account and the corresponding credentials. Follow these steps:
- Log in to the sandbox portal at https://paymentssandbox.zoho.in using your Zoho account.
- Navigate to Settings and then Account Details to get your Account ID.
- Register your application in the Zoho Developer Console to obtain a sandbox Client ID and Client Secret. Use these credentials when generating sandbox OAuth tokens.
Once done, you can proceed to configure OAuth for the Sandbox.
OAuth Configuration
OAuth configuration for the sandbox differs from production in just two parameters: the SOID and scope prefix. All other OAuth parameters remain unchanged from the live OAuth configuration.
When generating the authorization URL for the sandbox, update the following parameters in Step 2 of the OAuth flow to scope the authorization URL and generated tokens to your sandbox account.
1. SOID Parameter
Set the soid parameter using the sandbox prefix: zohopaysandbox.{account\_id}
ZohoPaySandbox.payments.CREATE
2. Scope Prefix
When specifying scopes, use the sandbox scope prefix: ZohoPaySandbox
ZohoPaySandbox.payments.CREATE
https://accounts.zoho.in/oauth/v2/org/auth?
scope=ZohoPaySandbox.payments.CREATE,ZohoPaySandbox.payments.READ,ZohoPaySandbox.payments.UPDATE
&client_id=1005xxxxxxxxxxxxxxxxxxxxxxxxx
&soid=zohopaysandbox.8xxxxxxxx3
&state=To generate payments access token
&response_type=code
&redirect_uri=https://www.zylker.com/
&access_type=offline
Web Integration
When testing the payment widget in the sandbox, enable test mode by setting the following parameter during initialization. All other integration steps remain the same as in the production widget documentation.
When testing the payment widget in the sandbox, you can simulate payment flows and verify integration, ensuring all interactions, callbacks, and events are handled safely.
Ensure the following parameter is set to enable sandbox mode: otherOptions.is_test_mode = true
Mobile Integration
To test payments using the mobile SDKs, configure the environment to sandbox during initialization. This ensures all API calls, payment sessions, and events are routed through the test environment, allowing you to safely validate your integration without processing real transactions. All other SDK integration steps remain the same as in the production setup.
iOS SDK
- Minimum Version: 1.0.1+
- Specify the sandbox environment during initialization.
- Embed the native iOS SDK to integrate payments into your iOS app using SwiftUI or UIKit. Refer to the iOS developer doc for more details.
- Repository: GitHub - zpayments-ios-sdk
widget = ZohoPaymentsCheckout(
apiKey: Secrets.apiKey,
accountId: Secrets.accId,
domain: .IN,
environment: .sandbox,
withCheckoutDelegate: self
)
`environment: .live`
Android SDK
- Minimum Version: 1.0.2
- Set the environment parameter to
ZohoPaymentsEnvironment.sandboxduring initialization: - Add the Zoho Payments Android SDK to your project and app build.gradle files. Refer to the Android developer doc for more details.
CheckoutSDK.showCheckout(
this,
options,
ZohoPayDomain.IN,
environment = ZohoPaymentsEnvironment.sandbox,
object : ZohoPayCheckoutCallback {
override fun onPaymentSuccess(paymentId: String, signature: String) {
// Handle success
}
override fun onPaymentFailure(error: String) {
// Handle failure
}
}
)
`ZohoPaymentsEnvironment.live`