This step involves one validation (Receive & Validate Callback Response) and one API integration (Transaction Status API).
To update the transaction status, Paytm PG uses Callback URL as a default option to send the response of the transaction. However, it is highly recommended to integrate Transaction Status API or Webhook and fetch the final payment status before confirming your customer’s order.
Receive & Validate Callback Response
When the payment is successful, you receive the transaction status from Paytm PG on the Callback URL.
You can manage callback in the same page instead of redirecting to another page by passing parameter, redirect=false in JS Checkout config. Consequently, you get the payment response inside transactionStatus handler in JS Checkout. This is where you can manage the callback.
The signature in this response needs to be validated via Checksum library. The implementation is similar to the Initiate Payment step.
Failure to validate the checksum may result in fraudulent transactions.
POST Transaction Status API
This API is used to verify transaction status before confirming customer’s order.
Paytm PG strongly recommends the merchants to integrate this Transaction Status API that can be used to fetch the final transaction status corresponding to requested OrderId. Following are the transaction statuses:
This API gets the transaction status corresponding to requested OrderId for specific merchant.