- Razorpay Sub-Merchant Onboarding APIs are RESTful. All our responses are returned in JSON.
- You can use Razorpay APIs in two modes, Test and Live. The API key is different for each mode.
- To complete the onboarding process for the sub-merchant, check the KYC document requirements.
- You can try out our APIs on the Razorpay Postman Public Workspace.
Video Tutorial
Watch this video to know how you can onboard sub-merchants using the Sub-Merchant Onboarding APIs.API Gateway URL
The Razorpay API Gateway URL ishttps://api.razorpay.com/v2. You need to include this before each API endpoint to make API calls.
API Authentication
You can use Partners APIs using either Partner Auth or OAuth.Use Partner Auth
Partner Auth usesBasic Auth. Basic auth requires the following:
[YOUR_KEY_ID][YOUR_KEY_SECRET]
Authorization header for each request in the Basic base64token format. Here, base64token is a base64 encoded string of YOUR_KEY_ID:YOUR_KEY_SECRET.
Use OAuth
OAuth usesBearer Auth. Know more about OAuth.
To use OAuth for Partners APIs:
[Enable cobranded_onboarding](#1-enable-cobranded-onboarding)
[Generate Access Token](#2-generate-access-token)
[Use Access Token to Authenticate](#3-use-access-token-to-authentic...
1. Enable cobranded_onboarding
Raise a request with our Support team to get the cobranded_onboarding feature activated on your account. The cobranded_onboarding feature also enables:- Access to sub-merchant account status webhooks.
- Onboarding UI configurator on Partner Dashboard.
2. Generate Access Token
Generate your access token using the below endpoint. You can generate it for test or live mode. Use theclient_id and client_secret of the OAuth application for test and live modes.
https://auth.razorpay.com/token
Request Parameters
grant_type mandatory
: string Defines the grant type for the request. Possible value is client_credentials.
mode optional
: string The type of mode. Possible values:
testlive(default)
client_id mandatory
: string Unique client identifier. Use the client_id of the OAuth application.
client_secret mandatory
: string Client secret string. Use the client_secret of the OAuth application.
Response Parmeters
expires_in
: integer Represents the TTL of the access token in seconds. You will have to regenerate the access token after expiry.
token_type
: string Defines the type of access token. Possible value is Bearer.
public_token
: string A public key is used only for public routes such as Checkout or Payments.
razorpay_account_id
: string Razorpay account id for which the access token is generated.
access_token
: string A private key used to authenticate for Razorpay APIs.
3. Use Access Token to Authenticate
You can use your OAuth access token to authenticate and use Partners APIs. Given below is a sample code for the Fetch an Account API.List of Sub-Merchant Onboarding APIs
You can use the Sub-Merchant Onboarding APIs to perform various actions.API | Description
Account APIs | Create, view, update and delete sub-merchant accounts.
Stakeholders APIs | Create, view and update stakeholders.
Product Configuration APIs | Request, view and update a product configuration.
Documents APIs | Upload and view account and stakeholder documents.
Webhooks APIs | Create, view, update and delete webhook events.
Terms and Conditions APIs | View and accept terms and conditions.Account Activation
Given below is the complete end-to-end flow explaining the transition among statuses:Status | Description
Created | The account is created.
Under Review | Your account moves to Under Review when all the required details are submitted. Our team will review the details and reach out for clarifications.
Needs Clarification | We might require clarifications regarding the KYC details submitted during the review process. All the details about fields that need clarification will be present in the product configuration API.
Activated | Your account will be activated once all of the information provided has been approved. You will be able to start accepting payments and receive settlements in your registered bank accounts.
Suspended | During the KYC review, your account can be suspended if it is identified as potentially fraudulent. Please reach out to our support team for the next steps.
Rejected | The account attains this status when the KYC details submitted by the merchant are rejected during manual review.Product Activation Status and Updates Permitted
For the following APIs, the updates permitted depend on the product activation status:Activation Status | Update Permitted
requested | You can update the details for all the fields.
needs_clarification | The fields you can update depend on the reason_code mentioned in the requirements object in the Request a Product Activation API: - document_missing or field_missing: You can update all the fields.
- needs_clarification: You can update only the specific field for which Razorpay is seeking clarification for.
under_review | You cannot update any fields.
activated | You cannot use this API to update any fields as your account is already active.
Use Cases to Update a Product Configuration
You can update the following details for Payment Gateway and Payment Links using the Update a Product Configuration API. However, whether the details can be updated or not depends upon the product activation status.-
Settlement Bank Account Details: You can update the
settlementobject with the new bank account details based on the product activation status. -
Request Additional Payment Methods: You can request various payment methods and related instruments to be enabled using the
payment_methodsobject. However, you can request for only one payment method at a time. For example, if you want to enable HDFC Netbanking and Rupay Domestic Card payment methods, you should send two separate API requests. You cannot send a consolidated request using this API. -
Update Notifications Settings: You can update the email, WhatsApp and SMS settings using the
notificationsobject. -
Configure Checkout Features: You can change the checkout theme colour, add a logo and enable the saving of customer card details using the
checkoutobject. -
Configure Refund Speed: You can configure the default refund speed using the
refundobject. - Accept of Terms and Conditions: You can accept Razorpay terms and conditions.
Terms and Conditions Workflow
Given below is the workflow:As a partner, it is your responsibility to show respective terms an...
You should display these web pages to your sub-merchants on your in...
Record the acceptance of terms and transmit that to Razorpay using...