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

How is checksum computed for a Form POST?

  • The server itself will generate the checksum, by doing a SHA256(code + merchantId + transactionId + amount + providerReferenceId + param1 + param2 +…… + param20 + saltKey).
  • 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 value of any parameter is null, it will not be included in calculation of 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