You must always verify payment status from your backend
Before delivering the goods or services, please ensure you call check the
orderstatus from your backend. Once a payment is initiated, you can verify the payment by following methods-
Call GET status APIs from backend as this API uses your secret key.
2. Use Payment Callbacks to verify the payment
Refer Payment Callback
The ideal workflow to verify payment status should involve polling the get Status API. However, you can also listen to the payment webhook which is asynchronously sent by Cashfree and on receiving the webhook you can initiate a getStatus call.
This method is the most secure way to verify payment status and even avoids cases where some malicious actor has a hold of your keys.
Updated 29 days ago