Issue eInvoices for household businesses and enterprises

Issue eInvoices for household businesses and enterprises via SePay eInvoice API: create, issue, track, and download invoices per Decree 123/2020/ND-CP.

||

What is SePay eInvoice API?

SePay eInvoice API lets household businesses and enterprises issue eInvoices compliant with Decree 123/2020/ND-CP and Circular 78/2021/TT-BTC. Through a single RESTful API, your system can create invoices, issue them to the tax authority (CQT), and manage the full invoice lifecycle automatically.

The API covers the complete invoice lifecycle: from draft creation, issuance to CQT, real-time status tracking, file download (PDF/XML), and usage quota management, all via a standard RESTful HTTP interface.

View demo invoice

Who is this for?

eInvoice API is designed for organizations and developers who need to automate the eInvoice issuance process:

1
Household Businesses & Enterprises

Issue an eInvoice for each sale transaction to meet invoicing requirements under Decree 123/2020/ND-CP.

SaaS & ERP Platforms

Embed eInvoice issuance directly into your sales, accounting, or order management workflows.

High-volume Invoice Issuers

Fully automate batch invoice creation and issuance, reducing manual work and errors at scale.

Accounting Software

Connect directly to CQT to issue and sync invoice status, supporting reconciliation and compliant storage.

E-commerce Platforms

Automatically issue an invoice for each completed order to meet per-transaction invoice requirements.

Developers Building Solutions

Add eInvoice issuance to your product to serve enterprise clients.


Key Features

Create eInvoices

Create draft or live invoices via POST v1/invoices/create, supporting multiple invoice templates and series.

Issue to Tax Authority

Submit invoices to CQT through your configured eInvoice provider using POST v1/invoices/issue.

Async Status Tracking

Poll create/issue results in real time via /check/{tracking_code} before proceeding to the next step.

Retrieve & Download Invoices

Fetch issued invoice details including CQT-compliant PDF and XML file URLs.

Usage Quota Monitoring

Track remaining issuance quota via GET v1/usage to plan your service usage.

Provider Account Management

List and inspect configured eInvoice provider accounts including templates, series, and status.


eInvoice issuance flow

eInvoice issuance flow
Rendering diagram...

The eInvoice flow covers every step from authentication and account checks to invoice creation, issuance, and retrieval:

  1. Obtain access token: Call POST v1/token to receive an access_token used for all subsequent API calls.

  2. List provider accounts: Call GET v1/provider-accounts to view available eInvoice provider accounts and their statuses.

  3. Get provider account detail: Call GET v1/provider-accounts/{id} for the specific configuration: allowed templates, series, and activity status.

  4. Create invoice: Submit invoice data via POST v1/invoices/create. The API returns a tracking_code to track the creation job.

  5. Check creation status: Poll GET v1/invoices/create/check/{tracking_code} to confirm whether creation succeeded or failed.

  6. Issue invoice: Trigger issuance via POST v1/invoices/issue. A new tracking_code is returned for this stage.

  7. Check issuance status: Poll GET v1/invoices/issue/check/{tracking_code} to confirm the result of submission to CQT.

  8. Retrieve invoice details: Once issuance completes, call GET v1/invoices/{reference_code} to fetch full invoice data plus PDF and XML file URLs.

  9. Check usage quota: Call GET v1/usage to monitor remaining issuance quota.

  10. List invoices: Call GET v1/invoices to retrieve a paginated invoice list for monitoring and reconciliation.

  11. Email logs: Call GET v1/email-logs to query which email address an invoice was sent to, the delivery status, and the timestamp (available on both Production and Sandbox; on Sandbox the data is simulated from issued invoices).

Asynchronous Processing

The Create and Issue steps are processed asynchronously. After calling each step, you must poll the corresponding /check API to confirm the status before proceeding to the next step.


Environments

EnvironmentBase URL
Productionhttps://einvoice-api.sepay.vn
Sandboxhttps://einvoice-api-sandbox.sepay.vn

Authenticate using a Bearer token in the request header: Authorization: Bearer <ACCESS_TOKEN>

If you are just getting started, test on Sandbox before switching to Production. How to get a Sandbox token, call the API, and what's isolated are covered in SePay eInvoice API Sandbox.


Next Steps

To start using the eInvoice API, follow these steps in order:

  1. Authenticate with Bearer Token: Get a Bearer token to authenticate subsequent API calls
  2. List eInvoice Providers: View available eInvoice provider accounts
  3. Issue an eInvoice: Start creating your first invoice