1. Payment Api backend
BasGate Document v2
  • BAS SDK Payment
    • Payment Flow
    • Payment Api backend
      • Introduction
      • Authentication
        POST
      • Initiate Transaction
        POST
      • Check Transaction Status
        POST
    • Frontend Bas Payment SDK
      • Flutter SDK
      • Android SDK
      • IOS SDK
    • Signature
      • Signature (Checksum) Documentation
    • Tools
      • Laravel Payment Gateway SDK
  1. Payment Api backend

Authentication

POST
https://mock.apidog.com/m1/1286474-0-1260791/api/v1/auth/token
Obtain an OAuth access token using client credentials.
Exchange your merchant client_id and client_secret for a short-lived Bearer access token. Include the returned token in the Authorization header of every subsequent merchant API call.
Tokens are valid for expires_in seconds (default 3600). Cache and reuse them until near expiry, then request a new one.

Request

Header Params

Body Params application/x-www-form-urlencodedRequired

Responses

🟢200
application/json
Never call this endpoint from a browser or mobile client. Your client_secret must remain server-side only.
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://mock.apidog.com/m1/1286474-0-1260791/api/v1/auth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'redirect_uri=https://mock.apidog.com/m1/1285076-1283687-1257872/api/v1/auth/callback' \
--data-urlencode 'client_id=sandbox2-f2a1-4a9b-81e3-0a3306e36d9a' \
--data-urlencode 'client_secret=sandbox3-faed-44ff-b28a-4232d518e938'
Response Response Example
{
    "access_token": "SandboxCABB8F09D45695247C9C1F2481C8E9CCB744322BE0C1EFA6CFBAE5221kk",
    "expires_in": 3600
}
Modified at 2026-07-27 14:09:15
Previous
Introduction
Next
Initiate Transaction
Built with