payment_gateway product: disable or enable payments, put settlement on hold or release it, or suspend or unsuspend the product. Know more about what each action does and who can reverse it.
actionin the path names the action. Sendstatus_reasonin the body forsuspend,disable_paymentsanddisable_settlement.- Repeating the current state returns
200and changes nothing. An action Razorpay already took keeps Razorpay’sstatus_reason. - Each change sends its webhook, as a change by Razorpay would. Know more about actions webhooks.
- This endpoint needs the
onboarding_accounts_writescope.
Path Parameters
acc_ followed by 14 letters or digits. For example, acc_Rk9Xm2Qp7Zt4Nb.suspend: Suspends the product. Both objects stop with yourstatus_reason.unsuspend: Reverses a suspension you set. Both objects return toenabled.disable_payments: Setspayment_acceptancetodisabled.enable_payments: Reverses adisable_paymentsyou did.disable_settlement: Setssettlementtoon_hold.enable_settlement: Reverses adisable_settlementyou did.
Request Parameters
200 again for 1 hour, with the response header Idempotent-Replayed: true. A refused or failed request holds no key, so a retry with the same key runs again.suspend, disable_payments and disable_settlement. Do not send it for unsuspend, enable_payments or enable_settlement. On suspend, Razorpay copies it onto payment_acceptance.status_reason and settlement.status_reason.status_reason.requirement_id is read-only. Sending it returns 400 with field_read_only.
The table below lists the request body of each action:
Response Parameters
The response is the account, as Fetch an Account returns it. The fields an action changes are onproducts.payment_gateway:
activated: The product is live. Checkpayment_acceptanceandsettlementfor stops.suspended: Razorpay or you suspended the product. Both objects are stopped with the samestatus_reasonandinitiated_by.
Errors
Every error returns the Accounts API error envelope,{"error": {...}} with code, description, source, step, reason, field and metadata. Know more about the error object.
Action Errors
This field can't be changed.
This field can't be changed.
400Reason: field_read_onlyThe body sets a field that only Razorpay sets, such as status_reason.requirement_id. initiated_by and updated_at are also read-only.Solution: Send only status_reason.code and status_reason.description. error.field names the read-only field.Razorpay disabled payment acceptance. Only Razorpay can enable it.
Razorpay disabled payment acceptance. Only Razorpay can enable it.
400Reason: payments_disable_not_reversibleYou called enable_payments while payment_acceptance.initiated_by is razorpay.Solution: Show the sub-merchant status_reason.description. If status_reason.requirement_id is set, answer that requirement. metadata.requirement_id repeats it.Razorpay put settlement on hold. Only Razorpay can release it.
Razorpay put settlement on hold. Only Razorpay can release it.
400Reason: settlement_disable_not_reversibleYou called enable_settlement while settlement.initiated_by is razorpay.Solution: Show the sub-merchant status_reason.description. If status_reason.requirement_id is set, answer that requirement. metadata.requirement_id repeats it.Razorpay suspended the product. Only Razorpay can unsuspend it.
Razorpay suspended the product. Only Razorpay can unsuspend it.
400Reason: suspension_not_reversibleYou called unsuspend on a product that Razorpay suspended.Solution: Show the sub-merchant status_reason.description from either object. Answer the requirement in status_reason.requirement_id, if any.The product is suspended. Reverse the suspension first.
The product is suspended. Reverse the suspension first.
400Reason: product_suspendedYou called disable_payments, enable_payments, disable_settlement or enable_settlement while the product’s status is suspended.Solution: Reverse the suspension first if you set it, with unsuspend. A suspension by Razorpay can only be reversed by Razorpay.Partner actions aren't enabled for this platform.
Partner actions aren't enabled for this platform.
403Reason: partner_actions_not_enabledYou called suspend, disable_payments or disable_settlement, and Razorpay has not switched on partner actions for your platform. Reversing your own action (unsuspend, enable_payments, enable_settlement) is never refused for this reason.Solution: Contact Razorpay to switch on partner actions for your platform.Request Errors
The account ID isn't valid.
The account ID isn't valid.
400Reason: invalid_account_idThe account ID in the path is not acc_ followed by 14 letters or digits.Solution: Send the account ID as acc_ followed by 14 letters or digits, such as acc_Rk9Xm2Qp7Zt4Nb.The idempotency key isn't valid.
The idempotency key isn't valid.
400Reason: invalid_formatX-Idempotency-Key is not 16-64 printable ASCII characters.Solution: Send X-Idempotency-Key with 16-64 printable ASCII characters.Choose one of the allowed values (action).
Choose one of the allowed values (action).
400Reason: invalid_optionaction is not one of the supported actions. metadata.allowed_values lists the values.Solution: Send an action from metadata.allowed_values.This idempotency key was already used with a different request.
This idempotency key was already used with a different request.
400Reason: idempotency_key_reusedYou sent this X-Idempotency-Key before with a different action or different inputs.Solution: Send a new X-Idempotency-Key for a different request. Reuse a key only to retry the same request.The earlier request is still being processed.
The earlier request is still being processed.
409Reason: idempotency_in_progressA request with this X-Idempotency-Key is still running. Razorpay stores its result only when it finishes.Solution: Wait for the time in the Retry-After header, then retry with the same key.Write Errors
A required header is missing.
A required header is missing.
400Reason: missing_headerX-Idempotency-Key is missing. On answers and uploads, a key that is not 16-64 printable ASCII characters also returns this. On partner actions, such a key returns invalid_format.Solution: Send X-Idempotency-Key with 16-64 printable ASCII characters.