Follow the checklist for a smoother Standard Checkout Integration and a better payment experience for the users.
## Quick Links
[PG Pay API](🔗)
[PG Check Status API](🔗)
[Server-to-Server Callback Handling](🔗)
### 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** parameter in the request payload.
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 Success, then the Refund has to be initiated.
**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 Success, then the Order can be fulfilled.
For **PAYMENT_PENDING** and **INTERNAL_SERVER_ERROR**, the reconciliation process must be setup, and the frequency interval of PG Check Status API should be 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.
If the checksum is valid, then the amount parameter in the S2S Response must be validated against the amount used to initiate the transaction using the PAY API
Only when both the checksum and amount are valid, the status of the transaction should be updated at the merchant's end.