Preloader

Initiate Payment

Create secure payment transactions with comprehensive parameter control and real-time processing

Initiate Payment

Initiates a new payment transaction with comprehensive parameter control. This endpoint creates a secure payment session and returns a payment URL for user interaction.

Endpoint:
POST {{base_url}}/payment/create
Parameter
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 (optional)
Enter your cancel or failed URL
custom
string (optional)
Transaction ID which can be used for your project transaction
Request Example (Guzzle)
<?php
require_once('vendor/autoload.php');
$client = new GuzzleHttp\Client();
$response = $client->request('POST', '{{base_url}}/authentication/create', [
    'json' => [
        'amount' => '100.00',
        'currency' => 'USD',
        'return_url' => 'www.example.com/success',
        'cancel_url' => 'www.example.com/cancel',
        'custom' => '123456789ABCD',
    ],
    'headers' => [
        'accept' => 'application/json',
        'Authorization' => 'Bearer {{access_token}}',
        'content-type' => 'application/json',
    ],
]);
echo $response->getBody();
                        
Response: SUCCESS (200 OK)
{
    "message": {
        "code": 200,
        "success": [
            "SUCCESS"
        ]
    },
    "data": {
        "access_token": "nyXPO8R",
            "expire_time": 600
    },
    "type": "success"
}
                        
Response: ERROR (400 FAILED)
Copy
{
"message": {
    "code": 400,
    "error": [
        "Invalid secret ID"
    ]
},
"data": [],
"type": "error"
}