API / Payments

Initiate Payment

Initiates a new payment transaction.

POST {{base_url}}/payment/create

Parameters

Field Type Details
amount decimal Your Amount , Must be rounded at 2 precision.
currency string Currency Code, Must be in Upper Case (Alpha-3 code)
return_url string Enter your return or success URL
cancel_url string (opt) Enter your cancel or failed URL
product_name string Product name or short description
order_number string Merchant order number/reference
custom string (opt) Transaction id which can be used your project transaction
Request Example — Guzzle (PHP) POST
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST',
  '{{base_url}}/payment/create', [
  'json' => [
    'amount'       => '100.00',
    'currency'     => 'USD',
    'return_url'   => 'www.example.com/success',
    'cancel_url'   => 'www.example.com/cancel',
    'product_name' => 'MacBook Air',
    'order_number' => 'ORD-2024-001234',
    'custom'       => '123456789ABCD',
  ],
  'headers' => [
    'Authorization' => 'Bearer {{access_token}}',
    'accept'        => 'application/json',
    'content-type'  => 'application/json',
  ],
]);
echo $response->getBody();
Response 200 OK
{
  "message": {
    "code": 200,
    "success": ["CREATED"]
  },
  "data": {
    "token": "2zMRmT3KeYT2BWMAyGhq...",
    "payment_url": "example.com/pay/..."
  },
  "type": "success"
}
Error Response 403 FAILED
{
  "message": {
    "code": 403,
    "error": ["Requested with invalid token!"]
  },
  "data": [],
  "type": "error"
}