TSP HTTP Headers (V2 Custom)
TSP HTTP Headers of Initiate Payment API
You must include the following headers in all API requests to the Initiate Payment API (pg/v2/pay), based on your integration platform.
| Header Name | Description | Sample Values |
| Authorization | TSP Token | O-Bearer eyJ0eXAiOiJKV1QiL |
| X-MERCHANT-ID | End merchant’s Merchant Id for which the transaction is being initiated. | MID |
| X-SOURCE | Type of Integration | API |
| X-SOURCE-CHANNEL | Channel | android, ios, web |
| X-SOURCE-CHANNEL-VERSION | Channel version (Android OS version, iOS version) | 11 |
| X-BROWSER-FINGERPRINT | BrowserFingerprint | 8357426ac73fcd60b17355ab7de60421 |
| USER-AGENT | A browser that is requesting a website | Mozilla/5.0 (Linux; Android 13; I2203 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.61.150 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/441.0.0.32.109;] |
| X-MERCHANT-DOMAIN | Merchant store URL from where they are making a request to TSP | Eg. https://www.store.com |
| X-MERCHANT-APP-ID | Package name of Android app / Bundle ID of iOS app | com.abc.pro.www |
| X-MERCHANT-IP | The IP address of the merchant | 11.123.123.212 |
Required Headers w.r.t. Integration
| Integration Type | Headers Required |
| Web | • Authorization • X-MERCHANT-ID • X-SOURCE • X-SOURCE-CHANNEL • X-BROWSER-FINGERPRINT • USER-AGENT • X-MERCHANT-DOMAIN • X-MERCHANT-IP |
| Android/iOS | • Authorization • X-MERCHANT-ID • X-SOURCE • X-SOURCE-CHANNEL • X-SOURCE-CHANNEL-VERSION • X-MERCHANT-APP-ID • X-MERCHANT-IP |
Sample Headers for TSP (Web)
| Header Name | Value |
| Authorization | O-Bearer eyJ0eXAiOiJKV1QiL |
| X-MERCHANT-ID | MID |
| X-SOURCE | API |
| X-SOURCE-CHANNEL | web |
| X-BROWSER-FINGERPRINT | 8357426ac73fcd60b17355ab7de60421 |
| USER-AGENT | Mozilla/5.0 (Linux; Android 13; I2203 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.61.150 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/441.0.0.32.109;] |
| X-MERCHANT-DOMAIN | Merchant store URL from where they are making a request to TSP |
| X-MERCHANT-IP | 11.123.123.212 |
Sample Headers for TSP (Android)
| Header Name | Value |
| Authorization | O-Bearer eyJ0eXAiOiJKV1QiL |
| X-MERCHANT-ID | MID |
| X-SOURCE | API |
| X-SOURCE-CHANNEL | android |
| X-SOURCE-CHANNEL-VERSION | 11 |
| X-MERCHANT-APP-ID | com.abc.pro.www |
| X-MERCHANT-IP | 11.123.123.212 |
Sample Headers for TSP (iOS)
| Header Name | Value |
| Authorization | O-Bearer eyJ0eXAiOiJKV1QiL |
| X-MERCHANT-ID | MID |
| X-SOURCE | API |
| X-SOURCE-CHANNEL | ios |
| X-SOURCE-CHANNEL-VERSION | 17.1.2 |
| X-MERCHANT-APP-ID | com.abc.pro.www |
| X-MERCHANT-IP | 11.123.123.212 |
TSP HTTP Headers For Other APIs
The below headers should be passed for the following APIs.
- Order Status API
- Refund API
- Refund Status API
- UPI Address Validate API
- Get Split Account Info
- Split Validation
- Settlement – Date Range Based Settlement IDs
- Settlement Status
| Header Name | Description | Sample Values |
| Authorization | TSP Token | O-Bearer eyJ0eXAiOiJKV1QiL |
| X-MERCHANT-ID | End merchant’s Merchant Id for which the transaction is being initiated. | MID |
To ensure successful communication with PhonePe’s systems, it is important to include the required HTTP headers across all API calls. The headers differ slightly based on the platform and type of integration, such as web, Android, or iOS. These headers help identify the merchant, determine the request source, and maintain transaction traceability. By following the header requirements outlined for Initiate Payment API and other APIs like Order Status, Refund, and UPI Address Validate, you enable secure, accurate, and seamless processing of payments and related operations.