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

# Request a Product Configuration

> Request a product configuration using the Razorpay API.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to request a product configuration.

<RequestExample>
  ```bash Curl theme={null}
  curl -X POST https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products \
  -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
  -H "Content-Type: application/json" \
  -d '{
     "product_name":"route",
     "tnc_accepted":true
  }'
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  String accountId = "acc_HQVlm3bnPmccC0";

  JSONObject productRequest = new JSONObject();
  productRequest.put("product_name","route");
  productRequest.put("tnc_accepted",true);

  Account product = instance.product.requestProductConfiguration(accountId, productRequest);
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  accountId = "acc_HQVlm3bnPmccC0"

  client.product.requestProductConfiguration(accountId, {
      "product_name" : "route",
      "tnc_accepted" : True
  })
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $accountId = "acc_HQVlm3bnPmccC0";

  $api->account->fetch($accountId)->products()->requestProductConfiguration(array(
      "product_name" => "route",
      "tnc_accepted" => true
  ));
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient(your_key_id, your_secret);

  string accountId = "acc_HQVlm3bnPmccC0";

  Dictionary<string, object> productRequest = new Dictionary<string, object>();
  productRequest.Add("product_name", "route");
  productRequest.Add("tnc_accepted", true);

  Product product = client.Product.Create(productRequest);
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  accountId = "acc_HQVlm3bnPmccC0"

  Razorpay::Product.request_product_configuration(accountId, {
    "product_name": "route",
    "tnc_accepted": true
  })
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  var accountId = "acc_HQVlm3bnPmccC0";

  instance.products.requestProductConfiguration(accountId, {
      "product_name" : "route",
      "tnc_accepted" : true
  });
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  accountId := "acc_HQVlm3bnPmccC0"

  data := map[string]interface{}{
      "product_name" : "route",
      "tnc_accepted" : true
  }

  body, err := client.Product.RequestProductConfiguration(accountId, data, nil);
  ```

  ```bash CLI theme={null}
  razorpay route accounts product-request acc_IEIkSOM5VJb2Lm \
    --tnc-accepted
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
     "requested_configuration":[

     ],
     "active_configuration":{
        "settlements":{
           "account_number": 7878780080310012,
           "ifsc_code":"RATN0VAAPIS",
           "beneficiary_name":"<name>"
        }
     },
     "requirements":[
        {
           "field_reference":"settlements.beneficiary_name",
           "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux",
           "reason_code":"field_missing",
           "status":"required"
        },
        {
           "field_reference":"settlements.account_number",
           "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux",
           "reason_code":"field_missing",
           "status":"required"
        },
        {
           "field_reference":"settlements.ifsc_code",
           "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux",
           "reason_code":"field_missing",
           "status":"required"
        }
     ],
     "tnc":{
        "id":"tnc_K1eopApuHyBE7D",
        "accepted":true,
        "accepted_at":1659638222
     },
     "id":"acc_prd_K1eopFF8G21tux",
     "product_name":"route",
     "activation_status":"needs_clarification",
     "account_id":"acc_K1em7bWYEiwmnc",
     "requested_at":1659638222
  }
  ```

  ```json Failure theme={null}
  {
     "error":{
        "code":"BAD_REQUEST_ERROR",
        "description":"Linked account does not exist",
        "source":"",
        "step":"",
        "reason":"linked_account_id_does_not_exist",
        "metadata":{

        }
     }
  }
  ```
</ResponseExample>

## Path Parameters

<ParamField path="account_id" type="string">
  The unique identifier of the account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. This id is used to fetch or update a product. The product is created for this account id.
</ParamField>

## Request Parameters

<ParamField body="product_name" type="string" required>
  The product(s) to be configured. Here it is `route`.
</ParamField>

<ParamField body="tnc_accepted" type="boolean">
  Determines whether the terms and conditions are accepted or not. Possible values:

  * `true`: Terms and conditions are accepted.
  * `false`: Terms and conditions are not accepted.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of a product generated by Razorpay. This id is used to fetch or update a product.
</ResponseField>

<ResponseField name="product_name" type="string">
  The product(s) to be configured. Possible values:

  * `Route`
</ResponseField>

<ResponseField name="tnc_accepted" type="object">
  It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields:
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier representing the acceptance of terms and conditions for a product by a user.
</ResponseField>

<ResponseField name="accepted" type="boolean">
  The flag that represents whether the terms and conditions are accepted by the user.

  * `true`: Terms and conditions are accepted by user.
  * `false`: Terms and conditions are not accepted by user.
</ResponseField>

<ResponseField name="accepted_at" type="integer">
  The Unix timestamp at which the terms and conditions were accepted by the user for the requested product.
</ResponseField>

<ResponseField name="requested_configuration" type="object">
  The configuration of the product requested by the user that is yet to be set as active.
</ResponseField>

<ResponseField name="active_configuration" type="object">
  The configuration of the product that has been set as active.
</ResponseField>

<ResponseField name="settlements" type="object">
  The Settlement settings object.
</ResponseField>

<ResponseField name="account_number" type="string">
  The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, `7878780080310012`.
</ResponseField>

<ResponseField name="ifsc_code" type="string">
  The IFSC associated with the bank account. For example, `RATN0VAAPIS`.
</ResponseField>

<ResponseField name="beneficiary_name" type="string">
  The name of the beneficiary associated with the bank account. This API parameter is needed to complete the KYC process. However, it is optional for this API.
</ResponseField>

<ResponseField name="requirements" type="object">
  The list of requirements to be enabled for this product or some of the configurations under this product.
</ResponseField>

<ResponseField name="field_reference" type="string">
  The field which is in issue or missing. The JSON key path in resolution URL.
</ResponseField>

<ResponseField name="resolution_url" type="string">
  The URL to address the requirement. The API endpoint to be used for updating missing fields or documents.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the requirement.
</ResponseField>

<ResponseField name="reason_code" type="string">
  The reason code for showing in the requirement. Possible values are:

  * `field_missing`
  * `needs_clarification`
  * `document_missing`
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the account generated by Razorpay. For example, `acc_prd_K1eopFF8G21tux`. The product is created for this account id.
</ResponseField>

<ResponseField name="account_id" type="string">
  The unique identifier generated by Razorpay. For example, `acc_K1em7bWYEiwmnc`.
</ResponseField>

<ResponseField name="activation_status" type="string">
  The status of the product activation.

  * `requested`
  * `needs_clarification`
  * `under_review`
  * `activated`
  * `suspended`
</ResponseField>

<ResponseField name="requested_at" type="integer">
  The Unix timestamp at which the product configuration has been requested.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion title="Linked account does not exist.">
    **Code:** `400`

    This error occurs when the requester is not the parent of the child account, or the child account does not exist.

    **Solution:** Ensure the Linked Account id exists before proceeding with the update API.
  </Accordion>

  <Accordion title="The product requested is invalid.">
    **Code:** `400`

    This error occurs when the provided data is invalid.

    **Solution:** Ensure to pass the valid data.
  </Accordion>

  <Accordion title="The selected tnc accepted is invalid.">
    **Code:** `400`

    This error occurs when the `tnc.accepted` value is `false`.

    **Solution:** Ensure to accept the tnc by passing the `accepted` value as `true`.
  </Accordion>
</AccordionGroup>
