Create API token for SePay API v2

Create an API Token in SePay for authenticating API v2 requests. Required before calling any SePay API v2 endpoint with Bearer token authentication.

||
Note

API Token is shared between API v1 and v2. If you already have a token from v1, you can reuse it without creating a new one.

Steps to Create API Token

  • Step 1: Go to Company Settings → API Access

    Create a Test mode token

    For integration testing without affecting Live data, toggle Test mode in the my.sepay.vn sidebar then open API Access while in Test mode. Tokens created there only authenticate against the userapi-sandbox.sepay.vn endpoint and are fully isolated from Production. Full guide: API Access in Test mode.

  • Step 2: Click the + Add API button at the top right

  • Step 3: Fill in all information, including:

    • Name: Enter any name you prefer
    • Status: Select Active
  • Step 4: Click Add

    • After adding successfully, you will see the API Token in the API Access list.
Note

Currently, SePay does not support permission management for API. This means the created API Key has full access.

How to Use API Token

  • The API Token must be included in the header with every request to the SePay API. Use the format: Authorization: Bearer API_TOKEN

  • Example of using API Token to retrieve transaction information

API Token SePay
Click to expand
API Token SePay