Create invoice
POST /<provider>/create-invoice
API used to create a new invoice in the provider's system through the Gateway.
Headers
| Name | Required | Description |
|---|---|---|
Authorization | ✅ | Bearer access_token |
Content-Type | ✅ | application/json |
X-Tax-Code | ✅ | Seller's tax code. |
Request Body
| Name | Required | Description |
|---|---|---|
lang | Language for system error messages, defaults to Vietnamese ('en', 'vi'). | |
inv.serial | ✅ | Invoice serial. Example: '1CM25MTS'. |
inv.invoice_date | ✅ | Invoice issue date (timestamp). Example: '2025-08-12T05:06:13'. |
inv.currency | ✅ | Currency ('VND', 'USD'). |
inv.ex_rate | ✅ | Exchange rate. Example: 1. |
inv.buyer_name | ✅ | Buyer's name. |
inv.buyer_legal_name | ✅ | Buyer's organization name. |
inv.buyer_tax | Buyer's tax code. | |
inv.buyer_address | ✅ | Buyer's address. |
inv.buyer_phone_number | No (only MISA, FPT, Viettel) | Buyer's phone number. |
inv.buyer_email | Buyer's email. Example: '[email protected]'. | |
inv.buyer_id_number | No (only 1Invoice, MISA) | Buyer's personal identification number. |
inv.buyer_bank_account | Buyer's bank account number. | |
inv.buyer_bank_name | Name of the bank for the account number. | |
inv.payment_method | ✅ | Payment method (TM, CK, TM/CK, DTCN, KTT, TTD, HBT, TQL, L/C, TTR, TM/CK/BTCN). |
inv.discount | Discount amount. | |
inv.sum_v | ✅ | Total before tax, after discount (converted to VND). |
inv.sum_sale_v | ✅ | Total goods amount before tax, before discount (converted to VND). |
inv.vat_v | Yes if it is a VAT invoice | Total tax amount (converted to VND). |
inv.total_v | ✅ | Total amount after tax (converted to VND). |
inv.total_v_in_words | ✅ | Total amount after tax in words (VND). |
inv.seq | Invoice number. | |
inv.sid | ✅ | Order code by merchant. Must not be duplicated. |
inv.sum | ✅ | Total before tax, after discount (original currency). |
inv.sum_sale | ✅ | Total goods amount before tax, before discount (original currency). |
inv.vat | Yes if it is a VAT invoice | Total tax amount in original currency. |
inv.total | ✅ | Total payment amount including tax in original currency. |
inv.form | ✅ | Invoice template registered for use on the system. |
inv.aun | No (only FPT) | Determines which system manages invoice number issuance: enterprise self-manages numbering ('aun': 1, an invoice number is required in the 'seq' field); eInvoice automatically issues numbers ('aun': 2). |
inv.sign | No (only FPT) | Used for return invoices ('sign': -1: marks a return invoice; 'sign': 1 or no field: a normal invoice). |
inv.type_ref | No (only FPT) | Field that identifies the type of invoice in use (1: Invoice under TT78; empty: Invoice under TT32). |
inv.stax | ✅ | Seller's tax code. Example: '2392190986'. |
inv.type | Yes (only FPT, Vietel) | Invoice type. Example: '01GTKT'. |
inv.is_send_mail | Whether to send an email upon successful issuance. | |
inv.receiver_name | Name of the email recipient. | |
inv.receiver_email | Email recipient addresses, separated by ; (Only applies in Product). | |
inv.items[].line | ✅ | Line number of the goods item. |
inv.items[].type | ✅ | Goods type (1: Normal, 2: Promotion, 3: Discount, 4: Note, 5: Special transport goods). |
inv.items[].code | Goods code. | |
inv.items[].name | Goods name. | |
inv.items[].unit | Goods unit. | |
inv.items[].quantity | Goods quantity. | |
inv.items[].price | Goods unit price. | |
inv.items[].perdiscount | Discount percentage (%). | |
inv.items[].amtdiscount | Discount amount. | |
inv.items[].amount | Amount for each line of goods/services. | |
inv.items[].amountn | Amount after discount (= amount - amtdiscount). | |
inv.items[].vrt | Yes if it is a VAT invoice | Tax rate type, the value depends on the provider ('0', '5', '10'). |
inv.items[].vat | Yes if it is a VAT invoice | VAT amount for each item. |
inv.items[].total | Total amount including VAT for each item. | |
inv.tax_rate_info[].vrt | Yes if it is a VAT invoice (only MISA, Viettel) | Aggregated tax rate type: KCT(MISA) || -1 (Viettel): taxable; KKKNT (MISA) || -2 (Viettel): declared and paid; 0%: tax rate 0%; 5%: tax rate 5%; 8%: tax rate 8%; 10%: tax rate 10%; KHAC:x%: other tax rate type (Example: KHAC:3.5%). |
inv.tax_rate_info[].amountn | Yes if it is a VAT invoice (only MISA, Viettel) | Total amount before tax of goods lines grouped by tax rate. |
inv.tax_rate_info[].vat | Yes if it is a VAT invoice (only MISA, Viettel) | Total tax amount of the goods lines. |
Notes by provider
Differences in field values by provider for certain fields when creating an invoice
| Field name | 1Invoice | FPT | Misa | Viettel |
|---|---|---|---|---|
| inv.serial | Required | Optional | Required | Required |
| inv.invoice_date | Required | Required | Required | Optional |
| inv.stax | Pass the tax code | Pass the tax code | Pass the tax code | Pass an empty string "" |
| inv.payment_method | Not required to be "TM/CK", "CK"... it can be customized, for example "QR", "CARD" | Must be "TM", "CK", "TM/CK".... | Not required to be "TM/CK", "CK"... it can be customized, for example "QR", "CARD" | Not required to be "TM/CK", "CK"... it can be customized, for example "QR", "CARD" |
| inv.form | "1" | "1" (do not pass this field if serial has already been passed) | "" | template_code returned from the invoice serial list |
| inv.type | Optional | Required | Optional | Required |
| inv.items[].type | 1 Goods nature: - Goods/services (tchat value is 1) - Promotion (tchat value is 2) - Commercial discount (tchat value is 3) - Note/description (tchat value is 4) | "" Goods form has 4 types: - MT : Note, description - CK : Commercial discount - KM : Promotion - Pass empty : Normal | 1 Goods nature: 1: Normal goods 2: Promotion 3: Discount 4: Note/description 5: Special transport goods | "" - Null or 1- Goods (Generates line number, quantity and unit price are required) - 2: Note (Does not generate a line number and does not add the amount to the total payment) - 3: Discount (Does not generate a line number, quantity and unit price are not required, add isIncreaseItem = false to indicate an amount reduction) - 4: Other fee (Does not generate a line number, quantity and unit price are not entered) - 5: Promotion (Generates a line number, quantity and unit price are required) - 6: Special goods; if passing special goods (ND 70), see the list of required fields below |
| inv.items[].vrt | "8", "10" … Pass the following fixed values: 10: Tax rate 10% 8: Tax rate 8% 5: Tax rate 5% 0: Tax rate 0% -1: Not taxable -2: Not declared and paid If an additional tax rate outside the list arises, contact 1Invoice Required if tchat is 1,2,3 Optional if tchat is 4 | "8", "10" … Tax rate type : ( 0, 5, 8, 10, -1, -2) + 0: tax rate 0% + 5: tax rate 5% + 8: tax rate 8% + 10: tax rate 10% + -1: Not taxable + -2: Not declared and paid Other than the 6 tax rate types above: Other tax rate | "8%", "10%" … KCT: taxable KKKNT: declared and paid 0%: tax rate 0% 5%: tax rate 5% 8%: tax rate 8% 10%: tax rate 10% KHAC:x%: other tax rate type (Example: KHAC:3.5%) | "8", "10" … Tax rate of goods/services (-2: no tax, -1: not declared, 0: 0%, 5: 5%, 8: 8%, 10: 10%...). |
Issuing an invoice for a retail customer
| Field | 1Invoice | FPT | Misa | Viettel |
|---|---|---|---|---|
| Organization name (inv.buyer_legal_name) | Optional | Required | Optional | Optional |
| Address (inv.buyer_address) | Optional | Required The content can be: "Customer does not take invoice" | Optional | Optional |
Response
| Name | Description |
|---|---|
data.search_code | Code for the user to look up the invoice |
data.seq | Invoice number |
data.tax_authority_code | Tax authority code |
data.vpid | Id used to view the PDF or sign the invoice |
data.error_code | Error code if any (With an error code: creation failed; without an error code: creation successful) |
data.transaction_id | Transaction code if any |
Notes on the returned result by provider
Differences between the response data when creating an invoice (✅: yes, ❌: no)
| Field | 1Invoice | FPT | Misa | Viettel |
|---|---|---|---|---|
| Tax authority code | ||||
| Lookup code | ||||
| Invoice number |
- Curl 1Invoice
- Curl one-invoice
- Curl Misa
- Curl FPT
- Response Sample
curl --location 'https://stag-invoice-hub.1invoice.vn/1Invoice/create-invoice' \
--header 'authorization: Bearer O87316arj5+Od3Fqyy5hzdBfIuPk73eKqpAzBSvv8sY=' \
--header 'x-tax-code: 0106026495-998' \
--header 'Content-Type: application/json' \
--data '{
"lang": "vi",
"inv": {
"serial": "1C25MTS",
"invoice_date": "2025-08-12T05:06:13",
"currency": "VND",
"ex_rate": 1,
"buyer_name": "Lê Thanh Dũng",
"buyer_legal_name": "1Invoice - Kiểm thử HĐĐT không mã",
"buyer_tax": "0106026495-998",
"buyer_address": "Số nhà 16, ngõ 269/1, đường Giáp Bát, Phường Hoàng Mai, TP Hà Nội",
"buyer_email": "",
"payment_method": "QR",
"buyer_bank_account": "",
"buyer_bank_name": "",
"sum_v": 81500,
"vat_v": 8150,
"total_v": 89650,
"type": "01GTKT",
"sid": "160725-8238-JFSFA122",
"sum": 81500,
"vat": 8150,
"total": 89650,
"total_v_in_words": "tám mươi chín nghìn sáu trăm năm mươi đồng",
"form": "1",
"aun": 2,
"sign": 1,
"type_ref": 1,
"stax": "0106026495-998",
"items": [
{
"line": 1,
"code": "172",
"name": "Mì xào trứng",
"unit": "Phần",
"quantity": 1,
"price": 50000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 50000,
"amountn":50000,
"vrt": "10",
"vat": 5000,
"total": 55000
},
{
"line": 2,
"code": "173",
"name": "Bánh mì ốp la",
"unit": "Phần",
"quantity": 1,
"price": 30000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 30000,
"amountn":30000,
"vrt": "10",
"vat": 3000,
"total": 33000
},
{
"line": 3,
"code": "262",
"name": "Sticker",
"unit": "Phần",
"quantity": 1,
"price": 1500,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 1500,
"amountn":1500,
"vrt": "10",
"vat": 150,
"total": 1650
}
]
}
}'
curl --location 'https://stag-invoice-hub.1invoice.vn/1Invoice/one-invoice' \
--header 'X-Tax-Code: 0106026495-998' \
--header 'X-Bank: quangtran' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer O87316arj5+Od3Fqyy5hzdBfIuPk73eKqpAzBSvv8sY=' \
--data-raw '{
"inv": {
"serial": "1C25MTS",
"invoice_date": "2025-08-25",
"currency": "VND",
"ex_rate": 1,
"buyer_name": "Nguyễn Công Đức",
"buyer_legal_name": "CÔNG TY 1Invoice",
"buyer_tax": "0106026495-999",
"buyer_address": "Giáp Bát, Hoàng Mai, Hà Nội",
"buyer_email": "[email protected]",
"buyer_bank_account": "100003131",
"buyer_bank_name": "Ngân hàng TMCP Á Châu - ACB",
"payment_method": "TM/CK",
"discount": 0,
"sum_v": 610000,
"vat_v": 48800,
"total_v": 658800,
"seq": "",
"sid": "123456114x",
"items": [
{
"line": 1,
"type": 1,
"code": "HH001",
"name": "Hàng hóa 001",
"unit": "Phần",
"quantity": 1,
"price": 120000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 120000,
"vrt": 8,
"vat": 9600,
"total": 129600
},
{
"line": 2,
"type": 1,
"code": "HH002",
"name": "Hàng hóa 002",
"unit": "Phần",
"quantity": 2,
"price": 245000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 490000,
"vrt": 8,
"vat": 39200,
"total": 529200
}
]
}
}'
curl --location 'https://stag-invoice-hub.1invoice.vn/misa/create-invoice?type_invoice=icr' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: {{vault:bearer-token}}' \
--header 'x-tax-code: 2222222222-788' \
--header 'Content-Type: application/json' \
--data '{
"lang": "vi",
"inv": {
"serial": "1C25MTS",
"invoice_date": "2025-12-18T02:39:49",
"currency": "VND",
"ex_rate": 1,
"buyer_name": "Khách lẻ",
"buyer_legal_name": "",
"buyer_address": "",
"buyer_phone_number": "0999988754",
"payment_method": "TM/CK",
"buyer_bank_account": "",
"buyer_bank_name": "",
"sum_v": 136000,
"sum_sale_v": 136000,
"vat_v": 0,
"total_v": 136000,
"sid": "4324823-EDASDHLAKS-312312",
"sum": 136000,
"sum_sale": 136000,
"vat": 0,
"total": 136000,
"total_v_in_words": "Một trăm ba mươi sáu nghìn đồng",
"form": "1",
"aun": 2,
"sign": 1,
"type_ref": 1,
"sendfile": 1,
"notsendmail": "",
"is_send_mail": true,
"receiver_name": "Khách lẻ",
"stax": "2222222222-788",
"non_tax_zone": null,
"tax_rate_info": [
{
"vrt": "0%",
"amountn": 136000,
"vat": 0
}
],
"items": [
{
"line": 1,
"type": 1,
"code": "2925 ",
"name": "Bò nhúng giấm",
"unit": "Cốc",
"quantity": 4,
"price": 25000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 100000,
"amountn": 100000,
"vrt": "0%",
"vat": 0,
"total": 100000
},
{
"line": 2,
"type": 1,
"code": "2928 ",
"name": "Test1111",
"unit": "Phần",
"quantity": 3,
"price": 12000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 36000,
"amountn": 36000,
"vrt": "0%",
"vat": 0,
"total": 36000
}
]
}
}'
curl --location 'https://stag-invoice-hub.1invoice.vn/fpt/create-invoice?type_invoice=icr' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"inv": {
"serial": "",
"currency": "VND",
"ex_rate": 1,
"buyer_name": "Ngô Vũ Quang",
"buyer_legal_name": "Ngô Vũ Quang",
"buyer_tax": "8613169560",
"buyer_address": "Thành phố Quy Nhơn, Bình Định",
"buyer_email": "[email protected]",
"payment_method": "TM/CK",
"buyer_bank_account": "",
"buyer_bank_name": "",
"sum_v": 297000,
"vat_v": 29700,
"total_v": 326700,
"type": "01GTKT",
"sid": "2025-0005-0123",
"sum": 297000,
"vat": 29700,
"total": 326700,
"form": "1",
"aun": 2,
"sign": 1,
"type_ref": 1,
"stax": "0104128565-999",
"items": [
{
"line": 1,
"code": 24,
"name": "[P001] BÒ Đỉnh",
"unit": "Phần",
"quantity": 3,
"price": 99000,
"perdiscount": 0,
"amtdiscount": 0,
"amount": 99000,
"vrt": "10",
"vat": 9900,
"total": 108900,
"pricev": 99000,
"amountv": 99000,
"vatv": 9900,
"totalv": 108900,
"type": ""
}
]
}
}'
{
"data": {
"search_code": "9A97B32B",
"seq": 567,
"tax_authority_code": "M1-25-RV1DV-00000009403"
},
"success": true,
"message": null
}