Available in🇮🇳 India
Banks, providers and Razorpay move an instrument through onboarding over days. The usual path is in_progress while something is due, then under_review, then activated. A reviewer or the bank can send it to needs_clarification on the way. rejected is final for this API.
Fetching its payment method is always the source of truth. Use a webhook to know when to fetch.
4.1 Subscribe to the Webhook
Subscribe on the Partner Dashboard, once per mode, with an https URL, a secret and the events to receive. Razorpay delivers these events the same way as the Onboarding APIs webhooks, to the same URL.
Switching an activated instrument on or off changes only
enabled, not its status, so no event fires. A group such as debit_card has no event of its own. The event is sent for the member whose status changed.
account.payment_methods.updated
updated_at, and the payment method with only the instrument that changed.
4.2 Handle the Webhook
- Verify the signature.
X-Razorpay-Signatureis the HMAC-SHA256 of the raw body, keyed with your webhook secret, as hex. Read the secret from your environment or secrets manager. Reject an event that does not match. - Acknowledge fast. Answer with any
2xxwithin 5 seconds, then do the work. Razorpay retries anything else with exponential backoff for up to 24 hours. After that, it does not send the event again, so fetch its payment method to catch up. - Expect repeats and any order. Process each
X-Razorpay-Event-Idonce. Order events bycreated_at, then bypayload.account.updated_at. Fetch its payment method when the order matters.
4.3 Poll Instead
Without webhooks, fetch the instrument’s payment method while it isin_progress, under_review or needs_clarification. A few times a day is enough. Stop once it is activated or rejected.
Razorpay may also email or WhatsApp the sub-merchant about the outcome.