Reasons for Payment Failures
- The card has expired.
- The bank has blocked the card.
- The customer’s account has insufficient balance.
- The customer has cancelled the mandate from their end.
What Happens in Case of a Payment Failure
Here is the Subscription flow if a payment fails:1
Step 1
The Subscription will move to the
pending state.2
Step 2
You are notified about it via our webhooks. We automatically retry the payment on the following day.
- We automatically charge the last invoice if the customer changes the card when the Subscription is in the
pendingstate. - If this charge is successful, the Subscription moves to the
activestate.
3
Step 3
If the payment fails after all retries, the Subscription will move to the
halted state.- If the customer successfully changes the card details when a Subscription is in the
haltedstate, it moves to theactivestate. Invoices for such Subscriptions are still created. However, we will not charge these invoices. You will have to charge them manually.
Handy TipsThis process will not affect the charge cycle for the subsequent months.
Notifications
- If you have enabled the
subscription.pendingandsubscription.haltedwebhook, you receive notifications every time a Subscription moves to one of the above-mentioned states. You can then decide to hold off the delivery of the service as per your business model. - We also send an email to the customer notifying them about the payment failure. This email contains a link that the customer can use to change the card details associated with the Subscription.
Retry Model
Following is the retry model for Emandate, UPI and Cards: In failure scenarios, we attempt to retry only when we get the confirmation or rejection of the last payment, as it may take more than 24 hours. Below is the retry model:- If the charge day (T) is a bank holiday, we will charge on T-1 days
- If the charge day (T) and the previous day (T-1) are bank holidays, we will charge on T-3 days.
- Let T=0 be the charge day. On this day, we attempt the charge.
- If the charge fails, the subscription moves to the
pendingstate, and we automatically reattempt the charge on T+1 day. - If the charge fails again, we automatically reattempt the charge two more times on T+2 and T+3 days, respectively.
- If the charge still fails, the subscription moves to the
haltedstate.
halted state.
Below is the retry model:
- Let T=0 be the charge day.
- On T=0, we attempt to charge the card.
- If the charge fails, the Subscription moves to the
pendingstate, and we automatically reattempt the charge on T+1 day. - If the charge fails again, we automatically reattempt the charge two more times on T+2 and T+3 days, respectively.
- If the charge still fails, the Subscription moves to the
haltedstate.
Handle Failed Charge (Cards)
There are two ways to handle a failed charge:Manual Charge on Same Card
When an auto-charge fails, you can manually attempt to charge the invoice as long as the invoice is in theissued state.
Change Card Linked to Subscription
- When an auto-charge fails, we send the customer an email about the payment failure. This email has a link that the customer can use to change the card linked to the Subscription.
- You can ask the customer to change the card linked to the Subscription.
Change Card Using Checkout
You can ask the customer to change the card details associated with the Subscription on your checkout using our APIs. Use thesubscription_card_change parameter to control this feature:
- 1 : Allow the customer to change the card details from your checkout
- 0 : Do not allow the customer to change the card details from your checkout
Checkout with handler function
Handler Function vs Callback URL
Handler Function| Callback URL
When you use the handler function, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the checkout form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the callback URL.Update Payment Method on Our Hosted Page
You can use our ready-made hosted page solution to handle payment failures when you attempt an auto-charge. Here is how the hosted page handles payment failure:- The customer is notified via email about the payment failure.
- The payment failure email contains a link that allows the customer to take further action on the failed payment.
- Customers can either retry the payment on the same card or update the card details or change the payment method to UPI or Emandate (bank accounts) using the link. These actions are handled seamlessly by the hosted page.
Current Payment Method | Change to Card | Change to UPI | Change to Emandate
Card | Yes | Yes | Yes
UPI | Yes | No | No
Emandate | Yes | No | No- A sample hosted page is shown below:
-
After the customer clicks the Update Payment Method button, the checkout page appears as shown. The customer can choose a card (of supported banks), UPI or Emandate (of supported banks) to make the payment. If the payment is successful, the Subscription moves back to the
activedstate. -
Use the Dashboard status filter to search for
haltedandpendingSubscriptions. You can send the Subscription link to the respective customers to clear dues and make those Subscriptions active.
Current Payment Method | Change to Card | Change to Wallet (Touch’n Go)
Card | Yes | Yes
Wallet (Touch’n Go) | Yes | Yes Use the Dashboard status filter to search forhalted and pending Subscriptions. You can send the Subscription link to the respective customers to clear dues and make those Subscriptions active.