Fetch All Add-ons
GET
/v1/addons/
Click to copy
Use this endpoint to retrieve all created add-ons.
Is this page helpful?
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/addons \
Success
Failure
1{2"entity":"collection",3"count":2,4"items":[5{6"id":"ao_00000000000002",7"entity":"addon",8"item":{9"id":"item_00000000000002",10"active":true,11"name":"Extra sweet",12"description":"1 extra sweet of the day with meals",13"amount":90000,14"unit_amount":90000,15"currency":"MYR",16"type":"addon",17"unit":null,18"tax_inclusive":false,19"hsn_code":null,20"sac_code":null,21"tax_rate":null,22"tax_id":null,23"tax_group_id":null,24"created_at":1581597318,25"updated_at":158159731826},27"quantity":1,28"created_at":1581597318,29"subscription_id":"sub_00000000000001",30"invoice_id":"inv_00000000000001"31},32{33"id":"ao_00000000000001",34"entity":"addon",35"item":{36"id":"item_00000000000001",37"active":true,38"name":"Extra appala (papadum)",39"description":"1 extra oil fried appala with meals",40"amount":30000,41"unit_amount":30000,42"currency":"MYR",43"type":"addon",44"unit":null,45"tax_inclusive":false,46"hsn_code":null,47"sac_code":null,48"tax_rate":null,49"tax_id":null,50"tax_group_id":null,51"created_at":1581597318,52"updated_at":158159731853},54"quantity":2,55"created_at":1581597318,56"subscription_id":"sub_00000000000001",57"invoice_id":null58}59]60}
Query Parameters
from
integer
The Unix timestamp from when add-ons are to be fetched.
to
integer
The Unix timestamp till when add-ons are to be fetched.
count
integer
The number of add-ons to be fetched. Default value is 10
. Maximum value is 100
. This can be used for pagination, in combination with skip
.
skip
integer
The number of add-ons to be skipped. Default value is 0
. This can be used for pagination, in combination with count
.
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.
Errors
The API key/secret provided is invalid.
Error Status: 4xx
This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the dashboard.
Solution
Fetch All Add-ons
GET
/v1/addons/
Click to copy
Use this endpoint to retrieve all created add-ons.
Is this page helpful?
Query Parameters
from
integer
The Unix timestamp from when add-ons are to be fetched.
to
integer
The Unix timestamp till when add-ons are to be fetched.
count
integer
The number of add-ons to be fetched. Default value is 10
. Maximum value is 100
. This can be used for pagination, in combination with skip
.
skip
integer
The number of add-ons to be skipped. Default value is 0
. This can be used for pagination, in combination with count
.
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.
Errors
The API key/secret provided is invalid.
Error Status: 4xx
This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the dashboard.
Solution
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/addons \
Success
Failure
1{2"entity":"collection",3"count":2,4"items":[5{6"id":"ao_00000000000002",7"entity":"addon",8"item":{9"id":"item_00000000000002",10"active":true,11"name":"Extra sweet",12"description":"1 extra sweet of the day with meals",13"amount":90000,14"unit_amount":90000,15"currency":"MYR",16"type":"addon",17"unit":null,18"tax_inclusive":false,19"hsn_code":null,20"sac_code":null,21"tax_rate":null,22"tax_id":null,23"tax_group_id":null,24"created_at":1581597318,25"updated_at":158159731826},27"quantity":1,28"created_at":1581597318,29"subscription_id":"sub_00000000000001",30"invoice_id":"inv_00000000000001"31},32{33"id":"ao_00000000000001",34"entity":"addon",35"item":{36"id":"item_00000000000001",37"active":true,38"name":"Extra appala (papadum)",39"description":"1 extra oil fried appala with meals",40"amount":30000,41"unit_amount":30000,42"currency":"MYR",43"type":"addon",44"unit":null,45"tax_inclusive":false,46"hsn_code":null,47"sac_code":null,48"tax_rate":null,49"tax_id":null,50"tax_group_id":null,51"created_at":1581597318,52"updated_at":158159731853},54"quantity":2,55"created_at":1581597318,56"subscription_id":"sub_00000000000001",57"invoice_id":null58}59]60}