Create API Access in SePay Test mode

Create API Access in SePay Test mode: a token scoped to Test mode only, authenticates against userapi-sandbox.sepay.vn, never works on Live.

||

API Access in Test mode lets you create an API token that is separate from your Live token, never shared with Live. Tokens are created and managed inside Test mode and only authenticate against the userapi-sandbox.sepay.vn endpoint.

Tokens don't cross environments

Live tokens won't authenticate against userapi-sandbox.sepay.vn, and Test mode tokens won't call the Live userapi.sepay.vn endpoint. Each environment maintains its own token registry.

Open the API Access page in Test mode

Go to Test modeAPI Access.

API Access page in SePay Test mode
Click to expand
API Access page in Test mode with tokens masked

Create an API Access token

Click + Add API in the top-right corner, fill in the fields, and click Add.

FieldDescription
NameA memorable name, e.g. Test integration
StatusActive

Once the token is created, copy the API Token value from the API Access list into your server's environment variable. The token is shown in full only once.

Dialog showing the full token right after creation in SePay Test mode
Click to expand
The token shows in full only once, copy it somewhere safe immediately

Test the connection

With the token in hand, hit a Test mode endpoint to confirm it works:

Bash
1
2
curl -X GET "https://userapi-sandbox.sepay.vn/v2/bank-accounts" \
-H "Authorization: Bearer YOUR_SANDBOX_API_TOKEN"

The response returns the list of accounts created in Test mode (same JSON envelope format as Live).

Manage tokens

On the API Access page in Test mode, each token supports the following actions:

ActionEffect
Toggle on/offTemporarily disable or re-enable the token without deleting it
RenameChange the display name; does not affect the token value
DeletePermanently invalidate the token; cannot be restored

Differences vs Live

The creation and management flow is identical to Live (same fields, same actions). Differences:

AspectLiveTest mode
Auth endpointuserapi.sepay.vnuserapi-sandbox.sepay.vn
Data scopeReal accounts and transactionsTest mode accounts and simulated transactions
Token quotaUnlimitedUp to 50
Creation flowCreate API TokenSame flow, performed inside Test mode's API Access

Next