Skip to main content
Available in🇮🇳 India
Use the Accounts APIs to onboard and manage sub-merchants from your own platform. Create an account, send the KYC details Razorpay asks for and keep managing the account after its products activate. Webhooks tell you whenever an account changes or Razorpay needs something from the sub-merchant. Every account response lists the requirements still due for each product, computed on every call. Build your forms from these requirements instead of hard-coding rules. Know more about the Requirement entity.

Authentication

Authenticate every request with HTTP Basic auth. Generate 2 key and secret pairs for your app on the Razorpay Partner Dashboard, one for test mode and one for live mode:
  • Key: The key of the pair for the mode. A test key starts with rzp_test_partner_ and a live key with rzp_live_partner_.
  • Secret: The secret of the same pair. The Partner Dashboard shows it only once, when you generate it.
The pair you send decides the mode. The prefix only helps you tell the keys apart. Live mode and test mode share one base URL, https://api.razorpay.com. A test pair never reaches a live account. You need no token. Each pair works for every account you onboard in its mode.
Watch Out!
  • Keep the secret on your servers, never in a browser or mobile app.
  • Razorpay accepts requests only from the IP ranges you allowlist for your app in each mode. Any other address gets 403 with ip_not_allowed. In test mode, the allowlist applies once it has an entry.
  • To change the secret, rotate it on the Partner Dashboard. The old secret keeps working for up to 24 h or until you end that window. A revoked secret stops working at once.

Idempotency

Send the X-Idempotency-Key header on every write: POST, PATCH and DELETE. Do not send it on a GET. Generate a unique key for each operation, 16-64 printable ASCII characters long. A Universally Unique Identifier (UUID) works. The table below lists how Razorpay handles the key: To repeat an operation on purpose, such as sending a new One-Time Password (OTP), use a new key.

Endpoints

Create an Account

POST /v1/accountsCreates a sub-merchant account and its owner user.

Fetch Accounts

GET /v1/accounts and /v1/accounts/:account_idRetrieves the accounts mapped to your app, or one account with its status and requirements.

Update an Account

PATCH /v1/accounts/:account_idSends what a requirement asks for and submits the product.

Run an Action

POST /v1/accounts/:account_id/actions/:actionSends an OTP or creates a verification link.

Upload a Document

POST /v1/accounts/:account_id/documentsStores a KYC file and returns its file ID.

Fetch All Documents

GET /v1/accounts/:account_id/documentsRetrieves the documents of an account.

Fetch One Document

GET /v1/accounts/:account_id/documents/:file_idRetrieves a stored document.

Delete a Document

DELETE /v1/accounts/:account_id/documents/:file_idDeletes a file you uploaded.
Manage the sub-merchant’s payment methods, such as cards, netbanking and UPI, with the Payment Method APIs.

Entities, Webhooks and Errors

Refer to these pages for the entities, webhooks and errors: Refer to these guides for the integration flow:
Last modified on November 18, 2026