> ## Documentation Index
> Fetch the complete documentation index at: https://doc-test-my.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Linked Account

> Create a Linked Account using the Razorpay API.

Use this endpoint to create a Linked Account.

<RequestExample>
  ```bash Curl theme={null}
  curl -X POST 'https://api.razorpay.com/v2/accounts' \
       -u [YOUR_KEY_ID]:[YOUR_SECRET] \
       -H "Content-type: application/json" \
       -d '{
     "email":"gaurav.kumar@example.com",
     "phone":"9000090000",
     "type":"route",
     "reference_id":"124124",
     "legal_business_name":"Acme Corp",
     "business_type":"partnership",
     "contact_name":"Gaurav Kumar",
     "profile":{
        "category":"healthcare",
        "subcategory":"clinic",
        "addresses":{
           "registered":{
              "street1":"507, Koramangala 1st block",
              "street2":"MG Road",
              "city":"Bengaluru",
              "state":"KARNATAKA",
              "postal_code":"560034",
              "country":"IN"
           }
        }
     },
     "legal_info":{
        "pan":"AAACL1234C",
        "gst":"18AABCU9603R1ZM"
     }
  }'
  ```

  ```bash CLI theme={null}
  razorpay route accounts create \
    --email merchant@example.com \
    --phone 9876543210 \
    --legal-business-name "Acme Pvt Ltd" \
    --business-type route \
    --contact-name "Jane Doe" \
    --customer-facing-business-name "Acme Store" \
    --profile-category financial_services \
    --profile-subcategory accounting \
    --profile-business-model "Online marketplace for services" \
    --registered-street1 "12 Main St" \
    --registered-street2 "Floor 2" \
    --registered-city Mumbai \
    --registered-state Maharashtra \
    --registered-postal-code 400001 \
    --registered-country IN \
    --pan AAAPL1234C \
    --gst 29ABCDE1234F1Z5 \
    --website https://acme.example.com \
    --support-email support@acme.example.com \
    --support-phone 9876543210 \
    --note internal_id=acme_001
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
     "id":"acc_GRWKk7qQsLnDjX",
     "type":"route",
     "status":"created",
     "email":"gaurav.kumar@example.com",
     "profile":{
        "category":"healthcare",
        "subcategory":"clinic",
        "addresses":{
           "registered":{
              "street1":"507, Koramangala 1st block",
              "street2":"MG Road",
              "city":"Bengaluru",
              "state":"KARNATAKA",
              "postal_code":"560034",
              "country":"IN"
           }
        }
     },
     "notes":[

     ],
     "created_at":1611136837,
     "phone":"9000090000",
     "contact_name":"Gaurav Kumar",
     "reference_id":"124124",
     "business_type":"partnership",
     "legal_business_name":"Acme Corp",
     "customer_facing_business_name":"Acme Corp",
     "legal_info":{
        "pan":"AAACL1234C",
        "gst":"18AABCU9603R1ZM"
     }
  }
  ```

  ```json Failure theme={null}
  {
      "error": {
          "code": "BAD_REQUEST_ERROR",
          "description": "Invalid business type: xyz",
          "source": "business",
          "step": "payment_initiation",
          "reason": "input_validation_failed",
          "metadata": {},
          "field": "business_type"
      }
  }
  ```
</ResponseExample>

## Request Parameters

<ParamField body="email" type="string" required>
  The Linked Account's business email address.
</ParamField>

<ParamField body="phone" type="integer" required>
  The Linked Account's business phone number. The minimum length is 8 characters and the maximum length is 15.
</ParamField>

<ParamField body="legal_business_name" type="string" required>
  The name of the Linked Account's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200.
</ParamField>

<ParamField body="customer_facing_business_name" type="string">
  The Linked Account billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255.
</ParamField>

