API / Authentication

Get Access Token

Get access token to initiates payment transaction.

POST {{base_url}}/authentication/token

Parameters

Field Type Description
client_id string Enter merchant API client/primary key
secret_id string Enter merchant API secret key
Request Example — Guzzle (PHP) POST
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST',
  '{{base_url}}/authentication/token', [
  'json' => [
    'client_id'  => 'YOUR_CLIENT_ID',
    'secret_id'  => 'YOUR_SECRET_ID',
  ],
  'headers' => [
    'accept'       => 'application/json',
    'content-type' => 'application/json',
  ],
]);
echo $response->getBody();
Response 200 OK
{
  "message": {
    "code": 200,
    "success": ["SUCCESS"]
  },
  "data": {
    "access_token": "nyXPO8Re5SXP...",
    "expire_time": 600
  },
  "type": "success"
}
Error Response 400 FAILED
{
  "message": {
    "code": 400,
    "error": ["Invalid secret ID"]
  },
  "data": [],
  "type": "error"
}