API Test Keys

Create a Bill

POST
/v1/bills

Click to copy

Use this endpoint to create a Bill.

Is this page helpful?

Curl - Retail

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
2
-X POST https://api.razorpay.com/v1/bills
3
-d '{
4
"store_code": "V2_912",
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
"qr_code_number": "T2322 00000009291",
18
"cashier_code": "123",
19
"cashier_name": "Saurav Kumar",
20
"bar_code_number": "3412",
21
"billing_pos_number": "bn",
22
"pos_category": "traditional_pos",
23
"receipt_summary": {
24
"total_quantity": 2,
25
"sub_total_amount": 150000,
26
"total_tax_amount": 37500,
27
"total_tax_percent": 25,
28
"currency": "INR",
29
"net_payable_amount": 187500,
30
"payment_status": "success",
31
"delivery_charges": 0,
32
"cod_charges": 0,
33
"change_amount": 0,
34
"roundup_amount": 0,
35
"total_discount_percent": 0,
36
"total_discount_amount": 0,
37
"discounts": [
38
{
39
"name": "none",
40
"amount": 0
41
}
42
],
43
"used_wallet_amount": 0
44
},
45
"taxes": [
46
{
47
"name": "CGST",
48
"percentage": 10,
49
"amount": 15000
50
},
51
{
52
"name": "SGST",
53
"percentage": 10,
54
"amount": 15000
55
},
56
{
57
"name": "cess",
58
"percentage": 5,
59
"amount": 7500
60
}
61
],
62
"line_items": [
63
{
64
"name": "Acme Soap",
65
"quantity": 1,
66
"unit_amount": 10000,
67
"unit": "pc",
68
"hsn_code": "HC2000INCLT",
69
"product_code": "DRCO38",
70
"total_amount": 10000,
71
"taxes": [
72
{
73
"name": "CGST",
74
"percentage": 10,
75
"amount": 1000
76
},
77
{
78
"name": "SGST",
79
"percentage": 10,
80
"amount": 1000
81
}
82
]
83
},
84
{
85
"name": "Acme Earphones",
86
"quantity": 1,
87
"unit_amount": 80000,
88
"unit": "pc",
89
"hsn_code": "HC2000INPPLT",
90
"product_code": "POPLT281",
91
"total_amount": 80000,
92
"taxes": [
93
{
94
"name": "CGST",
95
"percentage": 10,
96
"amount": 8000
97
},
98
{
99
"name": "SGST",
100
"percentage": 10,
101
"amount": 8000
102
}
103
]
104
}
105
],
106
"payments": [
107
{
108
"method": "paytm",
109
"currency": "INR",
110
"amount": 90000,
111
"payment_reference_id": "",
112
"financier_data": {
113
"reference": "",
114
"name": "v"
115
}
116
}
117
]
118
}'

Success - Retail

Success - Food & Beverage

Success - Events

Failure

