Update a Bill
PATCH/v1/bills/:bill_idClick to copy
Use this endpoint to update a Bill.
Is this page helpful?
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X PATCH https://api.razorpay.com/v1/bills/bill_4a5e9ulyzk1mk23-d '{4"store_code": "",5"customer": {6"contact": "9000090001",7"email": "saurav.kumar@example.com"8},9"receipt_type": "tax_invoice",10"receipt_timestamp": 1907416999,11"receipt_delivery": "digital",12"line_items": [13{14"name": "T-Shirt",15"quantity": 1,16"employee_id": "1234",17"total_amount": 10000018}19],20"receipt_summary": {21"total_quantity": 1,22"sub_total_amount": 100000,23"currency": "INR",24"net_payable_amount": 124000,25"additional_charges": [26{27"description": "alteration charge",28"amount": 200029},30{31"description": "cash on delivery",32"amount": 200033},34],35"payment_status": "paid"36},37"taxes": [38{39"name": "cgst",40"percentage": 1200,41"amount": 1200042},43{44"name": "sgst",45"percentage": 1200,46"amount": 1200047}48],49"payments": [50{51"method": "Bank Transfer",52"amount": 124000,53"currency": "INR"54}55]56}'
Success
1{2"id": "bill_PYy4RWJWiNcPyE",3"business_type": "retail",4"business_category": "events",5"customer": {6"contact": "9000090001",7"name": "d",8"email": "saurav.kumar@example.com",9"customer_id": "",10"age": 2,11"date_of_birth": "",12"profession": "",13"company_name": "",14"marital_status": "",15"spouse_name": "",16"anniversary_date": "",17"gender": "",18"gstin": "",19"billing_address": {20"address_line_1": "",21"address_line_2": "",22"landmark": "",23"city": "",24"province": "",25"pin_code": "",26"country": ""27},28"shipping_address": {29"address_line_1": "",30"address_line_2": "",31"landmark": "",32"city": "",33"province": "",34"pin_code": "",35"country": ""36}37},38"loyalty": {39"type": "",40"card_num": "",41"card_holder_name": "",42"points_redeemed": 143},44"store_code": "JK-001",45"receipt_timestamp": 1907416999,46"receipt_number": "INV00124992",47"receipt_type": "tax_invoice",48"receipt_delivery": "digital",49"bar_code_number": "",50"qr_code_number": "T2322 00000009291",51"billing_pos_number": "bn",52"pos_category": "traditional_pos",53"order_number": "",54"order_service_type": "",55"delivery_status_url": "",56"line_items": [57{58"name": "T-Shirt",59"quantity": 1,60"unit": "",61"employee_id": "1234",62"description": "",63"hsn_code": "",64"product_code": "",65"product_uid": "",66"image_url": "",67"total_amount": 100000,68"brand": "",69"style": "",70"colour": "",71"size": "",72"financier_data": null,73"taxes": [],74"tags": [],75"sub_items": []76}77],78"receipt_summary": {79"total_quantity": 1,80"sub_total_amount": 100000,81"currency": "INR",82"net_payable_amount": 124000,83"additional_charges": [84{85"description": "alteration charge",86"amount": 200087},88{89"description": "cash on delivery",90"amount": 200091},92],93"payment_status": "paid",94"discounts": []95},96"taxes": [97{98"name": "cgst",99"percentage": 1200,100"amount": 120101},102{103"name": "sgst",104"percentage": 1200,105"amount": 120106}107],108"payments": [109{110"method": "Bank Transfer",111"currency": "INR",112"amount": 124000,113"payment_reference_id": "",114"financier_data": null115}116],117"event": {118"name": "My Party",119"start_timestamp": 1722911400,120"end_timestamp": 1722924000,121"location": "B-wing",122"room": "Auditorium 1",123"seats": [124"gold b1",125"gold b2",126"gold b3"127]128},129"receipt_url": "yourbill.me/PYy4RWJWiNcPyE",130"created_at": 1907416999,131"tags": [132"party1",133"graduation"134]135}
Path Parameters
id *
stringThe unique identifier of the Bill.
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.
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_type *
stringThe type of receipt. Possible values:
- tax_invoice
- sales_invoice
- sales_return_invoice
- proforma_invoice
- credit_invoice
- purchase_invoice
- debit_invoice
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
- digital
- print
- digital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
- traditional_pos
- kiosk_pos
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 objectThis is an array of objects containing the details of the taxes incurred.
Show child parameters (3)
payments *
objectThis is an array of objects containing the details of the payment.
Show child parameters (3)
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:
- ecommerce
- retail
business_category *
stringThe category the business falls under. Possible values:
- events
- food_and_beverages
- retail_and_consumer_goods
- other_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_invoice
- sales_invoice
- sales_return_invoice
- proforma_invoice
- credit_invoice
- purchase_invoice
- debit_invoice
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
- digital
- print
- digital_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_pos
- kiosk_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_in
- take_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 (18)
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: 400
There is an internal server error.
Solution
Bill not found for given receipt_number
Error Status: 400
The bill id is incorrect or deleted.
Solution
Update a Bill
PATCH/v1/bills/:bill_idClick to copy
Use this endpoint to update a Bill.
Is this page helpful?
Path Parameters
id *
stringThe unique identifier of the Bill.
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.
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_type *
stringThe type of receipt. Possible values:
- tax_invoice
- sales_invoice
- sales_return_invoice
- proforma_invoice
- credit_invoice
- purchase_invoice
- debit_invoice
receipt_timestamp *
integerUNIX timestamp of the date and time when the receipt was generated.
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
- digital
- print
- digital_and_print
tags stringAn array of strings representing relevant tags associated with the invoice.
pos_category string The type of POS machine. This is applicable if business_type is retail. Possible values:
- traditional_pos
- kiosk_pos
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 objectThis is an array of objects containing the details of the taxes incurred.
Show child parameters (3)
payments *
objectThis is an array of objects containing the details of the payment.
Show child parameters (3)
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:
- ecommerce
- retail
business_category *
stringThe category the business falls under. Possible values:
- events
- food_and_beverages
- retail_and_consumer_goods
- other_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_invoice
- sales_invoice
- sales_return_invoice
- proforma_invoice
- credit_invoice
- purchase_invoice
- debit_invoice
receipt_delivery *
stringIndicates the delivery type of the receipt. Possible values:
- digital
- print
- digital_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_pos
- kiosk_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_in
- take_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 (18)
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: 400
There is an internal server error.
Solution
Bill not found for given receipt_number
Error Status: 400
The bill id is incorrect or deleted.
Solution
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X PATCH https://api.razorpay.com/v1/bills/bill_4a5e9ulyzk1mk23-d '{4"store_code": "",5"customer": {6"contact": "9000090001",7"email": "saurav.kumar@example.com"8},9"receipt_type": "tax_invoice",10"receipt_timestamp": 1907416999,11"receipt_delivery": "digital",12"line_items": [13{14"name": "T-Shirt",15"quantity": 1,16"employee_id": "1234",17"total_amount": 10000018}19],20"receipt_summary": {21"total_quantity": 1,22"sub_total_amount": 100000,23"currency": "INR",24"net_payable_amount": 124000,25"additional_charges": [26{27"description": "alteration charge",28"amount": 200029},30{31"description": "cash on delivery",32"amount": 200033},34],35"payment_status": "paid"36},37"taxes": [38{39"name": "cgst",40"percentage": 1200,41"amount": 1200042},43{44"name": "sgst",45"percentage": 1200,46"amount": 1200047}48],49"payments": [50{51"method": "Bank Transfer",52"amount": 124000,53"currency": "INR"54}55]56}'
Success
1{2"id": "bill_PYy4RWJWiNcPyE",3"business_type": "retail",4"business_category": "events",5"customer": {6"contact": "9000090001",7"name": "d",8"email": "saurav.kumar@example.com",9"customer_id": "",10"age": 2,11"date_of_birth": "",12"profession": "",13"company_name": "",14"marital_status": "",15"spouse_name": "",16"anniversary_date": "",17"gender": "",18"gstin": "",19"billing_address": {20"address_line_1": "",21"address_line_2": "",22"landmark": "",23"city": "",24"province": "",25"pin_code": "",26"country": ""27},28"shipping_address": {29"address_line_1": "",30"address_line_2": "",31"landmark": "",32"city": "",33"province": "",34"pin_code": "",35"country": ""36}37},38"loyalty": {39"type": "",40"card_num": "",41"card_holder_name": "",42"points_redeemed": 143},44"store_code": "JK-001",45"receipt_timestamp": 1907416999,46"receipt_number": "INV00124992",47"receipt_type": "tax_invoice",48"receipt_delivery": "digital",49"bar_code_number": "",50"qr_code_number": "T2322 00000009291",51"billing_pos_number": "bn",52"pos_category": "traditional_pos",53"order_number": "",54"order_service_type": "",55"delivery_status_url": "",56"line_items": [57{58"name": "T-Shirt",59"quantity": 1,60"unit": "",61"employee_id": "1234",62"description": "",63"hsn_code": "",64"product_code": "",65"product_uid": "",66"image_url": "",67"total_amount": 100000,68"brand": "",69"style": "",70"colour": "",71"size": "",72"financier_data": null,73"taxes": [],74"tags": [],75"sub_items": []76}77],78"receipt_summary": {79"total_quantity": 1,80"sub_total_amount": 100000,81"currency": "INR",82"net_payable_amount": 124000,83"additional_charges": [84{85"description": "alteration charge",86"amount": 200087},88{89"description": "cash on delivery",90"amount": 200091},92],93"payment_status": "paid",94"discounts": []95},96"taxes": [97{98"name": "cgst",99"percentage": 1200,100"amount": 120101},102{103"name": "sgst",104"percentage": 1200,105"amount": 120106}107],108"payments": [109{110"method": "Bank Transfer",111"currency": "INR",112"amount": 124000,113"payment_reference_id": "",114"financier_data": null115}116],117"event": {118"name": "My Party",119"start_timestamp": 1722911400,120"end_timestamp": 1722924000,121"location": "B-wing",122"room": "Auditorium 1",123"seats": [124"gold b1",125"gold b2",126"gold b3"127]128},129"receipt_url": "yourbill.me/PYy4RWJWiNcPyE",130"created_at": 1907416999,131"tags": [132"party1",133"graduation"134]135}