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 e-invoice integration.
Sandbox base URL
The base URL for the eInvoice API Sandbox environment:
| Environment | Base URL |
|---|---|
| Sandbox | https://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 e-invoice and preview its layout right in your browser, no code required:
View a demo invoiceSwitch 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.