UI Callback

  • The Callback is sent to a URL that is passed in X-REDIRECT-URL header along with request.
  • The value of X-REDIRECT-MODE header should be POST to get UI callback.

Form Post Response Payload

Parameter NameDescription
code
Enum
See list of codes.
merchantId
String
merchantId
transactionId
String
Unique Transaction ID
amount
Long
Transaction amount in paise
providerReferenceId
String
PhonePe ReferenceId.
merchantOrderId
String
Merchant Order Id.
param1
String
Optional Parameter, to be used later
param2
String
Optional Parameter, to be used later
param3
String
Optional Parameter, to be used later
param4
String
Optional Parameter, to be used later
param5
String
Optional Parameter, to be used later
param6
String
Optional Parameter, to be used later
param7
String
Optional Parameter, to be used later
param8
String
Optional Parameter, to be used later
param9
String
Optional Parameter, to be used later
param10
String
Optional Parameter, to be used later
param11
String
Optional Parameter, to be used later
param12
String
Optional Parameter, to be used later
param13
String
Optional Parameter, to be used later
param14
String
Optional Parameter, to be used later
param15
String
Optional Parameter, to be used later
param16
String
Optional Parameter, to be used later
param17
String
Optional Parameter, to be used later
param18
String
Optional Parameter, to be used later
param19
String
Optional Parameter, to be used later
param20
String
Optional Parameter, to be used later
checksum
String
The checksum for this entire request

🚧

merchantOrderId in UI Callback Response

The merchantOrderId would be returned only when the merchantOrderId passed in API request is different from the transactionId.

If merchantOrderId is not present in the response:

  • Checksum Calculation: SHA256(code + merchantId + transactionId + amount + providerReferenceId + param1 + param2 +...... + param20 + saltKey).

If merchantOrderId is present in the response:

  • Checksum Calculation: SHA256(code + merchantId + transactionId + amount + providerReferenceId + merchantOrderId + param1 + param2 +...... + param20 + saltKey).

How is checksum computed for a Form POST?

  • The salt we would use will be appended with ### to the checksum value in the checksum attribute. Merchants upon receiving this payload, will look at the salt_index in the checksum attribute after ### delimiter and use the appropriate salt_index to be able to calculate checksum at their end for the said payload. If it doesn't match, then they will need to abort the request.
  • Salts are already pre-shared with the merchant when they are onboarded.
  • If the value of any parameter is null, it will not be included in the calculation of the checksum.

Transaction Status Response Codes

CodeDescription
TRANSACTION_NOT_FOUNDPayment not initiated inside PhonePe
BAD_REQUESTInvalid request
AUTHORIZATION_FAILEDX-VERIFY header is incorrect
INTERNAL_SERVER_ERRORSomething went wrong. Merchant needs to call Check Transaction Status to verify the transaction status.
PAYMENT_SUCCESSPayment is successful
PAYMENT_ERRORPayment failed
PAYMENT_PENDINGPayment is pending. It does not indicate failed payment. Merchant needs to call Check Transaction Status to verify the transaction status.
PAYMENT_DECLINEDPayment declined by user
PAYMENT_CANCELLEDPayment cancelled by the merchant using Cancel API