post https://mercury-uat.phonepe.com/v4/debit##
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(base64 encoded payload + "/v4/debit" + salt key) + ### + salt index |
X- CALLBACK | S2S callback url |
X-CALL-MODE | S2S 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.
Parameter Name | Type | Description | Mandatory |
merchantId | STRING | Unique MerchantID assigned to the merchant by PhonePe | Yes |
transactionId | STRING | Unique TransactionID generated by the merchant to track request to PhonePetransactionId length should be less than 38 characters. | Yes |
merchantUserId | STRING | Unique 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 |
userAuthToken | STRING | Unique userAuthToken given 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. |
amount | LONG | Transaction amount in Paise | Yes |
merchantOrderId | STRING | OrderID generated by the merchantmerchantOrderId length should be less than 48 characters. | Yes |
subMerchant | STRING | Tag to categorize merchant transaction. Skip this field if you don't have multiple merchants tagged under one merchant id. | No |
mobileNumber | STRING | Mobile number of the user | No |
message | STRING | Short message. This message is displayed to the user on completion of payment. | No |
email | STRING | Email address of the user | No |
shortName | STRING | User's name pre-filled for registration purpose. | No |
paymentScope | STRING | Value should be "PHONEPE" | Yes |
deviceContext | OBJECT | PhonePe version code | Yes |
merchantContext | OBJECT | Refer Deep Offer API | No |
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | Success status of the request |
code | ENUM | See list of response codes below |