Available in🇮🇳 India
An action changes what a sub-merchant can do on its payment_gateway product. Razorpay takes actions after its risk reviews. You can take the same actions for your own reasons, and reverse the ones you took.
The Three Things an Action Changes
Thepayment_gateway product carries its status and 2 objects, payment_acceptance and settlement:
Payment Gateway Product
Each of
payment_acceptance and settlement carries these fields:
There is no history of earlier states. Each object shows only its current state.
The Six Partner Actions
You take an action with one call,POST /v1/accounts/{id}/products/payment_gateway/actions/{action}. Know more about the Partner Actions API.
Razorpay takes the same actions from its side, with its own reason codes.
Who Can Reverse an Action
Each side reverses only what it did. The table below lists what you can do:
Repeating the current state returns
200 and changes nothing. If Razorpay has already stopped an object, your action does not replace Razorpay’s status_reason.
The diagrams below show who moves each state:
- Payment Acceptance
- Settlement
- Product
Suspension
A suspension stops everything on thepayment_gateway product at once. Razorpay or you can suspend. A suspension:
- Sets the product’s
statustosuspended. - Sets
payment_acceptancetodisabledandsettlementtoon_hold, both with the samestatus_reasonandinitiated_by. - Blocks every other action on either object until it is reversed. An action returns
400 product_suspended.
activated and both objects back to enabled. An action that was in place before the suspension does not come back.
Status Reason and Reason Codes
Every stopped object carries astatus_reason. When you act, send status_reason.code as one of your 3 codes, partner_fraud_review, partner_policy or partner_other, and a description the sub-merchant sees. status_reason.requirement_id is read-only. Know more about the reason codes.
Handy TipsRazorpay switches on partner actions (
suspend, disable_payments, disable_settlement) for each platform. Until then, these return 403 partner_actions_not_enabled. Reversing your own action always works.Flows
- Razorpay Acts and Asks
- Razorpay Acts Only
- Your Own Action
1
Razorpay Raises a Requirement
account.product.payment_gateway.requirement.needs_clarification arrives. Know more about clarifications.2
Razorpay Puts Settlement on Hold
account.product.payment_gateway.settlement.on_hold arrives with status: on_hold and status_reason.requirement_id set to the requirement’s id.3
You Show Both to the Sub-Merchant
Show
status_reason.description and the requirement it points to. Send the responses.4
Razorpay Reverses or Escalates
On a good outcome, the requirement is resolved and settlement returns to
enabled, each with its own event. Otherwise, Razorpay can keep the hold or suspend the product.Next Steps
- Partner Actions API: request and response for each of the 6 actions, and their errors.
- Actions webhooks: the 6 events actions send.
- Reason codes and errors.