Skip to main content
Build and safely test your Embedded Payment Gateway Integration in our Sandbox (‘Test’) Environment developed exclusively for Embedded Payments Partners. Our aim is to streamline the integration process for developers seeking to incorporate our Payments and/or Onboarding APIs and Webhooks into their software platforms. This dedicated testing environment provides you with a robust space to experiment, simulate, and code our development solutions within your platforms. Use the sandbox environment to test and validate your API and webhook integrations before going live in production.

Advantages

  • Safe Testing: You can conduct thorough testing without affecting real transactions. This safeguards your live environment while refining payment flows.
  • Realistic Simulations: You can mimic real-world scenarios with our realistic simulations. You can as well test various payment methods, edge cases, and user interactions effortlessly.
  • Enhanced Debugging: You can diagnose and troubleshoot issues effectively with detailed error reporting. Identify and resolve potential challenges before you impact your live users.

How to simulate working environment in sandbox?

To begin with, login to your Partner Dashboard > and click the Switch to Test option. The dashboard will switch to the Test Environment (sandbox). There will be a visible label at the top to let you identify that you are in the Test Environment. When you are in the test environment, the “Switch to Test” button will change to “Switch to Prod”. You can use it to switch back to the live environment. In the test environment, you can simulate essential features of the payment gateway. You can replicate and test the functionalities required for the payment gateway system to operate seamlessly. You can add new merchants from the Merchants section through the Add Merchant option. The system enables the added merchant in the test environment with the payment gateway activated and default pricing.
Only Business Name, Registered Email and Phone Number are mandatory when adding a merchant in the test environment. You can then select the checkbox “I agree to the terms and conditions” and submit the form.
This activation takes up to 5 mins. Refresh the Merchants tab to recheck the activation status.
Please note that KYC is required for activating merchants in the live environment.
You can access the Developers tab, and generate Partner API Key and configure Partner Webhooks as well. Once done, you can follow integration steps mentioned in the Embedded Payment Gateway Integration guide. To access your test API keys directly, go to Partner Dashboard > Developers > API Keys (test environment). Sample request to Create an Order -
curl
Sample request to Get Order details -
curl
Apart from this, you can simulate payments using payments methods such as Card, UPI, and other payment modes that are part of the integration. Other features like Summary, PG Orders, Reports will also work in Test Environment
The data between Live and Test environments is completely isolated. Any data changes (eg. merchant addition, order creation etc.) in this environment will not happen in Live, and vice versa. These are not live transactions, these are just simulations. No fund movement will occur.

Partner webhooks

You can also configure webhooks in the test environment. To configure partner webhook,
  1. Go to Partner Dashboard > Developers > Webhooks.
  1. Click Add Webhook URL and enter the URL where you want to receive the updates.
  2. Select the events for which you want to configure the webhooks to receive updates, and click Add Webhook.
Notifications will be sent to your configured endpoint as a POST request with the body containing the various parameters specifying the details of each event. Each request contains an event parameter that identifies its type. We support webhooks in both encoded and JSON formats.

Payment success webhook

A payment success webhook notifies you when a payment completes successfully. Use this event to update the payment status, trigger fulfilment, and send a confirmation to the customer.
Sample payload

Payment failed webhook

A payment failed webhook notifies you when a payment attempt fails and Cashfree receives a failure response from the bank. Use this event to record the failed attempt, notify the customer, and allow them to retry the payment.
Sample payload

Payment user dropped webhook

A payment user dropped webhook notifies you when a customer abandons the payment flow before completing it. For example, the customer may leave the bank’s OTP page without entering the OTP or open a UPI app without entering the UPI PIN. Use this event to track incomplete payment attempts.
Sample payload
Partner payment webhooks use the same payload structure as merchant payment webhooks for the corresponding event and webhook version, with one additional top-level object: merchant. Its merchant_id field identifies the merchant associated with the payment, so you can route each event to the correct merchant in your platform.