UAT Simulator

What is Merchant Simulator?
The merchant simulator 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 Merchant Simulator

  • Even when the PhonePe UAT server is down, the Merchant simulator gives you a seamless user experience through which you will be able to test the end-to-end payment flow without any interruptions.

Postman Collection and Setup

  • Download the PhonePe Simulator postman collection from here.
  • Once downloaded, import the collection to your Postman.

Quick Links

Steps for Standard Checkout Page

Follow the below steps to verify different payment methods on the Standard Checkout page.

  • Update the Host URL of UAT Simulator for PG PAY and PG Check Status API:

👍

Host: https://api-preprod.phonepe.com/apis/merchant-simulator

Configure Template

To configure the required template, you can use the "Configure Template" API call.

  • Open the "Configure Template" API.
  • Click on "Pre-request Script"
  • Update the UAT MID received from the PhonePe Integration Team for the variable "merchantId"
  • Update the templateName variable with the template merchant wants to test the flow.

Templates for each type of Payment Method

For Success - "b2bPg_payPage_upiCollect_success"
For Failure - "b2bPg_payPage_upiCollect_failure"
For Pending - "b2bPg_payPage_upiCollect_pending"
For Success - "b2bPg_payPage_qr_success"
For Failure - "b2bPg_payPage_qr_failure"
For Pending - "b2bPg_payPage_qr_pending"
For Success - "b2bPg_payPage_card_success"
For Failure - "b2bPg_payPage_card_failure"
For Pending - "b2bPg_payPage_card_pending"
For Success - "b2bPg_payPage_netBanking_success"
For Failure - "b2bPg_payPage_netBanking_failure"
For Pending - "b2bPg_payPage_netBanking_pending"
For Success - "b2bPg_payPage_mobileIntent_success"
For Failure - "b2bPg_payPage_mobileIntent_failure"
For Pending - "b2bPg_payPage_mobileIntent_pending"

Configure Template API

2718

👍

Example

  • If the merchant wants to test the PG UPI Collect- Pending scenario, the merchant will select "PG - UPI Collect Templates" and take the template corresponding to the Pending error code "b2bPg_payPage_upiCollect_pending".

  • Similarly, for Success - "b2bPg_payPage_upiCollect_success" and for Failure - "b2bPg_payPage_upiCollect_failure"

{
    "message": "b2bPg_payPage_upiCollect_pending template configured for merchant MERCHANTUAT"
}

Once configured, you can make the payment on the Standard Checkout page with the respective payment method.

Get Configured Template

To get the current configured Template, you can use the "Get Configured Template" API call.

Get Configured Template API

2718
{
    "b2bPgFlow": "b2bPg_payPage_upi_pending"
}

For any queries reach out to [email protected]

Test Card Details

"card_number": "4622943126146407", 
"card_type": "DEBIT_CARD", 
"card_issuer": "VISA",
"expiry_month": 12, 
"expiry_year": 2023, 
"cvv": "936"

👍

Note: The OTP to be used on the Bank Page: 123456

Test Net Banking Details

Always use "bankId": "SBIN" for testing purposes in the request payload of PAY API.

Username: test
Password: test
and click "Submit" on the next screen.

🚧

Note: For testing transactions, the lower amount limit is defined as Rs.1/- and the upper amount limit is defined as Rs.1000/-. Please make sure your transaction requests are within these limits.