HTTP Headers (Standard)
TSP HTTP Headers of Initiate Payment API
You must include the following headers in all API requests to the Initiate Payment API (checkout/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 |
| X-SOURCE-REDIRECTION-TYPE | Type of Redirection. PARTNER_REDIRECTION → User is redirected to PhonePe pay page from Partner’s website MERCHANT_REDIRECTION → User is redirected to PhonePe pay page from merchant website | Allowed Values: • PARTNER_REDIRECTION • MERCHANT_REDIRECTION Default Value = MERCHANT_REDIRECTION |
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 • X-SOURCE-REDIRECTION-TYPE |
| 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 |
| X-SOURCE-REDIRECTION-TYPE | PARTNER_REDIRECTION/MERCHANT_REDIRECTION |
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
- 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 smooth and secure communication between your platform and PhonePe, it is important to include the required HTTP headers in every API call. The headers vary slightly based on the integration channel such as web, Android, or iOS and must be set appropriately for each environment. Following the specified structure for both the Initiate Payment API and other related APIs like Order Status, Refund, and Refund Status helps ensure reliable processing, better traceability, and faster issue resolution.