Update a Bill
PATCH
/v1/bills/:bill_id
Click 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"total_amount": 10000017}18],19"receipt_summary": {20"total_quantity": 1,21"sub_total_amount": 100000,22"currency": "INR",23"net_payable_amount": 124000,24"payment_status": "paid"25},26"taxes": [27{28"name": "cgst",29"percentage": 1200,30"amount": 1200031},32{33"name": "sgst",34"percentage": 1200,35"amount": 1200036}37],38"payments": [39{40"method": "Bank Transfer",41"amount": 124000,42"currency": "INR"43}44]45}'
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"cashier_name": "Saurav Kumar",57"cashier_code": "420",58"line_items": [59{60"name": "T-Shirt",61"quantity": 1,62"unit": "",63"description": "",64"hsn_code": "",65"product_code": "",66"product_uid": "",67"image_url": "",68"discount_description": "",69"total_amount": 100000,70"brand": "",71"style": "",72"colour": "",73"size": "",74"financier_data": null,75"taxes": [],76"tags": [],77"sub_items": []78}79],80"receipt_summary": {81"total_quantity": 1,82"sub_total_amount": 100000,83"currency": "INR",84"net_payable_amount": 124000,85"payment_status": "paid",86"discounts": []87},88"taxes": [89{90"name": "cgst",91"percentage": 1200,92"amount": 12093},94{95"name": "sgst",96"percentage": 1200,97"amount": 12098}99],100"payments": [101{102"method": "Bank Transfer",103"currency": "INR",104"amount": 124000,105"payment_reference_id": "",106"financier_data": null107}108],109"event": {110"name": "My Party",111"start_timestamp": 1722911400,112"end_timestamp": 1722924000,113"location": "B-wing",114"room": "Auditorium 1",115"seats": [116"gold b1",117"gold b2",118"gold b3"119]120},121"receipt_url": "yourbill.me/PYy4RWJWiNcPyE",122"created_at": 1907416999,123"tags": [124"party1",125"graduation"126]127}
Path Parameters
id
*
string
The unique identifier of the Bill.
Request Parameters
store_code
string
Associated 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 (15)
loyalty
object
Customer loyalty details.
Show child parameters (9)
receipt_type
*
string
The type of receipt. Possible values:
tax_invoice
sales_invoice
sales_return_invoice
proforma_invoice
credit_invoice
purchase_invoice
debit_invoice
receipt_timestamp
*
integer
UNIX timestamp of the date and time when the receipt was generated.
receipt_delivery
*
string
Indicates the delivery type of the receipt. Possible values:
digital
print
digital_and_print
tags
string
An 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 (20)
receipt_summary
*
object
Details of the receipt.
Show child parameters (15)
taxes
object
This is an array of objects containing the details of the taxes incurred.
Show child parameters (3)
payments
*
object
This is an array of objects containing the details of the payment.
Show child parameters (3)
Response Parameters
id
*
string
Unique id of the bill generated.
business_type
*
string
The type of business. Possible values:
ecommerce
retail
business_category
*
string
The 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
object
Customer loyalty details.
Show child parameters (9)
store_code
string
Associated 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
*
integer
UNIX timestamp of the date and time when the receipt was generated.
receipt_number
*
string
Unique receipt number generated for the bill.
receipt_type
*
string
The type of receipt. Possible values:
tax_invoice
sales_invoice
sales_return_invoice
proforma_invoice
credit_invoice
purchase_invoice
debit_invoice
receipt_delivery
*
string
Indicates the delivery type of the receipt. Possible values:
digital
print
digital_and_print
tags
string
An array of strings representing relevant tags associated with the invoice.
bar_code_number
integer
Bar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number
integer
QR 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
string
Incremental 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
.
cashier_name
string
Name of the cashier that billed the order. This is applicable if business_type
is retail
.
cashier_code
string
The unique id of the cashier that billed the order. This is applicable if business_type
is retail
.
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 (19)
receipt_summary
*
object
Details of the receipt.
Show child parameters (15)
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
*
object
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)
receipt_url
string
The link to the receipt.
created_at
integer
UNIX 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_id
Click to copy
Use this endpoint to update a Bill.
Is this page helpful?
Path Parameters
id
*
string
The unique identifier of the Bill.
Request Parameters
store_code
string
Associated 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 (15)
loyalty
object
Customer loyalty details.
Show child parameters (9)
receipt_type
*
string
The type of receipt. Possible values:
tax_invoice
sales_invoice
sales_return_invoice
proforma_invoice
credit_invoice
purchase_invoice
debit_invoice
receipt_timestamp
*
integer
UNIX timestamp of the date and time when the receipt was generated.
receipt_delivery
*
string
Indicates the delivery type of the receipt. Possible values:
digital
print
digital_and_print
tags
string
An 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 (20)
receipt_summary
*
object
Details of the receipt.
Show child parameters (15)
taxes
object
This is an array of objects containing the details of the taxes incurred.
Show child parameters (3)
payments
*
object
This is an array of objects containing the details of the payment.
Show child parameters (3)
Response Parameters
id
*
string
Unique id of the bill generated.
business_type
*
string
The type of business. Possible values:
ecommerce
retail
business_category
*
string
The 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
object
Customer loyalty details.
Show child parameters (9)
store_code
string
Associated 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
*
integer
UNIX timestamp of the date and time when the receipt was generated.
receipt_number
*
string
Unique receipt number generated for the bill.
receipt_type
*
string
The type of receipt. Possible values:
tax_invoice
sales_invoice
sales_return_invoice
proforma_invoice
credit_invoice
purchase_invoice
debit_invoice
receipt_delivery
*
string
Indicates the delivery type of the receipt. Possible values:
digital
print
digital_and_print
tags
string
An array of strings representing relevant tags associated with the invoice.
bar_code_number
integer
Bar code generated after the transaction. This will be displayed on the digital bill only.
qr_code_number
integer
QR 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
string
Incremental 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
.
cashier_name
string
Name of the cashier that billed the order. This is applicable if business_type
is retail
.
cashier_code
string
The unique id of the cashier that billed the order. This is applicable if business_type
is retail
.
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 (19)
receipt_summary
*
object
Details of the receipt.
Show child parameters (15)
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
*
object
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)
receipt_url
string
The link to the receipt.
created_at
integer
UNIX 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"total_amount": 10000017}18],19"receipt_summary": {20"total_quantity": 1,21"sub_total_amount": 100000,22"currency": "INR",23"net_payable_amount": 124000,24"payment_status": "paid"25},26"taxes": [27{28"name": "cgst",29"percentage": 1200,30"amount": 1200031},32{33"name": "sgst",34"percentage": 1200,35"amount": 1200036}37],38"payments": [39{40"method": "Bank Transfer",41"amount": 124000,42"currency": "INR"43}44]45}'
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"cashier_name": "Saurav Kumar",57"cashier_code": "420",58"line_items": [59{60"name": "T-Shirt",61"quantity": 1,62"unit": "",63"description": "",64"hsn_code": "",65"product_code": "",66"product_uid": "",67"image_url": "",68"discount_description": "",69"total_amount": 100000,70"brand": "",71"style": "",72"colour": "",73"size": "",74"financier_data": null,75"taxes": [],76"tags": [],77"sub_items": []78}79],80"receipt_summary": {81"total_quantity": 1,82"sub_total_amount": 100000,83"currency": "INR",84"net_payable_amount": 124000,85"payment_status": "paid",86"discounts": []87},88"taxes": [89{90"name": "cgst",91"percentage": 1200,92"amount": 12093},94{95"name": "sgst",96"percentage": 1200,97"amount": 12098}99],100"payments": [101{102"method": "Bank Transfer",103"currency": "INR",104"amount": 124000,105"payment_reference_id": "",106"financier_data": null107}108],109"event": {110"name": "My Party",111"start_timestamp": 1722911400,112"end_timestamp": 1722924000,113"location": "B-wing",114"room": "Auditorium 1",115"seats": [116"gold b1",117"gold b2",118"gold b3"119]120},121"receipt_url": "yourbill.me/PYy4RWJWiNcPyE",122"created_at": 1907416999,123"tags": [124"party1",125"graduation"126]127}