API ReferenceIntegrationsKnowledge Base

Webhooks

You can use Razorpay Webhooks to receive notifications of all events related to payment states and the token in the recurring payments workflow.

Check Payment Status using Webhooks#

Before you learn about the different webhook payloads, it is essential that you get familiar with the authorization payment, recurring link and tokens statuses.

Authorization Payment States#

Once the customer has made the Authorization Payment, it moves through the following states as per the payment flow:

Status

Description

Webhook

Created

Payment is created when a customer enters and submits the payment information.

NA

Authorized

Payment is authorized when the customer’s payment details are successfully authenticated by the bank.

payment.authorized

Captured

Indicates that the payment is verified by you.
Once a payment is captured you can retrieve the token.

payment.captured

or

order.paid

Failed

Indicates that the payment has failed.
If the payment has failed, you need to create an authorization transaction again.

payment.failed

Recurring Link States#

A registration link moves through the following states during its life cycle:

Status

Description

Webhook

Issued

A registration Link is created and sent to the customer.

NA

Paid

Payment is made for the issued registration Link.
Once the registration Link is paid, search for Token corresponding to the payment.

invoice.paid

Cancelled

The registration link has been canceled. In such cases, you need to create a registration link again.

NA

Expired

The registration link has expired. You can set an expiry timestamp at the time of creation.

invoice.expired

Token States#

token_status

Description

Next Step

initiated

Indicates that the bank is processing the mandate registration.

Wait for the token.confirmed webhook

confirmed

Indicates that the bank has completed the mandate registration.

Create recurring payment

rejected

Indicates that the mandate registration has failed.

Create the authorization transaction again

cancelled

Indicates that the token has been cancelled.

Create the authorization transaction again if you want to charge the customer.

paused

Indicates that the token has been paused by your customer.

The token is inactive. Your customer has paused the token. Ask them to resume the token to charge them.

resumed

Indicates that the token has been unpaused by your customer.

The token is active and you can charge the customer.