Handle Failed Charge (Cards)🔗
There are two ways to handle a failed charge:
Manual Charge on the Same Card🔗
When an auto-charge fails, you can manually attempt to charge the invoice as long as the invoice is in the issued
state.
For example, the customer's account might have an insufficient balance when you attempt to auto-charge. When they receive the payment failure email, they add money to their account and inform you about this. You can then try to charge manually on the invoice.
An authentication charge of ₹5 is made to authenticate the card. Once the manual charge is successful, the customer receives an email, and you receive a notification via webhook.
You can attempt a manual charge on the invoice using the Dashboard.
If you have enabled the subscription.pending
and subscription.halted
webhook, 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.
Change the Card Linked to the 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 the Card via your Checkout🔗
You can ask the customer to change the card details associated with the Subscription via your checkout using our APIs. Use the subscription_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
Handler Function vs Callback URL
- Handler Function
When you use the handler function, the response object of the successful payment (razorpay_payment_id
,razorpay_order_id
andrazorpay_signature
) is submitted to the checkout form. You need to collect these and send them to your server. - Callback URL
When you use a Callback URL, the response object of the successful payment (razorpay_payment_id
,razorpay_order_id
andrazorpay_signature
) is submitted to the callback URL.
Update the Payment Method via 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.
Handy Tips
Customers can also change the Subscription payment method from UPI to the card.
The following table lists the supported payment method change.
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 actived
state.

Additionally, you can use the dashboard status filter to search for halted
and pending
Subscriptions. You can send the Subscription link to the respective customers to clear dues and make those Subscriptions active.

Handy Tips
To use our Hosted Page solution, pass 1
against the customer_notify
parameter (customer_notify=1
) when creating the Subscription via APIs. Know more about the Subscription APIs.