Create a Bill
POST/v1/billsClick to copy
Use this endpoint to create a Bill.
Is this page helpful?
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X POST https://api.razorpay.com/v1/bills3-d '{4"store_code": "JK-001",5"business_type": "retail",6"business_category": "retail_and_consumer_goods",7"customer": {8"contact": "9876543210",9"name": "Gaurav Kumar"10},11"order_service_type": "dine_in",12"order_number": "ORD212",13"receipt_timestamp": 1722664800,14"receipt_number": "INV001250010",15"receipt_type": "tax_invoice",16"receipt_delivery": "digital",17"tags": ["noise cancelling", "limited edition"],18"qr_code_number": "T2322 00000009291",19"bar_code_number": "3412",20"billing_pos_number": "bn",21"pos_category": "traditional_pos",22"receipt_summary": {23"total_quantity": 2,24"sub_total_amount": 150000,25"total_tax_amount": 37500,26"total_tax_percent": 25,27"currency": "INR",28"net_payable_amount": 187500,29"additional_charges": [30{31"description": "alteration charge",32"amount": 200033},34{35"description": "cash on delivery",36"amount": 200037},38],39"payment_status": "success",40"change_amount": 0,41"roundup_amount": 0,42"total_discount_percent": 0,43"total_discount_amount": 0,44"discounts": [45{46"name": "none",47"amount": 0,48"percent": 1049}50],51"used_wallet_amount": 052},53"taxes": [54{55"name": "CGST",56"percentage": 10,57"amount": 1500058},59{60"name": "SGST",61"percentage": 10,62"amount": 1500063},64{65"name": "cess",66"percentage": 5,67"amount": 750068}69],70"line_items": [71{72"name": "Acme Soap",73"quantity": 1,74"unit_amount": 10000,75"employee_id": "1234",76"unit": "pc",77"tags": ["noise cancelling", "limited edition"],78"sub_items": [79{80"name": "Advanced Edition",81"quantity": 1,82"unit_amount": 0,83"employee_id": "1234",84"total_amount" : 1000,85"unit": "pc"86}87],88"hsn_code": "HC2000INCLT",89"product_code": "DRCO38",90"total_amount": 10000,91"taxes": [92{93"name": "CGST",94"percentage": 10,95"amount": 100096},97{98"name": "SGST",99"percentage": 10,100"amount": 1000101}102]103},104{105"name": "Acme Earphones",106"quantity": 1,107"unit_amount": 80000,108"unit": "pc",109"hsn_code": "HC2000INPPLT",110"product_code": "POPLT281",111"total_amount": 80000,112"taxes": [113{114"name": "CGST",115"percentage": 10,116"amount": 8000117},118{119"name": "SGST",120"percentage": 10,121"amount": 8000122}123]124}125],126"payments": [127{128"method": "paytm",129"currency": "INR",130"amount": 90000,131"payment_reference_id": "",132"financier_data": {133"reference": "",134"name": "v"135}136}137]138}'
Success - Retail
Success - Food & Beverage
Success - Events
Failure
1{2"id": "bill_PYamApGCFTAjkh",3"business_type": "retail",4"business_category": "retail_and_consumer_goods",5"customer": {6"contact": "9876543210",7"name": "Gaurav Kumar",8"email": "",9"customer_id": "",10"date_of_birth": "",11"profession": "",12"company_name": "",13"marital_status": "",14"spouse_name": "",15"anniversary_date": "",16"gender": "",17"gstin": "",18"billing_address": null,19"shipping_address": null20},21"loyalty": null,22"store_code": "JK-001",23"receipt_timestamp": 1722664800,24"receipt_number": "INV001250013",25"receipt_type": "tax_invoice",26"receipt_delivery": "digital",27"bar_code_number": "3412",28"qr_code_number": "T2322 00000009291",29"billing_pos_number": "bn",30"pos_category": "traditional_pos",31"order_number": "ORD213",32"order_service_type": "",33"delivery_status_url": "",34"line_items": [35{36"name": "Acme Soap",37"quantity": 1,38"unit_amount": 10000,39"employee_id": "1234",40"unit": "pc",41"description": "",42"hsn_code": "HC2000INCLT",43"product_code": "DRCO38",44"product_uid": "",45"image_url": "",46"total_amount": 10000,47"brand": "",48"style": "",49"colour": "",50"size": "",51"financier_data": null,52"taxes": [53{54"name": "CGST",55"percentage": 10,56"amount": 100057},58{59"name": "SGST",60"percentage": 10,61"amount": 100062}63],64"tags": [65"noise cancelling",66"limited edition"67],68"sub_items": [69{70"name": "Advanced Edition",71"quantity": 1,72"unit_amount": 0,73"employee_id": "1234",74"unit": "pc",75"description": "",76"hsn_code": "",77"product_code": "",78"product_uid": "",79"image_url": "",80"total_amount": 10,81"brand": "",82"style": "",83"colour": "",84"size": "",85"taxes": [],86"tags": []87}88]89},90{91"name": "Acme Earphones",92"quantity": 1,93"unit_amount": 80000,94"employee_id": "1234",95"unit": "pc",96"description": "",97"hsn_code": "HC2000INPPLT",98"product_code": "POPLT281",99"product_uid": "",100"image_url": "",101"total_amount": 80000,102"brand": "",103"style": "",104"colour": "",105"size": "",106"financier_data": null,107"taxes": [108{109"name": "CGST",110"percentage": 10,111"amount": 8000112},113{114"name": "SGST",115"percentage": 10,116"amount": 8000117}118],119"tags": [],120"sub_items": []121}122],123"receipt_summary": {124"total_quantity": 2,125"sub_total_amount": 150000,126"currency": "INR",127"net_payable_amount": 187500,128"additional_charges": [129{130"description": "alteration charge",131"amount": 2000132},133{134"description": "cash on delivery",135"amount": 2000136},137],138"payment_status": "success",139"delivery_charges": 0,140"cod_charges": 0,141"change_amount": 0,142"roundup_amount": 0,143"total_discount_percent": 0,144"total_discount_amount": 0,145"discounts": [146{147"name": "none",148"amount": 0,149"percent": 10150}151],152"used_wallet_amount": 0,153"total_tax_amount": 37500,154"total_tax_percent": 25155},156"taxes": [157{158"name": "CGST",159"percentage": 10,160"amount": 150161},162{163"name": "SGST",164"percentage": 10,165"amount": 150166},167{168"name": "cess",169"percentage": 5,170"amount": 75171}172],173"payments": [174{175"method": "paytm",176"currency": "INR",177"amount": 90000,178"payment_reference_id": "",179"financier_data": {180"reference": "",181"name": "v"182}183}184],185"event": null,186"receipt_url": "yourbill.me/PYamApGCFTAjkh",187"created_at": 1722664800,188"tags": [189"noise cancelling",190"limited edition"191]192}
Request Parameters
store_code stringAssociated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you.
business_type *
stringThe type of business. Possible values:
ecommerceretail
business_category *
stringThe category the business falls under. Possible values:
eventsfood_and_beveragesretail_and_consumer_goodsother_services
customer object Details of the customer. Required if receipt mode is digital or digital_and_print.
Show child parameters (16)
employee objectThis is an array of objects containing details of the employees associated with the receipt.
Show child parameters (3)
loyalty objectCustomer loyalty details.
Show child parameters (9)
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_number *
stringUnique receipt number generated for the bill.
receipt_type *
stringThe type of receipt. Possible values:
tax_invoicesales_invoicesales_return_invoiceproforma_invoicecredit_invoicepurchase_invoicedebit_invoiceorder_confirmation
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
digitalprintdigital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
bar_code_number stringBar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number stringQR code generated after the transaction. This will be displayed on the digital bill only.
billing_pos_number string POS number of the machine that generated the bill. This is applicable if business_type is retail.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
traditional_poskiosk_pos
order_number stringIncremental order number of the generated bill.
order_service_type string Order service type of the generated bill. This is applicable if business_category is food_and_beverages. Possible values:
dine_intake_away
delivery_status_url string Order delivery status. This is applicable if business_type is ecommerce.
line_items object This is an array of objects containing the product data of the bill. Required if receipt_type is not credit_invoice or debit_invoice.
Show child parameters (22)
receipt_summary *
objectDetails of the receipt.
Show child parameters (14)
taxes object This is an array of objects containing the details of the taxes applied. Required if receipt_type is tax_inovice, purchase_invoice or sales_invoice.
Show child parameters (3)
payments *
objectThis is an array of objects containing the details of the payment.
Show child parameters (5)
event object Details of the event booking. Required if business_category is events.
Show child parameters (6)
irn object This object contains IRN ( Invoice Reference Number ) related details. If irn is present,
qr_code and irn_number are required.
Show child parameters (4)
Response Parameters
id *
stringUnique id of the bill generated.
business_type *
stringThe type of business. Possible values:
ecommerceretail
business_category *
stringThe category the business falls under. Possible values:
eventsfood_and_beveragesretail_and_consumer_goodsother_services
customer object Details of the customer. Required if receipt mode is digital or digital_and_print.
Show child parameters (16)
loyalty objectCustomer loyalty details.
Show child parameters (9)
store_code stringAssociated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you.
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_number *
stringUnique receipt number generated for the bill.
receipt_type *
stringThe type of receipt. Possible values:
tax_invoicesales_invoicesales_return_invoiceproforma_invoicecredit_invoicepurchase_invoicedebit_invoiceorder_confirmation
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
digitalprintdigital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
bar_code_number integerBar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number integerQR code generated after the transaction. This will be displayed on the digital bill only.
billing_pos_number string POS number of the machine that generated the bill. This is applicable if business_type is retail.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
traditional_poskiosk_pos
order_number stringIncremental order number of the generated bill.
order_service_type string Order service type of the generated bill. This is applicable if business_category is food_and_beverages. Possible values:
dine_intake_away
delivery_status_url string Order delivery status. This is applicable if business_type is ecommerce.
line_items object This is an array of objects containing the product data of the bill. Required if receipt_type is not credit_invoice or debit_invoice.
Show child parameters (17)
receipt_summary *
objectDetails of the receipt.
Show child parameters (14)
taxes object This is an array of objects containing the details of the taxes applied. Required if receipt_type is tax_inovice, purchase_invoice or sales_invoice.
Show child parameters (3)
payments *
objectDetails of the payment.
Show child parameters (5)
event object Details of the event booking. Required if business_category is events.
Show child parameters (6)
receipt_urlstringThe link to the receipt.
created_atintegerUNIX timestamp of the date when the bill was generated.
Errors
client not authorised to update
Error Status: 401
The client credentials are unauthorised to make changes to this bill.
Solution
The quantity must be an integer
Error Status: 400
The quantity of the product was not written in integer format.
Solution
Operation failed
Error Status: 500
There is an internal server error
Solution
Create a Bill
POST/v1/billsClick to copy
Use this endpoint to create a Bill.
Is this page helpful?
Request Parameters
store_code stringAssociated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you.
business_type *
stringThe type of business. Possible values:
ecommerceretail
business_category *
stringThe category the business falls under. Possible values:
eventsfood_and_beveragesretail_and_consumer_goodsother_services
customer object Details of the customer. Required if receipt mode is digital or digital_and_print.
Show child parameters (16)
employee objectThis is an array of objects containing details of the employees associated with the receipt.
Show child parameters (3)
loyalty objectCustomer loyalty details.
Show child parameters (9)
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_number *
stringUnique receipt number generated for the bill.
receipt_type *
stringThe type of receipt. Possible values:
tax_invoicesales_invoicesales_return_invoiceproforma_invoicecredit_invoicepurchase_invoicedebit_invoiceorder_confirmation
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
digitalprintdigital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
bar_code_number stringBar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number stringQR code generated after the transaction. This will be displayed on the digital bill only.
billing_pos_number string POS number of the machine that generated the bill. This is applicable if business_type is retail.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
traditional_poskiosk_pos
order_number stringIncremental order number of the generated bill.
order_service_type string Order service type of the generated bill. This is applicable if business_category is food_and_beverages. Possible values:
dine_intake_away
delivery_status_url string Order delivery status. This is applicable if business_type is ecommerce.
line_items object This is an array of objects containing the product data of the bill. Required if receipt_type is not credit_invoice or debit_invoice.
Show child parameters (22)
receipt_summary *
objectDetails of the receipt.
Show child parameters (14)
taxes object This is an array of objects containing the details of the taxes applied. Required if receipt_type is tax_inovice, purchase_invoice or sales_invoice.
Show child parameters (3)
payments *
objectThis is an array of objects containing the details of the payment.
Show child parameters (5)
event object Details of the event booking. Required if business_category is events.
Show child parameters (6)
irn object This object contains IRN ( Invoice Reference Number ) related details. If irn is present,
qr_code and irn_number are required.
Show child parameters (4)
Response Parameters
id *
stringUnique id of the bill generated.
business_type *
stringThe type of business. Possible values:
ecommerceretail
business_category *
stringThe category the business falls under. Possible values:
eventsfood_and_beveragesretail_and_consumer_goodsother_services
customer object Details of the customer. Required if receipt mode is digital or digital_and_print.
Show child parameters (16)
loyalty objectCustomer loyalty details.
Show child parameters (9)
store_code stringAssociated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you.
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_number *
stringUnique receipt number generated for the bill.
receipt_type *
stringThe type of receipt. Possible values:
tax_invoicesales_invoicesales_return_invoiceproforma_invoicecredit_invoicepurchase_invoicedebit_invoiceorder_confirmation
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
digitalprintdigital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
bar_code_number integerBar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number integerQR code generated after the transaction. This will be displayed on the digital bill only.
billing_pos_number string POS number of the machine that generated the bill. This is applicable if business_type is retail.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
traditional_poskiosk_pos
order_number stringIncremental order number of the generated bill.
order_service_type string Order service type of the generated bill. This is applicable if business_category is food_and_beverages. Possible values:
dine_intake_away
delivery_status_url string Order delivery status. This is applicable if business_type is ecommerce.
line_items object This is an array of objects containing the product data of the bill. Required if receipt_type is not credit_invoice or debit_invoice.
Show child parameters (17)
receipt_summary *
objectDetails of the receipt.
Show child parameters (14)
taxes object This is an array of objects containing the details of the taxes applied. Required if receipt_type is tax_inovice, purchase_invoice or sales_invoice.
Show child parameters (3)
payments *
objectDetails of the payment.
Show child parameters (5)
event object Details of the event booking. Required if business_category is events.
Show child parameters (6)
receipt_urlstringThe link to the receipt.
created_atintegerUNIX timestamp of the date when the bill was generated.
Errors
client not authorised to update
Error Status: 401
The client credentials are unauthorised to make changes to this bill.
Solution
The quantity must be an integer
Error Status: 400
The quantity of the product was not written in integer format.
Solution
Operation failed
Error Status: 500
There is an internal server error
Solution
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X POST https://api.razorpay.com/v1/bills3-d '{4"store_code": "JK-001",5"business_type": "retail",6"business_category": "retail_and_consumer_goods",7"customer": {8"contact": "9876543210",9"name": "Gaurav Kumar"10},11"order_service_type": "dine_in",12"order_number": "ORD212",13"receipt_timestamp": 1722664800,14"receipt_number": "INV001250010",15"receipt_type": "tax_invoice",16"receipt_delivery": "digital",17"tags": ["noise cancelling", "limited edition"],18"qr_code_number": "T2322 00000009291",19"bar_code_number": "3412",20"billing_pos_number": "bn",21"pos_category": "traditional_pos",22"receipt_summary": {23"total_quantity": 2,24"sub_total_amount": 150000,25"total_tax_amount": 37500,26"total_tax_percent": 25,27"currency": "INR",28"net_payable_amount": 187500,29"additional_charges": [30{31"description": "alteration charge",32"amount": 200033},34{35"description": "cash on delivery",36"amount": 200037},38],39"payment_status": "success",40"change_amount": 0,41"roundup_amount": 0,42"total_discount_percent": 0,43"total_discount_amount": 0,44"discounts": [45{46"name": "none",47"amount": 0,48"percent": 1049}50],51"used_wallet_amount": 052},53"taxes": [54{55"name": "CGST",56"percentage": 10,57"amount": 1500058},59{60"name": "SGST",61"percentage": 10,62"amount": 1500063},64{65"name": "cess",66"percentage": 5,67"amount": 750068}69],70"line_items": [71{72"name": "Acme Soap",73"quantity": 1,74"unit_amount": 10000,75"employee_id": "1234",76"unit": "pc",77"tags": ["noise cancelling", "limited edition"],78"sub_items": [79{80"name": "Advanced Edition",81"quantity": 1,82"unit_amount": 0,83"employee_id": "1234",84"total_amount" : 1000,85"unit": "pc"86}87],88"hsn_code": "HC2000INCLT",89"product_code": "DRCO38",90"total_amount": 10000,91"taxes": [92{93"name": "CGST",94"percentage": 10,95"amount": 100096},97{98"name": "SGST",99"percentage": 10,100"amount": 1000101}102]103},104{105"name": "Acme Earphones",106"quantity": 1,107"unit_amount": 80000,108"unit": "pc",109"hsn_code": "HC2000INPPLT",110"product_code": "POPLT281",111"total_amount": 80000,112"taxes": [113{114"name": "CGST",115"percentage": 10,116"amount": 8000117},118{119"name": "SGST",120"percentage": 10,121"amount": 8000122}123]124}125],126"payments": [127{128"method": "paytm",129"currency": "INR",130"amount": 90000,131"payment_reference_id": "",132"financier_data": {133"reference": "",134"name": "v"135}136}137]138}'
Success - Retail
Success - Food & Beverage
Success - Events
Failure
1{2"id": "bill_PYamApGCFTAjkh",3"business_type": "retail",4"business_category": "retail_and_consumer_goods",5"customer": {6"contact": "9876543210",7"name": "Gaurav Kumar",8"email": "",9"customer_id": "",10"date_of_birth": "",11"profession": "",12"company_name": "",13"marital_status": "",14"spouse_name": "",15"anniversary_date": "",16"gender": "",17"gstin": "",18"billing_address": null,19"shipping_address": null20},21"loyalty": null,22"store_code": "JK-001",23"receipt_timestamp": 1722664800,24"receipt_number": "INV001250013",25"receipt_type": "tax_invoice",26"receipt_delivery": "digital",27"bar_code_number": "3412",28"qr_code_number": "T2322 00000009291",29"billing_pos_number": "bn",30"pos_category": "traditional_pos",31"order_number": "ORD213",32"order_service_type": "",33"delivery_status_url": "",34"line_items": [35{36"name": "Acme Soap",37"quantity": 1,38"unit_amount": 10000,39"employee_id": "1234",40"unit": "pc",41"description": "",42"hsn_code": "HC2000INCLT",43"product_code": "DRCO38",44"product_uid": "",45"image_url": "",46"total_amount": 10000,47"brand": "",48"style": "",49"colour": "",50"size": "",51"financier_data": null,52"taxes": [53{54"name": "CGST",55"percentage": 10,56"amount": 100057},58{59"name": "SGST",60"percentage": 10,61"amount": 100062}63],64"tags": [65"noise cancelling",66"limited edition"67],68"sub_items": [69{70"name": "Advanced Edition",71"quantity": 1,72"unit_amount": 0,73"employee_id": "1234",74"unit": "pc",75"description": "",76"hsn_code": "",77"product_code": "",78"product_uid": "",79"image_url": "",80"total_amount": 10,81"brand": "",82"style": "",83"colour": "",84"size": "",85"taxes": [],86"tags": []87}88]89},90{91"name": "Acme Earphones",92"quantity": 1,93"unit_amount": 80000,94"employee_id": "1234",95"unit": "pc",96"description": "",97"hsn_code": "HC2000INPPLT",98"product_code": "POPLT281",99"product_uid": "",100"image_url": "",101"total_amount": 80000,102"brand": "",103"style": "",104"colour": "",105"size": "",106"financier_data": null,107"taxes": [108{109"name": "CGST",110"percentage": 10,111"amount": 8000112},113{114"name": "SGST",115"percentage": 10,116"amount": 8000117}118],119"tags": [],120"sub_items": []121}122],123"receipt_summary": {124"total_quantity": 2,125"sub_total_amount": 150000,126"currency": "INR",127"net_payable_amount": 187500,128"additional_charges": [129{130"description": "alteration charge",131"amount": 2000132},133{134"description": "cash on delivery",135"amount": 2000136},137],138"payment_status": "success",139"delivery_charges": 0,140"cod_charges": 0,141"change_amount": 0,142"roundup_amount": 0,143"total_discount_percent": 0,144"total_discount_amount": 0,145"discounts": [146{147"name": "none",148"amount": 0,149"percent": 10150}151],152"used_wallet_amount": 0,153"total_tax_amount": 37500,154"total_tax_percent": 25155},156"taxes": [157{158"name": "CGST",159"percentage": 10,160"amount": 150161},162{163"name": "SGST",164"percentage": 10,165"amount": 150166},167{168"name": "cess",169"percentage": 5,170"amount": 75171}172],173"payments": [174{175"method": "paytm",176"currency": "INR",177"amount": 90000,178"payment_reference_id": "",179"financier_data": {180"reference": "",181"name": "v"182}183}184],185"event": null,186"receipt_url": "yourbill.me/PYamApGCFTAjkh",187"created_at": 1722664800,188"tags": [189"noise cancelling",190"limited edition"191]192}