Create an Item
POST/v1/itemsClick to copy
Use this endpoint to create an item with basic details such as name and amount. After an item is created, it appears on the list of created items and in the drop-down menu at the time of invoice creation.
Is this page helpful?
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-H "Content-Type: application/json" \3-X POST https://api.razorpay.com/v1/items \4-d '{5"name":"Book / English August",6"description":"A Malaysian story, Booker prize winner.",7"amount": 20000,8"currency": ""9}'
Success
Failure
1{2"id": "item_JInaSLODeDUQiQ",3"active": true,4"name": "Book / English August",5"description": "A Malaysian story, Booker prize winner.",6"amount": 20000,7"unit_amount": 20000,8"currency": "",9"type": "invoice",10"unit": null,11"tax_inclusive": false,12"hsn_code": null,13"sac_code": null,14"tax_rate": null,15"tax_id": null,16"tax_group_id": null,17"created_at": 164984379618}
Request Parameters
name *
stringName of the item.
description stringA brief description about the item.
amount *
integerThe price of the item.
currency *
stringThe currency in which the amount should be charged.
Response Parameters
idstringThe unique identifier of the item.
activebooleanIndicates the status of the item. Possible values:
true(default): Item is in the active state.false: Item is in the inactive state.
namestringThe name of the item.
descriptionstringA text description about the item.
amountintegerThe price of the item.
unit_amountintegerThe per unit billing amount for each individual unit.
currencystringThe currency in which the amount should be charged.
typestring Here, it must be invoice.
unitintegerThe number of units of the item billed in the invoice.
tax_inclusivebooleanIndicates 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 tofalse.
hsn_codeintegerThe 8-digit code used to classify the product as per the Harmonised System of Nomenclature.
sac_codeintegerThe 6-digit code used to classify the service as per the Services Accounting Code.
tax_ratestringThe percentage at which an individual or a corporation is taxed.
tax_idstringThe identification number that gets displayed on invoices issued to the customer.
tax_group_idstringThe 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_atinteger Unix timestamp, at which the item was created. For example, 1649843796.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
The API credentials passed in the API call differ from the ones generated on the Dashboard.
- Different keys for test mode and live modes.
- Expired API key.
Solution
The currency field is required.
Error Status: 400
The currency field is blank.
Solution
The merchant doesn't have international activated
Error Status: 400
This happens when an international currency code is added.
Solution
The amount must be atleast INR 1.00
Error Status: 400
This happens when the amount added in the amount field is less than INR 1.
Solution
Create an Item
POST/v1/itemsClick to copy
Use this endpoint to create an item with basic details such as name and amount. After an item is created, it appears on the list of created items and in the drop-down menu at the time of invoice creation.
Is this page helpful?
Request Parameters
name *
stringName of the item.
description stringA brief description about the item.
amount *
integerThe price of the item.
currency *
stringThe currency in which the amount should be charged.
Response Parameters
idstringThe unique identifier of the item.
activebooleanIndicates the status of the item. Possible values:
true(default): Item is in the active state.false: Item is in the inactive state.
namestringThe name of the item.
descriptionstringA text description about the item.
amountintegerThe price of the item.
unit_amountintegerThe per unit billing amount for each individual unit.
currencystringThe currency in which the amount should be charged.
typestring Here, it must be invoice.
unitintegerThe number of units of the item billed in the invoice.
tax_inclusivebooleanIndicates 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 tofalse.
hsn_codeintegerThe 8-digit code used to classify the product as per the Harmonised System of Nomenclature.
sac_codeintegerThe 6-digit code used to classify the service as per the Services Accounting Code.
tax_ratestringThe percentage at which an individual or a corporation is taxed.
tax_idstringThe identification number that gets displayed on invoices issued to the customer.
tax_group_idstringThe 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_atinteger Unix timestamp, at which the item was created. For example, 1649843796.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
The API credentials passed in the API call differ from the ones generated on the Dashboard.
- Different keys for test mode and live modes.
- Expired API key.
Solution
The currency field is required.
Error Status: 400
The currency field is blank.
Solution
The merchant doesn't have international activated
Error Status: 400
This happens when an international currency code is added.
Solution
The amount must be atleast INR 1.00
Error Status: 400
This happens when the amount added in the amount field is less than INR 1.
Solution
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-H "Content-Type: application/json" \3-X POST https://api.razorpay.com/v1/items \4-d '{5"name":"Book / English August",6"description":"A Malaysian story, Booker prize winner.",7"amount": 20000,8"currency": ""9}'
Success
Failure
1{2"id": "item_JInaSLODeDUQiQ",3"active": true,4"name": "Book / English August",5"description": "A Malaysian story, Booker prize winner.",6"amount": 20000,7"unit_amount": 20000,8"currency": "",9"type": "invoice",10"unit": null,11"tax_inclusive": false,12"hsn_code": null,13"sac_code": null,14"tax_rate": null,15"tax_id": null,16"tax_group_id": null,17"created_at": 164984379618}