1
{
2
"id": "bill_3vfcnulzm7hdef",
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": null
20
},
21
"loyalty": null,
22
"store_code": "V2_912",
23
"receipt_timestamp": 1722664800,
24
"receipt_number": "INV001250018",
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": "ORD212",
32
"order_service_type": "",
33
"delivery_status_url": "",
34
"cashier_name": "Saurav Kumar",
35
"cashier_code": "123",
36
"line_items": [
37
{
38
"name": "Acme Soap",
39
"quantity": 1,
40
"unit_amount": 10000,
41
"unit": "pc",
42
"description": "",
43
"hsn_code": "HC2000INCLT",
44
"product_code": "DRCO38",
45
"product_uid": "",
46
"image_url": "",
47
"discount_description": "",
48
"total_amount": 10000,
49
"brand": "",
50
"style": "",
51
"colour": "",
52
"size": "",
53
"financier_data": null,
54
"taxes": [
55
{
56
"name": "CGST",
57
"percentage": 10,
58
"amount": 1000
59
},
60
{
61
"name": "SGST",
62
"percentage": 10,
63
"amount": 1000
64
}
65
]
66
},
67
{
68
"name": "Acme Earphones",
69
"quantity": 1,
70
"unit_amount": 80000,
71
"unit": "pc",
72
"description": "",
73
"hsn_code": "HC2000INPPLT",
74
"product_code": "POPLT281",
75
"product_uid": "",
76
"image_url": "",
77
"discount_description": "",
78
"total_amount": 80000,
79
"brand": "",
80
"style": "",
81
"colour": "",
82
"size": "",
83
"financier_data": null,
84
"taxes": [
85
{
86
"name": "CGST",
87
"percentage": 10,
88
"amount": 8000
89
},
90
{
91
"name": "SGST",
92
"percentage": 10,
93
"amount": 8000
94
}
95
]
96
}
97
],
98
"receipt_summary": {
99
"total_quantity": 2,
100
"sub_total_amount": 150000,
101
"currency": "INR",
102
"net_payable_amount": 187500,
103
"payment_status": "success",
104
"delivery_charges": 0,
105
"cod_charges": 0,
106
"change_amount": 0,
107
"roundup_amount": 0,
108
"total_discount_percent": 0,
109
"total_discount_amount": 0,
110
"discounts": [
111
{
112
"name": "none",
113
"amount": 0
114
}
115
],
116
"used_wallet_amount": 0,
117
"total_tax_amount": 37500,
118
"total_tax_percent": 25
119
},
120
"taxes": [
121
{
122
"name": "CGST",
123
"percentage": 10,
124
"amount": 150
125
},
126
{
127
"name": "sgst",
128
"percentage": 10,
129
"amount": 150
130
},
131
{
132
"name": "cess",
133
"percentage": 5,
134
"amount": 75
135
}
136
],
137
"payments": [
138
{
139
"method": "paytm",
140
"currency": "INR",
141
"amount": 90000,
142
"payment_reference_id": "",
143
"financier_data": {
144
"reference": "",
145
"name": "v"
146
}
147
}
148
],
149
"event": null,
150
"receipt_url": "yourbill.me/3vfcnulzm7hdef",
151
"created_at": 1722664800
152
}
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.

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 (15)

loyalty
object

Customer loyalty details.

Show child parameters (9)

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

bar_code_number
string

Bar code generated after the transaction. This will be displayed on the digital bill only.

qr_code_number
string

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 (18)

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

This 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)

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

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 (17)

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: 500

There is an internal server error

Solution

Create a Bill

POST
/v1/bills

Click to copy

Use this endpoint to create a Bill.

Is this page helpful?

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.

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 (15)

loyalty
object

Customer loyalty details.

Show child parameters (9)

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

bar_code_number
string

Bar code generated after the transaction. This will be displayed on the digital bill only.

qr_code_number
string

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 (18)

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

This 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)

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

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 (17)

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: 500

There is an internal server error

Solution

Curl - Retail

change language

change language

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
2
-X POST https://api.razorpay.com/v1/bills
3
-d '{
4
"store_code": "V2_912",
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
"qr_code_number": "T2322 00000009291",
18
"cashier_code": "123",
19
"cashier_name": "Saurav Kumar",
20
"bar_code_number": "3412",
21
"billing_pos_number": "bn",
22
"pos_category": "traditional_pos",
23
"receipt_summary": {
24
"total_quantity": 2,
25
"sub_total_amount": 150000,
26
"total_tax_amount": 37500,
27
"total_tax_percent": 25,
28
"currency": "INR",
29
"net_payable_amount": 187500,
30
"payment_status": "success",
31
"delivery_charges": 0,
32
"cod_charges": 0,
33
"change_amount": 0,
34
"roundup_amount": 0,
35
"total_discount_percent": 0,
36
"total_discount_amount": 0,
37
"discounts": [
38
{
39
"name": "none",
40
"amount": 0
41
}
42
],
43
"used_wallet_amount": 0
44
},
45
"taxes": [
46
{
47
"name": "CGST",
48
"percentage": 10,
49
"amount": 15000
50
},
51
{
52
"name": "SGST",
53
"percentage": 10,
54
"amount": 15000
55
},
56
{
57
"name": "cess",
58
"percentage": 5,
59
"amount": 7500
60
}
61
],
62
"line_items": [
63
{
64
"name": "Acme Soap",
65
"quantity": 1,
66
"unit_amount": 10000,
67
"unit": "pc",
68
"hsn_code": "HC2000INCLT",
69
"product_code": "DRCO38",
70
"total_amount": 10000,
71
"taxes": [
72
{
73
"name": "CGST",
74
"percentage": 10,
75
"amount": 1000
76
},
77
{
78
"name": "SGST",
79
"percentage": 10,
80
"amount": 1000
81
}
82
]
83
},
84
{
85
"name": "Acme Earphones",
86
"quantity": 1,
87
"unit_amount": 80000,
88
"unit": "pc",
89
"hsn_code": "HC2000INPPLT",
90
"product_code": "POPLT281",
91
"total_amount": 80000,
92
"taxes": [
93
{
94
"name": "CGST",
95
"percentage": 10,
96
"amount": 8000
97
},
98
{
99
"name": "SGST",
100
"percentage": 10,
101
"amount": 8000
102
}
103
]
104
}
105
],
106
"payments": [
107
{
108
"method": "paytm",
109
"currency": "INR",
110
"amount": 90000,
111
"payment_reference_id": "",
112
"financier_data": {
113
"reference": "",
114
"name": "v"
115
}
116
}
117
]
118
}'

