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:
- Login to your EBL account, create an endpoint inside your desired project.
- Add this webhook endpoint generated from EBL to your system(Trigger data to this webhook if a payment status is pending, failed, or unknown)
- Create a workflow on EBL and connect it with the endpoint created for the Payment check.
- 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 )
- Add an If condition to trigger generate payment link if the payment status is failed.
- Add the function for Razorpay payment link generation API: https://razorpay.com/docs/payment-links/apis/
- 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.