API Test keys

API Test keys

Fetch an Add-on With ID

GET
/v1/addons/:id

Click to copy

Use this endpoint to retrieve an Add-on by its unique identifier.

Is this page helpful?

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X GET https://api.razorpay.com/v1/addons/ao_00000000000001 \

Success

1
{
2
"id":"ao_00000000000001",
3
"entity":"addon",
4
"item":{
5
"id":"item_00000000000001",
6
"active":true,
7
"name":"Extra appala (papadum)",
8
"description":"1 extra oil fried appala with meals",
9
"amount":30000,
10
"unit_amount":30000,
11
"currency":"INR",
12
"type":"addon",
13
"unit":null,
14
"tax_inclusive":false,
15
"hsn_code":null,
16
"sac_code":null,
17
"tax_rate":null,
18
"tax_id":null,
19
"tax_group_id":null,
20
"created_at":1581597318,
21
"updated_at":1581597318
22
},
23
"quantity":2,
24
"created_at":1581597318,
25
"subscription_id":"sub_00000000000001",
26
"invoice_id":null
27
}
Path Parameters
id

*

string

The unique identifier of an add-on. For example, ao_00000000000001.

Response Parameters
id
string

The unique identifier of the created add-on. For example, ao_00000000000001.

item
object

Details of the add-on created.

Show child parameters (7)

quantity
integer

This specifies the number of units of the add-on to be charged to the customer. For example, 2. The total amount is calculated as amount * quantity.

created_at
integer

The timestamp, in Unix format, when the add-on was created. For example, 1581597318.

subscription_id
string

The unique identifier of the subscription to which the add-on is being added. For example, sub_00000000000001.

invoice_id
string

The add-on is added to the next invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is null. Once the add-on is linked to an invoice, it cannot be deleted.

Fetch an Add-on With ID

GET
/v1/addons/:id

Click to copy

Use this endpoint to retrieve an Add-on by its unique identifier.

Is this page helpful?

Path Parameters
id

*

string

The unique identifier of an add-on. For example, ao_00000000000001.

Response Parameters
id
string

The unique identifier of the created add-on. For example, ao_00000000000001.

item
object

Details of the add-on created.

Show child parameters (7)

quantity
integer

This specifies the number of units of the add-on to be charged to the customer. For example, 2. The total amount is calculated as amount * quantity.

created_at
integer

The timestamp, in Unix format, when the add-on was created. For example, 1581597318.

subscription_id
string

The unique identifier of the subscription to which the add-on is being added. For example, sub_00000000000001.

invoice_id
string

The add-on is added to the next invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is null. Once the add-on is linked to an invoice, it cannot be deleted.

Curl

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X GET https://api.razorpay.com/v1/addons/ao_00000000000001 \

Success

1
{
2
"id":"ao_00000000000001",
3
"entity":"addon",
4
"item":{
5
"id":"item_00000000000001",
6
"active":true,
7
"name":"Extra appala (papadum)",
8
"description":"1 extra oil fried appala with meals",
9
"amount":30000,
10
"unit_amount":30000,
11
"currency":"INR",
12
"type":"addon",
13
"unit":null,
14
"tax_inclusive":false,
15
"hsn_code":null,
16
"sac_code":null,
17
"tax_rate":null,
18
"tax_id":null,
19
"tax_group_id":null,
20
"created_at":1581597318,
21
"updated_at":1581597318
22
},
23
"quantity":2,
24
"created_at":1581597318,
25
"subscription_id":"sub_00000000000001",
26
"invoice_id":null
27
}