SePay eInvoice API Sandbox

The SePay eInvoice API Sandbox is a test environment isolated from Production: test creating and issuing eInvoices with simulated data before going live.

||

Sandbox is the SePay eInvoice API test environment, fully isolated from Production. You test the full invoice lifecycle (get a token, create a draft, issue, check status, download files) using simulated data, without issuing real invoices to the tax authority. That makes Sandbox a good fit for development, automated testing, and teaching eInvoice integration.

Sandbox base URL

The base URL for the eInvoice API Sandbox environment:

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

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

Get a Sandbox token

Call POST /v1/token on the Sandbox base URL to get the access_token used by subsequent API calls. For parameters and the response, see Authenticate with Bearer Token.

Call the API on Sandbox

Set the Sandbox base URL einvoice-api-sandbox.sepay.vn and send your Sandbox Bearer token in the header. Example listing invoice providers:

>
>
curl https://einvoice-api-sandbox.sepay.vn/v1/provider-accounts \
-H 'Authorization: Bearer YOUR_SANDBOX_TOKEN'

The full invoice creation and issuance flow is in the Quick Start.

Test it in the browser

Inspect the structure of an eInvoice and preview its layout right in your browser, no code required:

View a demo invoice

Switch to Production when ready

Once your Sandbox tests pass, get a Production token and change the base URL to https://einvoice-api.sepay.vn. The rest of your integration stays the same.