> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Request a Product Configuration

> **POST** `/v2/accounts/:account_id/products`

Use this endpoint to request a product configuration.

### Request

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

```java: Java

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

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

$api = new Api($key_id, $secret);

$accountId = "acc_HQVlm3bnPmccC0";

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

```csharp: .NET

RazorpayClient client = new RazorpayClient(your_key_id, your_secret);

string accountId = "acc_HQVlm3bnPmccC0";

Dictionary productRequest = new Dictionary();
productRequest.Add("product_name", "route");
productRequest.Add("tnc_accepted", true);

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

```ruby: Ruby

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

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

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);
````

### Response

````json: Success theme={null}
{
   "requested_configuration":[
      
   ],
   "active_configuration":{
      "settlements":{
         "account_number": 7878780080310012,
         "ifsc_code":"RATN0VAAPIS",
         "beneficiary_name":"Gaurav Kumar"
      }
   },
   "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
{
   "error":{
      "code":"BAD_REQUEST_ERROR",
      "description":"Linked account does not exist",
      "source":"",
      "step":"",
      "reason":"linked_account_id_does_not_exist",
      "metadata":{
         
      }
   }
}
````

### Parameters

`account_id`
: `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.

### Parameters

`product_name` *mandatory*
: `string` The product(s) to be configured. Here it is `route`.

`tnc_accepted` *optional*
: `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.

### Parameters

`id`
: `string` The unique identifier of a product generated by Razorpay. This id is used to fetch or update a product.

`product_name`
: `string` The product(s) to be configured. Possible values:

* `Route`

`tnc_accepted`
: `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:

`id`
: `string` The unique identifier representing the acceptance of terms and conditions for a product by a user.

`accepted`
: `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.

`accepted_at`
: `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product.

`requested_configuration`
: `object` The configuration of the product requested by the user that is yet to be set as active.

`active_configuration`
: `object` The configuration of the product that has been set as active.

`settlements`
: `object` The Settlement settings object.

`account_number`
: `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, `7878780080310012`.

`ifsc_code`
: `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`.

`beneficiary_name`
: `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.

`requirements`
: `object` The list of requirements to be enabled for this product or some of the configurations under this product.

`field_reference`
: `string` The field which is in issue or missing. The JSON key path in resolution URL.

`resolution_url`
: `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents.

`status`
: `string` The status of the requirement.

`reason_code`
: `string` The reason code for showing in the requirement. Possible values are:

* `field_missing`
* `needs_clarification`
* `document_missing`

`id`
: `string` The unique identifier of the account generated by Razorpay. For example, `acc_prd_K1eopFF8G21tux`. The product is created for this account id.

`account_id`
: `string` The unique identifier generated by Razorpay. For example, `acc_K1em7bWYEiwmnc`.

`activation_status`
: `string` The status of the product activation.

* `requested`
* `needs_clarification`
* `under_review`
* `activated`
* `suspended`

`requested_at`
: `integer` The Unix timestamp at which the product configuration has been requested.

### Errors

Linked account does not exist.

* code: 400
* description: 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.

The product requested is invalid.

* code: 400
* description: This error occurs when the provided data is invalid.
* solution: Ensure to pass the valid data.

The selected tnc accepted is invalid.

* code: 400
* description: This error occurs when the `tnc.accepted` value is `false`.
* solution: Ensure to accept the tnc by passing the `accepted` value as `true`.
