API Test Keys

Fetch All Items

GET
/v1/items

Click to copy

Use this endpoint to retrieve the details of all the items created till date.

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/items/ \

Success

1
{
2
"entity": "collection",
3
"count": 2,
4
"items": [
5
{
6
"id": "item_JInaSLODeDUQiQ",
7
"active": true,
8
"name": "Book / English August",
9
"description": "A Malaysian story, Booker prize winner.",
10
"amount": 20000,
11
"unit_amount": 20000,
12
"currency": "MYR",
13
"type": "invoice",
14
"unit": null,
15
"tax_inclusive": false,
16
"hsn_code": null,
17
"sac_code": null,
18
"tax_rate": null,
19
"tax_id": null,
20
"tax_group_id": null,
21
"created_at": 1649843796
22
},
23
{
24
"id": "item_JIPSg5L06yhHie",
25
"active": false,
26
"name": "Book / Ignited Minds - Updated name!",
27
"description": "New descirption too. :).",
28
"amount": 20000,
29
"unit_amount": 20000,
30
"currency": "MYR",
31
"type": "invoice",
32
"unit": null,
33
"tax_inclusive": false,
34
"hsn_code": null,
35
"sac_code": null,
36
"tax_rate": null,
37
"tax_id": null,
38
"tax_group_id": null,
39
"created_at": 1649758835
40
}
41
]
42
}
Query Parameters
from
integer

Unix timestamp, in seconds, from when the items are to be fetched.

to
integer

Unix timestamp, in seconds, till when the items are to be fetched.

count
integer

Number of items to be fetched.

  • Default value: 10
  • Maximum value: 100
  • This can be used for pagination, in combination with the skip parameter.

skip
integer

Number of records to be skipped while fetching the items.

active
integer

Fetches number of active or inactive items.

  • The value is 1 for active items.
  • The value is 0 for inactive items.

Response Parameters
id
string

The unique identifier of the item.

active
boolean

Indicates the status of the item. Possible values:

  • true (default): Item is in the active state.
  • false: Item is in the inactive state.

name
string

The name of the item.

description
string

A text description about the item.

amount
integer

The price of the item.

unit_amount
integer

The per unit billing amount for each individual unit.

currency
string

The currency in which the amount should be charged.

type
string

Here, it must be invoice.

unit
integer

The number of units of the item billed in the invoice.

tax_inclusive
boolean

Indicates whether the base amount includes tax.

  • true: The base amount includes tax.
  • false: The base amount does not include tax. By default, the value is set to false.

hsn_code
integer

The 8-digit code used to classify the product as per the Harmonised System of Nomenclature.

sac_code
integer

The 6-digit code used to classify the service as per the Services Accounting Code.

tax_rate
string

The percentage at which an individual or a corporation is taxed.

tax_id
string

The identification number that gets displayed on invoices issued to the customer.

tax_group_id
string

The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules.

created_at
integer

Unix timestamp, at which the item was created. For example, 1649843796.

Fetch All Items

GET
/v1/items

Click to copy

Use this endpoint to retrieve the details of all the items created till date.

Is this page helpful?

Query Parameters
from
integer

Unix timestamp, in seconds, from when the items are to be fetched.

to
integer

Unix timestamp, in seconds, till when the items are to be fetched.

count
integer

Number of items to be fetched.

  • Default value: 10
  • Maximum value: 100
  • This can be used for pagination, in combination with the skip parameter.

skip
integer

Number of records to be skipped while fetching the items.

active
integer

Fetches number of active or inactive items.

  • The value is 1 for active items.
  • The value is 0 for inactive items.

Response Parameters
id
string

The unique identifier of the item.

active
boolean

Indicates the status of the item. Possible values:

  • true (default): Item is in the active state.
  • false: Item is in the inactive state.

name
string

The name of the item.

description
string

A text description about the item.

amount
integer

The price of the item.

unit_amount
integer

The per unit billing amount for each individual unit.

currency
string

The currency in which the amount should be charged.

type
string

Here, it must be invoice.

unit
integer

The number of units of the item billed in the invoice.

tax_inclusive
boolean

Indicates whether the base amount includes tax.

  • true: The base amount includes tax.
  • false: The base amount does not include tax. By default, the value is set to false.

hsn_code
integer

The 8-digit code used to classify the product as per the Harmonised System of Nomenclature.

sac_code
integer

The 6-digit code used to classify the service as per the Services Accounting Code.

tax_rate
string

The percentage at which an individual or a corporation is taxed.

tax_id
string

The identification number that gets displayed on invoices issued to the customer.

tax_group_id
string

The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules.

created_at
integer

Unix timestamp, at which the item was created. For example, 1649843796.

Curl

change language

change language

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

Success

1
{
2
"entity": "collection",
3
"count": 2,
4
"items": [
5
{
6
"id": "item_JInaSLODeDUQiQ",
7
"active": true,
8
"name": "Book / English August",
9
"description": "A Malaysian story, Booker prize winner.",
10
"amount": 20000,
11
"unit_amount": 20000,
12
"currency": "MYR",
13
"type": "invoice",
14
"unit": null,
15
"tax_inclusive": false,
16
"hsn_code": null,
17
"sac_code": null,
18
"tax_rate": null,
19
"tax_id": null,
20
"tax_group_id": null,
21
"created_at": 1649843796
22
},
23
{
24
"id": "item_JIPSg5L06yhHie",
25
"active": false,
26
"name": "Book / Ignited Minds - Updated name!",
27
"description": "New descirption too. :).",
28
"amount": 20000,
29
"unit_amount": 20000,
30
"currency": "MYR",
31
"type": "invoice",
32
"unit": null,
33
"tax_inclusive": false,
34
"hsn_code": null,
35
"sac_code": null,
36
"tax_rate": null,
37
"tax_id": null,
38
"tax_group_id": null,
39
"created_at": 1649758835
40
}
41
]
42
}