2-5 % of the online payments fail due to some error at the payment service providers' end. Maybe due to server connection issues or bank-related error sometimes the payment request goes into the processing state and remains that way for more than expected.

You can easily handle these failures by sending out payment links to the user via email or SMS.

If the payment status is not returned as a success for X minutes, trigger payment gateway APIs to check current status, and if the status is failed trigger another API to generate a payment link for fresh payment.

Follow these simple steps to track and generate payment links via EBL:

  1. Login to your EBL account, create an endpoint inside your desired project.
  2. Add this webhook endpoint generated from EBL to your system(Trigger data to this webhook if a payment status is pending, failed, or unknown)
  3. Create a workflow on EBL and connect it with the endpoint created for the Payment check.
  4. Now add a function using Payment gateway API to check the payment status. (API reference for Razorpay: https://razorpay.com/docs/api/orders/#fetch-payments-for-an-order )
  5. Add an If condition to trigger generate payment link if the payment status is failed.
  6. Add the function for Razorpay payment link generation API: https://razorpay.com/docs/payment-links/apis/
  7. Add payment gateway APIs to your workflow to generate a payment link for the said amount.

Congrats, you have saved the hard-earned user from bouncing off.