**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 Custom Checkout Page](🔗)

    • [Web-Based Flows](🔗)

    • [Android/iOS Intent Based Flow](🔗)

  • [Configure Template](🔗)

  • [Templates for each type of Payment Method](🔗)

  • [Get Configured Template](🔗)

  • [Test Card Details](🔗)

  • [Test Net Banking Details](🔗)

## Steps for Custom Checkout Page

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

### Web-Based Flows

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

**Host**: [https://api-preprod.phonepe.com/apis/merchant-simulator](🔗)

### Android/iOS Intent Based Flow

  • Download and install the Simulator PhonePe Android/iOS App using the Firebase. **Share the Email Id with integration team [[email protected]] to send the invite via Firebase.**

<!-- Download and install the Simulator PhonePe App on an android mobile device. APK can be downloaded from [here](https://docs.phonepe.com/public/yp0iw4UBc_SpDb09We7u). https://docs.phonepe.com/public/mCY6eoQBGj1px-63kmEI -->

  • Merchant would need to specify that the merchant app wants to use the PhonePe Simulator, add the below lines in <application> tag of AndroidManifest.xml file.


\<meta-data android:name="com.phonepe.android.sdk.isSimulator" android:value="true" /\>

  • For the **UPI_INTENT** flow, the package name of the simulator is **com.phonepe.simulator**.

UAT Simulator is supported from Android SDK Version: 1.7.1

## 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

### **Configure Template API**



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

  • Similarly, for Success - "b2bPg_custom_upiIntent_success" and for Failure - "b2bPg_custom_upiIntent_failure"

Once configured, you can make the payment on the Custom 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**


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.