Get Access Token

Get access token to initiates payment transaction.

Endpoint: POST {{base_url}}/authentication/token
Parameter Type Comments
client_id string Enter merchant API client/primary key
secret_id string Enter merchant API secret key
Just request to that endpoint with all parameter listed below:
                        
                            Request Example (guzzle)
                            

?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', '{{base_url}}/authentication/token', [
“client_id”: "tRCDXCuztQzRYThPwlh1KXAYm4bG3rwWjbxM2R63kTefrGD2B9jNn6JnarDf7ycxdzfnaroxcyr5cnduY6AqpulRSebwHwRmGerA",
“secret_id”: "oZouVmqHCbyg6ad7iMnrwq3d8wy9Kr4bo6VpQnsX6zAOoEs4oxHPjttpun36JhGxDl7AUMz3ShUqVyPmxh4oPk3TQmDF7YvHN5M3",
],
'headers' => [
;'accept' => 'application/json',
'content-type' => 'application/json',
;],
]);
echo $response->getBody();
                        
                            
**Response: SUCCESS (200 OK)**
{
"message": {
"code": 200,
"success": [
"SUCCESS"
]
},
"data": {
"access_token":"nyXPO8Re5SXP1c5gMqHbW6DQ5BfQdbYGpuWVjEQAP76SUT7YfdngoFzDGSNHTvmzq8AjPRrCyzxzukrJvOlSSwtAPAqjvAQJdse4YOnlHasD3vg6EYg6qyKxSiHeXBoRluD2NbZzxN3sAYVqd9q1XCAl7oaW3BbJl2ktEQWBUuNYMZPQaDyNEGwxoY389TCNJvxVcroveYxPJkYANvnaxOy16aE9Qp6EBClSjvK17WR3cJupTXlUhgw9ddpv1gDSlbDJvzKutrQX7XJqwk1GW1Dm6aK4PTn1D4mvMVqiOqQKigTzcEi2KPQnkoM86ONw3X8SxttFOfesdSwxKJMXuQpdnFHOjo",
"expire_time": 600
},
"type": "success"
}
                        
                            
**Response: ERROR (400 FAILED)**
{
"message": {
"code": 400,
"error": [
"Invalid secret ID"
]
},
"data": [],
"type": "error"
}