Success - Retail

Success - Food & Beverage

Success - Events

Failure

1
{
2
"id": "bill_3vfcnulzm7hdef",
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": null
20
},
21
"loyalty": null,
22
"store_code": "V2_912",
23
"receipt_timestamp": 1722664800,
24
"receipt_number": "INV001250018",
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": "ORD212",
32
"order_service_type": "",
33
"delivery_status_url": "",
34
"cashier_name": "Saurav Kumar",
35
"cashier_code": "123",
36
"line_items": [
37
{
38
"name": "Acme Soap",
39
"quantity": 1,
40
"unit_amount": 10000,
41
"unit": "pc",
42
"description": "",
43
"hsn_code": "HC2000INCLT",
44
"product_code": "DRCO38",
45
"product_uid": "",
46
"image_url": "",
47
"discount_description": "",
48
"total_amount": 10000,
49
"brand": "",
50
"style": "",
51
"colour": "",
52
"size": "",
53
"financier_data": null,
54
"taxes": [
55
{
56
"name": "CGST",
57
"percentage": 10,
58
"amount": 1000
59
},
60
{
61
"name": "SGST",
62
"percentage": 10,
63
"amount": 1000
64
}
65
]
66
},
67
{
68
"name": "Acme Earphones",
69
"quantity": 1,
70
"unit_amount": 80000,
71
"unit": "pc",
72
"description": "",
73
"hsn_code": "HC2000INPPLT",
74
"product_code": "POPLT281",
75
"product_uid": "",
76
"image_url": "",
77
"discount_description": "",
78
"total_amount": 80000,
79
"brand": "",
80
"style": "",
81
"colour": "",
82
"size": "",
83
"financier_data": null,
84
"taxes": [
85
{
86
"name": "CGST",
87
"percentage": 10,
88
"amount": 8000
89
},
90
{
91
"name": "SGST",
92
"percentage": 10,
93
"amount": 8000
94
}
95
]
96
}
97
],
98
"receipt_summary": {
99
"total_quantity": 2,
100
"sub_total_amount": 150000,
101
"currency": "INR",
102
"net_payable_amount": 187500,
103
"payment_status": "success",
104
"delivery_charges": 0,
105
"cod_charges": 0,
106
"change_amount": 0,
107
"roundup_amount": 0,
108
"total_discount_percent": 0,
109
"total_discount_amount": 0,
110
"discounts": [
111
{
112
"name": "none",
113
"amount": 0
114
}
115
],
116
"used_wallet_amount": 0,
117
"total_tax_amount": 37500,
118
"total_tax_percent": 25
119
},
120
"taxes": [
121
{
122
"name": "CGST",
123
"percentage": 10,
124
"amount": 150
125
},
126
{
127
"name": "sgst",
128
"percentage": 10,
129
"amount": 150
130
},
131
{
132
"name": "cess",
133
"percentage": 5,
134
"amount": 75
135
}
136
],
137
"payments": [
138
{
139
"method": "paytm",
140
"currency": "INR",
141
"amount": 90000,
142
"payment_reference_id": "",
143
"financier_data": {
144
"reference": "",
145
"name": "v"
146
}
147
}
148
],
149
"event": null,
150
"receipt_url": "yourbill.me/3vfcnulzm7hdef",
151
"created_at": 1722664800
152
}