Checklist (Standard Integration)
Follow the checklist for a smoother Standard Checkout Integration and a better payment experience for the users.
Quick Links
PG Pay API
- The amount parameter should be in paise.
- The redirectUrl and redirectMode parameters should be passed in the request payload.
- The callbackUrl parameter should be passed in the request payload on which the server-to-server callback will be sent by PhonePe.
- The merchant should be passing the merchantUserId and merchantTransactionId parameters in the request payload.
- It should be only alphanumeric
- No Special characters are allowed except underscore "_" and hyphen "-"
- The length should be less than 35 characters
- The merchant should be passing paymentInstrument.type as "PAY_PAGE" in the request payload.
- After the completion of the payment and getting the UI callback from PhonePe, merchants should always check if the server-to-server callback is received to confirm the payment status. If not received, the PG Check Status API should be called.
PG Check Status API
-
Validate the amount parameter in the PG Check Status API response against the amount used to initiate the transaction using the PAY API.
-
If the payment status is PAYMENT_PENDING or INTERNAL_SERVER_ERROR, then there can be two possibilities.
Option 1:-
The transaction can be marked as Failed by the merchant and the Payment Failure page can be shown to the users on the UI.
-
At the same time, the transaction has to be reconciled on the server side till the terminal status Success/Failure is reached. If successful, then the Refund has to be initiated.
Note: For this use case, it is highly recommended to integrate the Refund API.
Option 2:
-
The transaction can be marked as Pending by the merchant and the Payment Pending page can be shown to the users on the UI.
-
At the same time, the transaction has to be reconciled on the server side till the terminal status Success/Failure is reached. If it is successful, then the Order can be fulfilled.
-
-
For PAYMENT_PENDING and INTERNAL_SERVER_ERROR, the reconciliation process must be setup, and the recommended frequency interval of PG Check Status API as follows:
Check Status API - Reconciliation [MANDATORY]
If the payment status is Pending, then Check Status API should be called in the following interval:
The first status check at 20-25 seconds post transaction start, then
Every 3 seconds once for the next 30 seconds,
Every 6 seconds once for the next 60 seconds,
Every 10 seconds for the next 60 seconds,
Every 30 seconds for the next 60 seconds, and then
Every 1 min until timeout (15 mins).
Server-to-Server Callback Handling
-
Once the S2S response is received, the checksum value in the headers of the S2S Response must be validated with the checksum calculated at the merchant's end.
-
Only when the checksum is valid, the status of the transaction should be updated at the merchant's end.
Updated 27 days ago