Issue eInvoice (draft)

API to issue an e-invoice from a draft reference_code, returning a tracking code to monitor issuance.


API Endpoint

POST
https://einvoice-api-sandbox.sepay.vn/v1/invoices/issue

API Request

reference_codestringrequired

Reference code of the previously created draft invoice

API Response

Success Response (200)
{
  "success": true,
  "data": {
    "tracking_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
    "tracking_url": "https://einvoice-api-sandbox.sepay.vn/v1/invoices/issue/check/084e179d-d95a-11f0-aef4-52c7e9b4f41b",
    "message": "Đã tạo yêu cầu xuất bán hóa đơn điện tử"
  }
}
successboolean
dataobject

Error Handling

400Bad Request

Missing or invalid reference_code.

401Unauthorized

Missing or invalid Bearer token.

404Not Found

Draft invoice not found for the given reference_code.

Notes

Note
  • Issuance is only allowed for invoices that were previously created as drafts (is_draft=true).
  • reference_code can be retrieved via the Invoice List API or obtained from the reference_code returned after successfully checking the draft invoice creation status.
  • After successfully submitting an invoice issuance request, use the endpoint provided in tracking_url to call the Invoice Issuance Status Tracking API.

Code Examples

>
>
>
>
>
curl --request POST \
--url https://einvoice-api-sandbox.sepay.vn/v1/invoices/issue \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"reference_code":"084e179d-d95a-11f0-aef4-52c7e9b4f41b"}'

Next Steps

After successfully submitting the issuance request and receiving a tracking_code:

  1. Track Invoice Issuance Status - Use the tracking_code to check the issuance result (required)