API ReferenceIntegrationsKnowledge Base

Sub-Merchant Onboarding APIs

As a Partner, you can use the Sub-Merchant Onboarding APIs to onboard merchants from your platform. The sub-merchants can complete the KYC process in the Partner's platform itself and need not log into Razorpay's platform.

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.

API Gateway URL🔗

The Razorpay API Gateway URL is https://api.razorpay.com/v2. You need to include this before each API endpoint to make API calls.

Handy Tips
While sending API requests to Razorpay servers, it is recommended to honor the TTL of the entries and not cache the DNS aggressively at your end. This is applicable when you are not using Razorpay SDKs. However, if you are using Razorpay SDKs, be informed that our SDKs can handle DNS caching and honor the TTLs set in the records.

API Authentication🔗

All Razorpay APIs are authenticated using Basic Auth. Basic auth requires the following:

  • [YOUR_KEY_ID]
  • [YOUR_KEY_SECRET]

Basic auth expects an Authorization header for each request in the Basic base64token format. Here, base64token is a base64 encoded string of YOUR_KEY_ID:YOUR_KEY_SECRET.

Watch Out!
The Authorization header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. Few examples of invalid headers are:

  • BASIC base64token
  • basic base64token
  • Basic "base64token"
  • Basic $base64token

Generate API Key🔗

Follow these steps to generate the API Keys:

  1. Log into your Partner Dashboard with appropriate credentials.
  2. Select the mode (Test or Live) for which you want to generate the API key. Handy Tips
    You have to generate separate Partner Credentials for the test and live modes. No real money is used in test mode.
  3. Navigate to Settings section to generate the key for the selected mode.

Watch this video to see how to generate the API keys.

Watch Out!
Do not share your API Key secret with anyone or on any public platforms. This can pose security threats for your Razorpay account.

×