HTTP Headers (Standard)


You must include the following headers in all API requests to the Initiate Payment API (checkout/v2/pay), based on your integration platform.

Header NameDescriptionSample Values
AuthorizationTSP Token O-Bearer eyJ0eXAiOiJKV1QiL
X-MERCHANT-IDEnd merchant’s Merchant Id for which the transaction is being initiated.MID
X-SOURCEType of IntegrationAPI
X-SOURCE-CHANNELChannelandroid, ios, web
X-SOURCE-CHANNEL-VERSIONChannel version
(Android OS
version, iOS version)
11
X-BROWSER-FINGERPRINTBrowserFingerprint8357426ac73fcd60b17355ab7de60421
USER-AGENTA browser that is requesting a websiteMozilla/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-DOMAINMerchant store URL from where they are making a request to TSPEg. https://www.store.com
X-MERCHANT-APP-IDPackage name of Android app / Bundle ID of iOS appcom.abc.pro.www
X-MERCHANT-IPThe IP address of the merchant11.123.123.212
X-SOURCE-REDIRECTION-TYPEType 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
Integration TypeHeaders Required
WebAuthorization
X-MERCHANT-ID
X-SOURCE
X-SOURCE-CHANNEL

X-BROWSER-FINGERPRINT
USER-AGENT
X-MERCHANT-DOMAIN
X-MERCHANT-IP
X-SOURCE-REDIRECTION-TYPE
Android/iOSAuthorization
X-MERCHANT-ID
X-SOURCE
X-SOURCE-CHANNEL
X-SOURCE-CHANNEL-VERSION

X-MERCHANT-APP-ID
X-MERCHANT-IP
Header NameValue
AuthorizationO-Bearer eyJ0eXAiOiJKV1QiL
X-MERCHANT-IDMID
X-SOURCEAPI
X-SOURCE-CHANNELweb
X-BROWSER-FINGERPRINT8357426ac73fcd60b17355ab7de60421
USER-AGENTMozilla/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-DOMAINMerchant store URL from where they are making a request to TSP
X-MERCHANT-IP11.123.123.212
X-SOURCE-REDIRECTION-TYPEPARTNER_REDIRECTION/MERCHANT_REDIRECTION
Header NameValue
AuthorizationO-Bearer eyJ0eXAiOiJKV1QiL
X-MERCHANT-IDMID
X-SOURCEAPI
X-SOURCE-CHANNELandroid
X-SOURCE-CHANNEL-VERSION11
X-MERCHANT-APP-IDcom.abc.pro.www
X-MERCHANT-IP11.123.123.212
Header NameValue
AuthorizationO-Bearer eyJ0eXAiOiJKV1QiL
X-MERCHANT-IDMID
X-SOURCEAPI
X-SOURCE-CHANNELios
X-SOURCE-CHANNEL-VERSION17.1.2
X-MERCHANT-APP-IDcom.abc.pro.www
X-MERCHANT-IP11.123.123.212

The below headers should be passed for the following APIs.

Header NameDescriptionSample Values
AuthorizationTSP Token O-Bearer eyJ0eXAiOiJKV1QiL
X-MERCHANT-IDEnd 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.

Is this article helpful?