dot
Currencies

Our Supported Currencies are listed below.

Currency NameCurrency SymbolCurrency Code
Main Wallet
dot
Obtain API Key

Login to your merchant account.
Go to Merchant App -> API Access Key .

You can find your API keys Public Key and Secret Key in API Access Key menu from merchant dashboard. These keys are required to call API requests. If needed, you can generate a new API key anytime by clicking the Regenerate button. Make sure to keep these keys private and never share them with anyone.

dot
Access Token POST

Access Token is required to make payment requests through the API. It serves as a secure key to authorize and validate your transactions. You can generate the Access Token using your API credentials Public Key and include it in the header of every payment request. Ensure the token is kept secure and updated regularly to maintain the security of your transactions.

Example PHP code


use Illuminate\Support\Facades\Http;

// Set up the API endpoint and your public key
$url = 'https://qunzo-admin.tdevs.co/api/merchant/access-token';
$publicKey = 'your_public_key';

// Make the POST request using Laravel's HTTP client
$response = Http::withHeaders([
    'Content-Type' => 'application/json'
])->post($url, [
    'public_key' => $publicKey,
]);

if ($response->successful()) {
    return response()->json($response->json());
} else {
    return response()->json($response->json());
}

Example Response Success 200


{
    "status": "success",
    "payment_url": "...."
}

Example Response Error (400/401)

// Token invalid or expired (401)
{
    "status": "error",
    "message": "Token is invalid or expired"
}

// For validation rules error (400)
{
    "status": "error",
    "message": [
        "The transaction id has already been taken."
    ]
}
dot
Make Payment POST

To get started with the payment process, simply follow the example code and ensure the parameters are set correctly. Be sure to use the provided API endpoints for your requests.

Request to the endpoint with the following parameters:

Param NameParam TypeDescription
amountfloat|integerRequiredThe amount to be charged for the transaction.
currencystring (4)RequiredCurrency Code (e.g., USD, EUR)
transaction_idstring (12)RequiredA unique identifier for the transaction, consisting of 12 alphanumeric characters.
descriptionstring (20)RequiredA brief description of the transaction.
ipn_urlstring (255)OptionalSend the notification URL where you want to receive the notification.
callback_urlstring (255)OptionalRedirecting the user to the specified URL after the transaction is completed.
customer_namestring (50)OptionalProvide your customer name.
customer_emailstring (50)OptionalProvide your customer email.

Example PHP code

// API endpoint and sandbox credentials
$url = 'https://qunzo-admin.tdevs.co/api/merchant/make-payment';
$authToken = 'your_authorization_token_here'; // Replace with your actual token

// Request payload
$data = [
    'amount' => 100.00, // Example amount
    'currency' => 'USD', // Example currency
    'transaction_id' => 'ABC123456789', // Unique transaction ID
    'description' => 'Test payment', // Transaction description
    'ipn_url' => 'https://yourdomain.com/ipn', // Notification URL (optional)
    'callback_url' => 'https://yourdomain.com/callback', // Callback URL (optional)
    'customer_name' => 'John Doe', // Customer name (optional)
    'customer_email' => 'johndoe@example.com', // Customer email (optional)
];

// Initialize cURL
$ch = curl_init($url);

// Set up the request headers
$headers = [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $authToken, // Add the authorization token
];

// Configure cURL options
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the POST request
$response = curl_exec($ch);

// Handle errors
if (curl_errno($ch)) {
    echo 'cURL Error: ' . curl_error($ch);
} else {
    // Parse and display the response
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if ($httpCode === 200) {
        $responseData = json_decode($response, true);
        print_r($responseData); // Example output
    } else {
        echo 'Error: HTTP Code ' . $httpCode . PHP_EOL;
        echo 'Message: ' . $response . PHP_EOL;
    }
}

// Close cURL
curl_close($ch);

Example Response Success 200

{
    "status": "success",
    "payment_url": "..."
}

Example Response Error (400/401)

// Token invalid or expired (401)
{
    "status": "error",
    "message": "Token is invalid or expired"
}

// For validation rules error (400)
{
    "status": "error",
    "message": [
        "The transaction id has already been taken."
    ]
}
dot
IPN POST

An IPN is a POST request sent to your business application URL to notify about a payment status update. It provides real-time data for identifying and verifying transactions. The key parameters include:

  • URL:Your IPN URL.
  • Method:GET

You will get following parameters below.

Param NameDescription
statusPayment success status.
signatureAt your end, a hash signature is used to verify the payment.
dataThe data includes charges, amount, currency, payment transaction ID, and other relevant details.

Example code

// Assuming the necessary data is available
    $secretKey = ''; // Define your secret key here
    $data = $_GET['data']; // Get the 'data' parameter from the request
    $receivedSignature = $_GET['signature']; // Get the 'signature'

    // Recreate the signature
    $dataToHash = $data['transaction_id'] . $data['total_amount'];
    $generatedSignature = hash_hmac('sha256', $dataToHash, $secretKey);

    // Verify the signature
    if ($generatedSignature === $receivedSignature) {
        // Perform the task
        // Your task execution code here
    }