Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload + "/v4/debit" + salt key) + ### + salt index
X-CALLBACKS2S callback url
X-CALL-MODES2S call mode (POST/ PUT)
{   
    "merchantId": "M2306160483220675579140", // String Mandatory
    "transactionId": "e3e1mmcccdmm9ef8vdfmd7b", // String Mandatory
    "merchantUserId": "unknown8898", // String Mandatory - used for auto login.
    "userAuthToken": "unknown8898", // String Mandatory - used in OTP linking flow.
    "amount": 200, // long Mandatory - amount should be in paise
    "merchantOrderId": "OD139924923", // String Mandatory
    "subMerchant": "unknown8898", // String - ONLY if sub merchant id is allocated to you 
    "mobileNumber": "unknown8898", // String - mobile number of the user
    "message": "Payment towards order No. OD139924923.", // String - message will be displayed on completion of payment.
    "email": "xMerchantId", // String - email id of the user.
    "shortName": "OD139924923", // String - user name is pre filled for registration purpose.
    "paymentScope": "PHONEPE", // String Mandatory - value should be PHONEPE only
    "deviceContext":{  // Object Mandatory
        "phonePeVersionCode": 303391 // Long Mandatory - returns intent URI
    },
    "merchantContext": { // Object - Only if Deep offers is allocated to you.
        "offerContext": {
            "tags ": [{
            "id": "GOLD_CATEGORY", // String Mandatory
            "amount": 200  // String Mandatory 
            }]
        }
    }
}

// transactionId length should be less than 38 characters. 
// merchantOrderId length should be less than 48 characters.

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique MerchantID assigned to the merchant by PhonePeYes
transactionIdSTRINGUnique TransactionID generated by the merchant to track request to PhonePe
transactionId length should be less than 38 characters.
Yes
merchantUserIdSTRINGUnique UserID generated by merchant. This is used to pre-login users authenticated on PhonePe. Un-authenticated users are redirected to PhonePe login page. Conversions are higher when this is provided. Avoid passing email/mobile number.
Skip this for guest users.
Note:
Yes
userAuthTokenSTRINGUnique userAuthTokengiven to merchant in OTP flow. This is used to pre-login users authenticated on PhonePe. If not passed users will be redirected to PhonePe login page.
Note
Only for OTP linking flow.
amountLONGTransaction amount in PaiseYes
merchantOrderIdSTRINGOrderID generated by the merchant
merchantOrderId length should be less than 48 characters.
Yes
subMerchantSTRINGTag to categorize merchant transaction.
Skip this field if you don't have multiple merchants tagged under one merchant id.
No
mobileNumber
STRINGMobile number of the userNo
messageSTRINGShort message. This message is displayed to the user on completion of payment.No
emailSTRINGEmail address of the userNo
shortNameSTRINGUser's name pre-filled for registration purpose.No
paymentScopeSTRINGValue should be "PHONEPE"Yes
deviceContextOBJECTPhonePe version codeYes
merchantContextOBJECTRefer Deep Offer APINo

Response Parameters

Parameter NameTypeDescription
successBOOLEANSuccess status of the request
codeENUMSee list of response codes below
Language
Click Try It! to start a request and see the response here!