What is an adjustment invoice?
An adjustment invoice is issued when an e-invoice that has already been issued and accepted by the tax authority turns out to need a correction. An adjustment invoice does not replace or void the original invoice. The original stays in force, and the adjustment records only the difference or the information being corrected.
For example: the original invoice is 10,000,000 VND but the correct amount is 11,000,000 VND. You issue an increase adjustment of 1,000,000 VND - the difference that needs adjusting, not the whole invoice again.
Origin invoice requirements
The origin invoice is identified by original_invoice_reference_code (the reference_code of a previously created invoice, under the same provider_account_id).
The origin invoice must:
- Have been issued successfully and accepted by the tax authority. Draft or in-progress invoices cannot be adjusted.
- Be a new invoice, a replacement invoice or an already-adjusted invoice.
- Not have been replaced or cancelled.
An invoice that has already been adjusted can be adjusted again, many times.
Supported adjustment kinds
The adjustment_type parameter picks the kind of adjustment invoice:
increase- increase adjustmentdecrease- decrease adjustmentcombined- increase and decrease on the same invoiceinfo- information adjustment, carries no change in money
How to enter line items for each kind is covered under Adjustment Types (adjustment_type) below.
How it works in the SePay eInvoice API
POST v1/invoices/adjust takes original_invoice_reference_code, the adjustment kind and the lines to adjust.
The API returns a tracking_code as soon as it accepts the request. Signing and filing the invoice with the tax authority are processed asynchronously. Use the tracking_code with the invoice status tracking API to follow the status and get the final result.
An invoice can be adjusted many times.
API Endpoint
https://einvoice-api.sepay.vn/v1/invoices/adjustAPI Request
Provider account ID (UUID) - must be the account that issued the origin invoice
Reference code of the issued origin invoice to adjust
Adjustment type:
increase: Increase adjustmentdecrease: Decrease adjustmentcombined: Combined adjustmentinfo: Information adjustment
Invoice issue date (YYYY-MM-DD HH:mm:ss). Optional - defaults to now. If provided, it must be today.
Reference code of the adjustment invoice, must be unique. Auto-generated as UUID if omitted.
Payment method. Optional - when omitted, the origin invoice's payment method is reused (TM/CK when the origin has none either).
- TM: Cash
- CK: Bank transfer
- TM/CK: Cash and bank transfer
- KHAC: Other
Must be a real boolean (true/false):
true: Create as draft (issue later via the issue invoice API)false: Create and issue immediately
Buyer information.
Required when adjustment_type=info.
For increase/decrease/combined, when omitted the origin invoice's full buyer information is used.
List of adjustment lines.
increase/decrease/combined: at least one adjusted item is required.
info: at least one content line is required.
Invoice notes, max 255 characters
Final total payable amount of the invoice (tax included). Optional. If provided, it must be an integer (no decimals).
- Omitted: the system computes it from the line items and rounds to a whole number.
- Provided: the system uses your value exactly as-is and performs NO validation against the line items.
Warning (when provided): You are solely responsible for this value. If it does not match the goods subtotal + tax, the invoice will display an incorrect total and the tax authority may reject it.
API Response
{
"success": true,
"data": {
"tracking_code": "5c2d9e4b-7d96-11f1-aef4-52c7e9b4f41b",
"tracking_url": "https://einvoice-api.sepay.vn/v1/invoices/adjust/check/5c2d9e4b-7d96-11f1-aef4-52c7e9b4f41b",
"message": "Đã tạo yêu cầu xuất hóa đơn điều chỉnh"
}
}Error Handling
400Bad RequestMissing or invalid required fields (VALIDATION_ERROR).
401UnauthorizedMissing or invalid Bearer token, or token expired (TOKEN_EXPIRED).
400INVALID_ADJUSTMENT_TYPEadjustment_type is required and must be one of: increase, decrease, combined, info.
400INVALID_IS_DRAFT_TYPEis_draft must be a real boolean (true/false), not a string.
400VALIDATION_ERRORInvalid line data: negative values outside money adjustment types, an info adjustment with non-zero totals, no non-zero difference line...
400ISSUED_DATE_INVALIDissued_date is not today's date.
400INVALID_ISSUED_DATEissued_date does not match the Y-m-d H:i:s format.
422INVALID_ORIGIN_INVOICEThe origin invoice is not eligible: not issued yet, or already replaced/cancelled.
422REGISTRATION_NOT_TAX_APPROVEDBusiness has not registered eInvoicing or the tax authority has not approved the filing (production only).
422INVOICE_DATE_BEFORE_TAX_APPROVALInvoice date is before the tax authority approval date (production only).
409EINVOICE_DOCUMENT_EXISTEDAn invoice already exists for this reference_code. reference_code must be unique.
500EINVOICE_ACCOUNT_NOT_FOUNDNo eInvoice provider account found for the given provider_account_id.
500QUOTA_HAS_BEEN_USERD_UPThe plan's invoice quota is used up. Top up the quota before calling again - do not auto-retry, this error does not clear by itself.
500REGISTRATION_NOT_COMPLETEThe company has not completed its eInvoice plan registration.
500BILLING_IS_UNPAIDThe company has not paid for its eInvoice plan.
500Internal Server ErrorSystem error while processing the request.
Adjustment Types (adjustment_type)
| adjustment_type | Invoice type | How to enter line values |
|---|---|---|
increase | Increase adjustment invoice | Enter the INCREASE difference as positive values |
decrease | Decrease adjustment invoice | Enter the DECREASE difference as NEGATIVE numbers per regulation |
combined | Combined increase/decrease adjustment | Each line carries its own sign: positive = increase, negative = decrease |
info | Information adjustment invoice | Carries no money value, totals must equal 0. Describe the correction in a note line (line_type=4) |
Buyer Information (buyer)
- For
increase/decrease/combined:buyeris optional. When omitted, the origin invoice's full buyer info is reused. - For
info:buyeris required - it is the corrected information itself (e.g. the new address, the correct tax code).
Usage Notes
payment_methodis optional - when omitted, the origin invoice's payment method is reused.issued_dateis optional and must always be today (defaults to the API call time).- For
increase/decrease/combined: at least one line with a non-zero value is required. All-zero goods lines are skipped automatically. - For
info: at least one content line describing the corrected information is required (typically a note line,line_type=4), and totals must equal 0. discount_tax(discount %) is never negative - to decrease a discount, send a negativediscount_amountdirectly.is_draft=truecreates a draft - issue it later via the issue invoice API using the draft'sreference_code.is_draft=falsecreates and issues immediately.- After a successful request, use
tracking_urlto call the invoice status tracking API - always poll until a terminal result (success or failure).
Sample Code
curl --request POST \--url https://einvoice-api.sepay.vn/v1/invoices/adjust \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \--header 'content-type: application/json' \--data '{"provider_account_id":"0aea3134-da40-11f0-aef4-52c7e9b4f41b","original_invoice_reference_code":"084e179d-d95a-11f0-aef4-52c7e9b4f41b","adjustment_type":"increase","issued_date":"2026-07-30 00:00:00","reference_code":"5c2d9e4b-7d96-11f1-aef4-52c7e9b4f41b","payment_method":"TM/CK","is_draft":false,"buyer":{"type":"personal","name":"Công ty TNHH ABC","legal_name":"CÔNG TY CỔ PHẦN ABC","tax_code":"0123456789","address":"123 Đường ABC, Quận 1, TP.HCM","email":"contact@abc.com","phone":"0901234567","buyer_code":"KH-001","national_id":"001234567890"},"items":[{"line_number":1,"line_type":1,"item_code":"SP001","item_name":"Điều chỉnh tăng mặt hàng Sản phẩm A","unit":"cái","quantity":1,"unit_price":500000,"tax_rate":10,"discount_tax":10,"discount_amount":100000,"before_discount_and_tax_amount":500000,"sub_amount":400000,"tax_amount":40000,"amount":440000}],"notes":"Điều chỉnh tăng đơn giá cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026","total_amount":4950000}'
Sample Parameters per Adjustment Type
Increase adjustment (increase)
{
"provider_account_id": "{{your-provider-account-id}}",
"original_invoice_reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"adjustment_type": "increase",
"items": [
{
"line_number": 1,
"line_type": 1,
"item_code": "SP001",
"item_name": "Điều chỉnh tăng mặt hàng Sản phẩm A",
"unit": "cái",
"quantity": 1,
"unit_price": 500000,
"tax_rate": 10
}
],
"notes": "Điều chỉnh tăng đơn giá cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026",
"is_draft": false
}Decrease adjustment (decrease - negative values)
{
"provider_account_id": "{{your-provider-account-id}}",
"original_invoice_reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"adjustment_type": "decrease",
"items": [
{
"line_number": 1,
"line_type": 1,
"item_code": "SP001",
"item_name": "Điều chỉnh giảm mặt hàng Sản phẩm A",
"unit": "cái",
"quantity": 1,
"unit_price": -500000,
"tax_rate": 10
}
],
"notes": "Điều chỉnh giảm đơn giá cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026",
"is_draft": false
}Combined adjustment (combined - per-line signs)
{
"provider_account_id": "{{your-provider-account-id}}",
"original_invoice_reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"adjustment_type": "combined",
"items": [
{
"line_number": 1,
"line_type": 1,
"item_code": "SP001",
"item_name": "Điều chỉnh tăng mặt hàng Sản phẩm A",
"unit": "cái",
"quantity": 1,
"unit_price": 300000,
"tax_rate": 10
},
{
"line_number": 2,
"line_type": 1,
"item_code": "SP002",
"item_name": "Điều chỉnh giảm mặt hàng Sản phẩm B",
"unit": "cái",
"quantity": 1,
"unit_price": -200000,
"tax_rate": 10
}
],
"notes": "Điều chỉnh tăng/giảm cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026",
"is_draft": false
}Information adjustment (info - zero totals, buyer required)
{
"provider_account_id": "{{your-provider-account-id}}",
"original_invoice_reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"adjustment_type": "info",
"buyer": {
"type": "company",
"name": "Công ty ABC",
"legal_name": "CÔNG TY TNHH ABC",
"tax_code": "0101234567",
"address": "456 Đường B, Quận C, Hà Nội",
"email": "buyer@example.com"
},
"items": [
{
"line_number": 1,
"line_type": 4,
"item_name": "Điều chỉnh địa chỉ người mua từ 123 Đường A thành 456 Đường B"
}
],
"notes": "Điều chỉnh thông tin cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026",
"is_draft": false
}Adjusting only the line total after tax
{
"provider_account_id": "{{your-provider-account-id}}",
"original_invoice_reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"adjustment_type": "decrease",
"items": [
{
"line_number": 1,
"line_type": 1,
"item_code": "SP001",
"item_name": "Điều chỉnh giảm mặt hàng Sản phẩm A",
"unit": "cái",
"tax_rate": 10,
"amount": -550000
}
],
"notes": "Điều chỉnh giảm thành tiền cho hóa đơn ký hiệu C26TSE số 589 ngày 26/01/2026",
"is_draft": false
}Next Steps
After a successful request returning a tracking_code:
- Track invoice status - Use the
tracking_codeto check the processing result (required)
- If created as a draft (
is_draft=true): continue with the issue invoice API to issue officially - If created officially (
is_draft=false): you can download the invoice or view its details - the adjustment invoice hasdocument_type6/7/8/9 by type, and the origin becomesdocument_type=10(adjusted)