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 Name

Description

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

Code

Description

TRANSACTION_NOT_FOUND

Payment not initiated inside PhonePe

BAD_REQUEST

Invalid request

AUTHORIZATION_FAILED

X-VERIFY header is incorrect

INTERNAL_SERVER_ERROR

Something went wrong. Merchant needs to call Check Transaction Status to verify the transaction status.

PAYMENT_SUCCESS

Payment is successful

PAYMENT_ERROR

Payment failed

PAYMENT_PENDING

Payment is pending. It does not indicate failed payment. Merchant needs to call Check Transaction Status to verify the transaction status.

PAYMENT_DECLINED

Payment declined by user

PAYMENT_CANCELLED

Payment cancelled by the merchant using Cancel API