What is UAT Sandbox?
The UAT Sandbox is used to simulate the end-to-end payment flows for online merchants. A template is a mapping of APIs and their mock responses using which merchants can simulate the scenarios like Success, Failure, and Pending.
Benefits of using the UAT Sandbox
- Even when the PhonePe UAT server is down, the UAT Sandbox gives you a seamless user experience through which you will be able to test the end-to-end payment flow without any interruptions.
Sequence
Steps for Autopay – UPI
Follow the below steps to verify different payment methods on the Custom Checkout page.
- Update the Host URL of the UAT Sandbox:
Host: https://api-preprod.phonepe.com/apis/pg-sandbox
Android/iOS Test App
Download and install the PhonePe Test app to verify the flows in UAT.
- Android – Download from here [Package Name: com.phonepe.simulator]
- iOS – Share the Email ID with the PhonePe Integration Team on the integration thread to send the invite via Firebase.
Test App Setup
- Click on “Settings” and configure the “VPA for Collect” like @ybl that can be used for testing the UPI Collect Flow.
Once the collect request is raised, then click on “Fetch Collect” to see the collect request in the PhonePe Test app and click “Pay” to complete the transaction. - Click on “Test Case Templates” to configure the Success, Failure, or Pending templates to receive the response accordingly.
Note: Make sure to set the template before starting the API testing. - Once the Subscription is set up using UPI Intent or Collect flow, then the subscriptions will be visible once you click the “Subscriptions” button. For each Subscription, you will be able to see the option to Pause/UnPause/Revoke.
- Share the Callback/Webhook URL with the Integration team to configure the Static Callback URL for Pause/UnPause/Revoke features.
Configure Template
Download the Demo Video – Here
To configure the required template,
- Open the PhonePe UAT Test App- Select the “Test Case Templates” button.
- Enter the “Merchant ID” and click “GET CONFIGURED TEMPLATES”
- Enter the “Merchant ID” and click “GET CONFIGURED TEMPLATES” to fetch the current templates if already set. Else, you will get “No Template Configured”
- For AutoPay Integration – use the “Flow: Subscription V2” to configure the required template for Success, Failure, or Pending scenarios
Make sure to set the right templates for the Subscription integration.
Templates
For Success - "Setup success via UPI Intent"
For Failure - "Setup failure via UPI Intent"
For Success - "Setup success via UPI Collect"
For Failure - "Setup failed via UPI Collect"
For Success - "Setup, notify & redemption success with merchant controlled retries"
For Success (Auto Debit - True) - "Setup, notify & redemption success with PhonePe retries auto debit true"
For Success (Auto Debit - False) - "Setup, notify & redemption success with PhonePe retries auto debit false"
For Redemption Failure - "Setup, notify success & redemption failure with PhonePe retries auto debit false"
For Redemption Failure - "Setup, notify success & redemption failure with merchant controlled retries"
For Notification Failure - "Setup success & notify failure"
For Redemption Failure - "Redemption failure with PhonePe retries & auto debit true"