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 withrzp_live_partner_. - Secret: The secret of the same pair. The Partner Dashboard shows it only once, when you generate it.
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.
Idempotency
Send theX-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.Entities, Webhooks and Errors
Refer to these pages for the entities, webhooks and errors:- Account Entity
- Requirement Entity
- Business Model Questions
- Business Categories
- Document Entity
- Onboarding APIs Webhook Events
- Errors