Accept Payments Testing

Request Headers

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)

Request for SDKLess PhonePe Intent

{   
    "merchantId": "MERCHANTUAT", // String Mandatory
    "transactionId": "e3e1mmcccdmm9ef8vdfmd7b", // String Mandatory
    "merchantUserId": "unknown8898", // String Mandatory - used for auto login.
    "amount": 200, // long Mandatory - amount should be in paise
    "merchantOrderId": "OD139924923", // String Mandatory
    "subMerchantId": "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": "[email protected]", // 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
    }
}

// transactionId length should be less than 38 characters. 
// merchantOrderId length should be less than 48 characters.
{
    "request": "eyAgIAogICAgIm1lcmNoYW50SWQiOiAiTUVSQ0hBTlRVQVQiLAogICAgInRyYW5zYWN0aW9uSWQiOiAiZTNlMW1tY2NjZG1tOWVmOHZkZm1kN2IiLAogICAgIm1lcmNoYW50VXNlcklkIjogInVua25vd244ODk4IiwKICAgICJhbW91bnQiOiAyMDAsCiAgICAibWVyY2hhbnRPcmRlcklkIjogIk9EMTM5OTI0OTIzIiwKICAgICJzdWJNZXJjaGFudElkIjogInVua25vd244ODk4IiwKICAgICJtb2JpbGVOdW1iZXIiOiAidW5rbm93bjg4OTgiLAogICAgIm1lc3NhZ2UiOiAiUGF5bWVudCB0b3dhcmRzIG9yZGVyIE5vLiBPRDEzOTkyNDkyMy4iLAogICAgImVtYWlsIjogInRlc3RAZ21haWwuY29tIiwKICAgICJzaG9ydE5hbWUiOiAiT0QxMzk5MjQ5MjMiLAogICAgInBheW1lbnRTY29wZSI6ICJQSE9ORVBFIiwKICAgICJkZXZpY2VDb250ZXh0Ijp7CiAgICAgICAgInBob25lUGVWZXJzaW9uQ29kZSI6IDMwMzM5MQogICAgfQp9Cg==" 
}

Request for SDKLess Open Intent

🚧

transactionId - Parameter for Open Intent

● Should be less than 36 characters
● Should be Alphanumeric only (No special characters allowed including dash & underscore)

{   
    "merchantId": "MERCHANTUAT", // String Mandatory
    "transactionId": "e3e1mmcccdmm9ef8vdfmd7b", // String Mandatory
    "merchantUserId": "user1234", // String Mandatory - used for auto login.
    "amount": 200, // long Mandatory - amount should be in paise
    "merchantOrderId": "OD139924923", // String Mandatory
    "subMerchantId": "DemoMerchant", // String - ONLY if sub merchant id is allocated to you 
    "mobileNumber": "999999999", // String - mobile number of the user
    "message": "Payment towards order No. OD139924923.", // String - message will be displayed on completion of payment.
    "email": "[email protected]", // String - email id of the user.
    "shortName": "OD139924923", // String - user name is pre filled for registration purpose.
    "paymentScope": "ALL_UPI_APPS", // String Mandatory - value should be ALL_UPI_APPS only
    "openIntentWithApp": "<<packageName>>" // String Mandatory - value should be the package name of the app user trying to make payment.

}

// transactionId length should be less than 36 characters. 
// merchantOrderId length should be less than 48 characters.
{
    "request": "eyAgIAogICAgIm1lcmNoYW50SWQiOiAiTUVSQ0hBTlRVQVQiLAogICAgInRyYW5zYWN0aW9uSWQiOiAiZTNlMW1tY2NjZG1tOWVmOHZkZm1kN2IiLAogICAgIm1lcmNoYW50VXNlcklkIjogInVzZXIxMjM0IiwKICAgICJhbW91bnQiOiAyMDAsCiAgICAibWVyY2hhbnRPcmRlcklkIjogIk9EMTM5OTI0OTIzIiwKICAgICJzdWJNZXJjaGFudElkIjogIkRlbW9NZXJjaGFudCIsCiAgICAibW9iaWxlTnVtYmVyIjogIjk5OTk5OTk5OSIsCiAgICAibWVzc2FnZSI6ICJQYXltZW50IHRvd2FyZHMgb3JkZXIgTm8uIE9EMTM5OTI0OTIzLiIsCiAgICAiZW1haWwiOiAidGVzdEBnbWFpbC5jb20iLAogICAgInNob3J0TmFtZSI6ICJPRDEzOTkyNDkyMyIsCiAgICAicGF5bWVudFNjb3BlIjogIkFMTF9VUElfQVBQUyIsCiAgICAib3BlbkludGVudFdpdGhBcHAiOiAiPDxwYWNrYWdlTmFtZT4+Igp9Cg=="
}

Request Parameters

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 PhonePe transactionId length should be less than
● 38 characters - PhonePe Intent.
● 36 characters & should be Alphanumeric only - Open Intent.

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 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.

amount

LONG

Transaction amount in Paise

Yes

merchantOrderId

STRING

OrderID generated by the merchant
merchantOrderId length should be less than 48 characters.

Yes

subMerchantId

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" - For PhonePe Intent
● "ALL_UPI_APPS" - For Open Intent

Yes

deviceContext

OBJECT

PhonePe Version Code
Mandatory if paymentScope is PHONEPE

Yes

Response Parameters

Parameter Name

Type

Description

success

BOOLEAN

Success status of the request

code

ENUM

See list of response codes below

Language
Click Try It! to start a request and see the response here!