Track Invoice Creation Status
API to track the processing status of an eInvoice creation request using the tracking_code
API Endpoint
GET
https://einvoice-api-sandbox.sepay.vn/v1/invoices/create/check/{tracking_code}API Request
tracking_codestringrequired
Tracking code returned from the invoice creation API
API Response
Success Response (200)
{
"success": true,
"data": {
"reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"status": "Success",
"message": "Xuất hóa đơn điện tử thành công",
"invoice": {
"reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"invoice_number": "0",
"issued_date": "2025-12-15",
"pdf_url": "https://beta-portalv2.mifi.vn/DownloadPDFCA.aspx?kk=1434747710&keyinv=...",
"xml_url": null,
"status": "draft",
"buyer": {
"name": "Công ty ABC",
"tax_code": "0101234567",
"address": "123 Đường A, Quận B, Hà Nội",
"email": "buyer@example.com",
"phone": "0900000000"
},
"total_before_tax": 200000,
"tax_amount": 20000,
"total_amount": 220000,
"notes": "Ghi chú hóa đơn"
}
}
}successboolean
dataobject
Processing Statuses
| Status | Description |
|---|---|
Pending | Processing - request has been received and is in queue |
Success | Completed - invoice has been created successfully |
Failed | Failed - processing encountered an error, check message for details |
Error Handling
400Bad RequestMissing or invalid tracking_code.
401UnauthorizedMissing or invalid Bearer token.
404Not FoundRequest not found for the provided tracking_code.
Notes
Note
- Use the
tracking_codereturned from the Create eInvoice API. - When
statusisSuccess, theinvoiceobject will contain detailed invoice information includingpdf_urlto download the PDF file. - If
statusisFailed, check themessagefield for the error reason and handle accordingly. - Recommend using a polling mechanism with reasonable intervals (e.g., 2-5 seconds) to check the status.
Code Examples
>
>
>
curl --request GET \--url https://einvoice-api-sandbox.sepay.vn/v1/invoices/create/check/084e179d-d95a-11f0-aef4-52c7e9b4f41b \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Next Steps
Depending on the status result and invoice type:
If status is Success and it's a draft invoice (is_draft=true):
- Issue eInvoice - Use the
reference_codeto officially issue the invoice
If status is Success and it's an official invoice (is_draft=false):
- Download Invoice - Download the PDF or XML file of the invoice
- Invoice Details - View detailed information of the issued invoice
- Invoice List - Manage and query created invoices
If status is Pending:
- Wait and call this API again after 2-5 seconds to check the result
If status is Failed:
- Check the
messagefor the error reason and create a new invoice with corrected information or contact SePay for assistance.