<ParamField body="business_type" type="string" required>
  The type of business operated by the Linked Account holder. List of possible values are available [here](/docs/payments/route/integration-guide#business-type).
</ParamField>

<ParamField body="reference_id" type="string">
  Partner's external account reference id. The minimum length is 1 character and the maximum length is 512.
</ParamField>

<ParamField body="profile" type="object" required>
  The business details of the Linked Account's account.
</ParamField>

<ParamField body="category" type="string" required>
  The business category of the Linked Account. Possible values: [List of Business Categories](/docs/payments/route/integration-guide#business-category).
</ParamField>

<ParamField body="subcategory" type="string" required>
  The business sub-category of the Linked Account. Possible values: [List of Business Sub-Categories](/docs/payments/route/integration-guide#business-sub-category).
</ParamField>

<ParamField body="business_model" type="string">
  The business description. The character limit between 1-255 characters.
</ParamField>

<ParamField body="addresses" type="object">
  Details of Linked Account's address.
</ParamField>

<ParamField body="registered" type="object" required>
  Details of the Linked Account's registered address.
</ParamField>

<ParamField body="street1" type="string">
  Address, line 1. The maximum length is 100 characters.
</ParamField>

<ParamField body="street2" type="string">
  Address, line 2. The maximum length is 100 characters.
</ParamField>

<ParamField body="city" type="string">
  The city. The maximum length is 100 characters.
</ParamField>

<ParamField body="state" type="string">
  The state. The minimum length is 2 and the maximum length is 32.
</ParamField>

Below are the list of supported Indian states:

| State Name                  | State Code |
| --------------------------- | ---------- |
| ANDAMAN & NICOBAR ISLANDS   | AN         |
| ANDAMAN AND NICOBAR ISLANDS | AN         |
| ANDHRA PRADESH              | AP         |
| ARUNACHAL PRADESH           | AR         |
| ASSAM                       | AS         |
| BIHAR                       | BI         |
| CHANDIGARH                  | CH         |
| CHHATTISGARH                | CT         |
| DADRA & NAGAR HAVELI        | DN         |
| DADRA AND NAGAR HAVELI      | DN         |
| DAMAN & DIU                 | DD         |
| DAMAN AND DIU               | DD         |
| DELHI                       | DL         |
| GOA                         | GO         |
| GUJARAT                     | GJ         |
| HARYANA                     | HA         |
| HIMACHAL PRADESH            | HP         |
| JAMMU & KASHMIR             | JK         |
| JAMMU AND KASHMIR           | JK         |
| JHARKHAND                   | JH         |
| KARNATAKA                   | KA         |
| KERALA                      | KE         |
| LAKSHADWEEP                 | LD         |
| MADHYA PRADESH              | MP         |
| MAHARASHTRA                 | MH         |
| MANIPUR                     | MA         |
| MEGHALAYA                   | ME         |
| MIZORAM                     | MI         |
| NAGALAND                    | NA         |
| ODISHA                      | OR         |
| PONDICHERRY                 | PO         |
| PUNJAB                      | PB         |
| RAJASTHAN                   | RJ         |
| SIKKIM                      | SK         |
| TAMIL NADU                  | TN         |
| TRIPURA                     | TR         |
| TELANGANA                   | TG         |
| UTTAR PRADESH               | UP         |
| UTTARAKHAND                 | UT         |
| WEST BENGAL                 | WB         |

<ParamField body="postal_code" type="integer">
  The postal code. This should be exactly 6 characters.
</ParamField>

<ParamField body="country" type="string">
  The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`.
</ParamField>

<ParamField body="operation" type="object">
  Details of the Linked Account's operational address.
</ParamField>

<ParamField body="street1" type="string">
  Address, line 1. The maximum length is 100 characters.
</ParamField>

<ParamField body="street2" type="string">
  Address, line 2. The maximum length is 100 characters.
</ParamField>

<ParamField body="city" type="string">
  The city. The maximum length is 100 characters.
</ParamField>

<ParamField body="state" type="string">
  The state. The minimum length is 2 and the maximum length is 32.
</ParamField>

Below are the list of supported Indian states:

| State Name                  | State Code |
| --------------------------- | ---------- |
| ANDAMAN & NICOBAR ISLANDS   | AN         |
| ANDAMAN AND NICOBAR ISLANDS | AN         |
| ANDHRA PRADESH              | AP         |
| ARUNACHAL PRADESH           | AR         |
| ASSAM                       | AS         |
| BIHAR                       | BI         |
| CHANDIGARH                  | CH         |
| CHHATTISGARH                | CT         |
| DADRA & NAGAR HAVELI        | DN         |
| DADRA AND NAGAR HAVELI      | DN         |
| DAMAN & DIU                 | DD         |
| DAMAN AND DIU               | DD         |
| DELHI                       | DL         |
| GOA                         | GO         |
| GUJARAT                     | GJ         |
| HARYANA                     | HA         |
| HIMACHAL PRADESH            | HP         |
| JAMMU & KASHMIR             | JK         |
| JAMMU AND KASHMIR           | JK         |
| JHARKHAND                   | JH         |
| KARNATAKA                   | KA         |
| KERALA                      | KE         |
| LAKSHADWEEP                 | LD         |
| MADHYA PRADESH              | MP         |
| MAHARASHTRA                 | MH         |
| MANIPUR                     | MA         |
| MEGHALAYA                   | ME         |
| MIZORAM                     | MI         |
| NAGALAND                    | NA         |
| ODISHA                      | OR         |
| PONDICHERRY                 | PO         |
| PUNJAB                      | PB         |
| RAJASTHAN                   | RJ         |
| SIKKIM                      | SK         |
| TAMIL NADU                  | TN         |
| TRIPURA                     | TR         |
| TELANGANA                   | TG         |
| UTTAR PRADESH               | UP         |
| UTTARAKHAND                 | UT         |
| WEST BENGAL                 | WB         |

<ParamField body="postal_code" type="integer">
  The postal code. This should be exactly 6 characters.
</ParamField>

<ParamField body="country" type="string">
  The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`.
</ParamField>

<ParamField body="legal_info" type="object">
  The legal details about the Linked Account's business. The mandatory [KYC requirement](/docs/payments/route/integration-guide#kyc-requirements) parameters should be passed depending on the business requirements.
</ParamField>

<ParamField body="pan" type="string">
  Valid PAN number details of the Linked Account's business.

  * This is a 10-digit alphanumeric code. For example, `AVOJB1111K`.
  * The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'.
  * The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`.
</ParamField>

<ParamField body="gst" type="string">
  Valid GSTIN number details of the Linked Account.

  * This is a 15-digit PAN-based unique identification number.
  * The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`.
</ParamField>

<ParamField body="contact_info" type="object">
  Options available for contact support.
</ParamField>

<ParamField body="chargeback" type="object">
  The type of contact support.
</ParamField>

<ParamField body="email" type="string">
  The email id of chargeback POC. The maximum length is:

  * local part (before @): 64 characters.
  * domain part (after @): 68 characters. <br /> The total character length supported is 132.
</ParamField>

<ParamField body="phone" type="integer">
  The phone number of chargeback POC. The maximum length is 10 characters.
</ParamField>

<ParamField body="policy_url" type="string">
  The URL of chargeback policy. Regex is (protocol://`razorpay.com`:port/resource path?querystring#fragementid)<br /> protocol-both http/https allowed. Only domain name is mandatory.
</ParamField>

<ParamField body="refund" type="object">
  The type of contact support.
</ParamField>

<ParamField body="email" type="string">
  The email id of refund POC. The maximum length is:

  * local part (before @): 64 characters.
  * domain part (after @): 68 characters. <br /> The total character length supported is 132.
</ParamField>

<ParamField body="phone" type="integer">
  The phone number of refund POC. The maximum length is 10 characters.
</ParamField>

<ParamField body="policy_url" type="string">
  The URL of refund policy. Regex is (protocol://`razorpay.com`:port/resource path?querystring#fragementid) <br /> protocol-both http/https allowed.
</ParamField>

<ParamField body="support" type="array">
  The type of contact support.
</ParamField>

<ParamField body="email" type="string">
  The email id of support POC. The maximum length is:

  * local part (before @): 64 characters.
  * domain part (after @): 68 characters. <br /> The total character length supported is 132.
</ParamField>

<ParamField body="phone" type="integer">
  The phone number of support POC. The maximum length is 10 characters.
</ParamField>

<ParamField body="policy_url" type="string">
  The URL of support policy. Regex is (protocol://`razorpay.com`:port/resource path?querystring#fragementid) <br /> protocol-both http/https allowed.
</ParamField>

<ParamField body="apps" type="object">
  The app details of the account holder's business.
</ParamField>

<ParamField body="websites" type="array">
  The website/app for the account holder's business. A minimum of 1 website is required.
</ParamField>

<ParamField body="android" type="array">
  Android app details
</ParamField>

<ParamField body="url" type="string">
  The link of the Android app. Regex is (protocol://`razorpay.com`:port/resource path?querystring#fragementid) <br /> protocol-both http/https allowed.
</ParamField>

<ParamField body="name" type="string">
  The name of the Android app.
</ParamField>

<ParamField body="ios" type="array">
  iOS app details
</ParamField>

<ParamField body="url" type="string">
  The link of the iOS app. Regex is (protocol://`razorpay.com`:port/resource path?querystring#fragementid) <br /> protocol-both http/https allowed.
</ParamField>

<ParamField body="name" type="string">
  The name of the iOS app.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`.
</ResponseField>

<ResponseField name="type" type="string">
  The account type. Possible value is `route`.
</ResponseField>

<ResponseField name="reference_id" type="string">
  The internal reference ID. This value can be maximum of 20 characters. For example, `123123`.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the account. Possible values:

  * `created`
  * `suspended`
</ResponseField>

<ResponseField name="email" type="string">
  The account holder's email address.
</ResponseField>

<ResponseField name="phone" type="integer">
  The account holder's phone number. The minimum length is 8 characters and the maximum length is 15.
</ResponseField>

<ResponseField name="legal_business_name" type="string">
  The name of the account holder's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200.
</ResponseField>

<ResponseField name="business_type" type="string">
  The type of business operated by the account holder. Possible values: [Business Types](/docs/payments/route/integration-guide#business-type).
</ResponseField>

<ResponseField name="profile" type="object">
  The account holder's business details.
</ResponseField>

<ResponseField name="category" type="string">
  The business category of the account holder. For example, `healthcare`. Possible values: [Business Category](/docs/payments/route/integration-guide#business-category).
</ResponseField>

<ResponseField name="subcategory" type="string">
  The business sub-category of the account holder. For example, `clinic`. Possible values: [Business Sub-Category](/docs/payments/route/integration-guide#business-sub-category).
</ResponseField>

<ResponseField name="addresses" type="object">
  Details of account holder's address.
</ResponseField>

<ResponseField name="registered" type="object">
  Details of the account holder's registered address.
</ResponseField>

<ResponseField name="street1" type="string">
  Address, line 1. The maximum length is 100 characters.
</ResponseField>

<ResponseField name="street2" type="string">
  Address, line 2. The maximum length is 100 characters.
</ResponseField>

<ResponseField name="city" type="string">
  The city. The maximum length is 100 characters.
</ResponseField>

<ResponseField name="state" type="string">
  The state. The minimum length is 2 and the maximum length is 100.
</ResponseField>

<ResponseField name="postal_code" type="integer">
  The postal code. This should be exactly 6 characters.
</ResponseField>

<ResponseField name="country" type="string">
  The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`.
</ResponseField>

<ResponseField name="legal_info" type="object">
  The legal details about the account holder's business. The mandatory [KYC requirement](/docs/payments/route/integration-guide#kyc-requirements) parameters should be passed depending on the business requirements.
</ResponseField>

<ResponseField name="pan" type="string">
  Valid PAN number details of the account holder's business.

  * This is a 10-digit alphanumeric code. For example, `AVOJB1111K`.
  * The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'.
  * The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`.

  This parameter might be required to complete the KYC process. However, it is optional for this API.
</ResponseField>

<ResponseField name="gst" type="string">
  Valid GSTIN number details of the account holder.

  * This is a 15-digit PAN-based unique identification number.
  * The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`.
</ResponseField>

<ResponseField name="notes" type="object">
  Contains user-defined fields stored by the partner for reference purposes.
</ResponseField>

<ResponseField name="contact_name" type="string">
  The name of the contact. The minimum length is 4 and the maximum length is 255 characters.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion title="The api key/secret provided is invalid">
    **Code:** `4xx`

    This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard.

    **Solution:** Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys.
  </Accordion>

  <Accordion title="The input field is required">
    **Code:** `400`

    This error occurs when a mandatory field is empty.

    **Solution:** Make sure to fill in all the mandatory fields.
  </Accordion>

  <Accordion title="The requested URL was not found on the server.">
    **Code:** `400`

    This error occurs when Marketplace feature is not enabled for merchants using private auth.

    **Solution:** Ensure to enable Marketplace feature for merchants using private auth.
  </Accordion>

  <Accordion title="Invalid type: route">
    **Code:** `400`

    This error occurs when the value of a parameter is invalid. For example, when the value of the `type` parameter is other than `route`.

    **Solution:** Ensure to send correct values for parameters.
  </Accordion>

  <Accordion title="Route code Support feature not enabled to add account code.">
    **Code:** `400`

    This error occurs when you pass the value for the `reference_id` parameter, but the `route_code_support` feature is not enabled for merchants.

    **Solution:** Ensure to enable the `route_code_support` feature for merchants before passing the value for the `reference_id` parameter.
  </Accordion>

  <Accordion title="Merchant email already exists for account - BbHKlnuyZkf0xa.">
    **Code:** `400`

    This error occurs when you try to create a Linked Account with an existing email address.

    **Solution:** Make sure the email address is unique while creating a Linked Account.
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Invalid IFSC Code">
    **Code:** `400`

    This error occurs when you pass an invalid IFSC code.

    **Solution:** Make sure you pass a valid IFSC code.
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="The name may only contain alphabets, digits and spaces">
    **Code:** `400`

    This error occurs when the name field has anything other than alphabets, digits and spaces.

    **Solution:** Make sure you enter a valid name without special characters.
  </Accordion>

  <Accordion title="The bank account number must be between 5 and 35 characters">
    **Code:** `400`

    This error occurs when you pass an invalid bank account number.

    **Solution:** Make sure to pass a valid account number.
  </Accordion>

  <Accordion title="Account_code -account_code is not allowed for this merchant">
    **Code:** `400`

    This error occurs when the `account_code` feature is not enabled for the merchant.

    **Solution:** Make sure to enable the correct feature for the merchant - `route_code_support`.
  </Accordion>

  <Accordion title="Please enter a valid name. Links, emails and HTML tags are not allowed.">
    **Code:** `400`

    This error occurs when the Linked Account name contains URLs, HTML tags, emails and so on.

    **Solution:** Ensure you don't send URLs, HTML tags and emails in the Linked Account name.
  </Accordion>

  <Accordion title="The code format is invalid.">
    **Code:** `400`

    This error occurs when the `reference_id` format is invalid.

    **Solution:** Ensure the `reference_id` format is valid.
  </Accordion>

  <Accordion title="The code must be at least 3 characters.">
    **Code:** `400`

    This error occurs when the `reference_id` value has less than a minimum of 3 characters.

    **Solution:** The `reference_id` value should be between 3 to 20 characters.
  </Accordion>
</AccordionGroup>
