Automate payins, generate round-robin QR sessions, and receive real-time webhook events.
All requests are authenticated using your api_key. You can obtain your keys from the Merchant Hub.
Base URL: https://npfast.site/api/
Create a new checkout session. Returns a session token and hosted checkout_url.
POST https://npfast.site/api/create_payment.php
<?php
$payload = [
'api_key' => 'pk_live_your_api_key_here',
'amount' => 2500.00,
'order_id' => 'ORDER_' . time(),
'customer_name' => 'Ali Khan',
'customer_mobile' => '03001234567'
];
$ch = curl_init('https://npfast.site/api/create_payment.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($response['status'] === 'success') {
// Redirect customer to checkout URL:
header('Location: ' . $response['checkout_url']);
exit;
}
?>
{
"status": "success",
"order_id": "PAY_98F012DA",
"amount": 2500.00,
"currency": "PKR",
"checkout_url": "https://npfast.site/checkout.php?order=PAY_98F012DA",
"easypaisa": {
"account_number": "PK68UMBL0000033401613495",
"account_title": "ASEET - 3495"
}
}
Our matching engine verifies the transaction and delivers an instant HTTP POST callback to your configured webhook_url.
{
"event": "payment.paid",
"order_id": "PAY_98F012DA",
"merchant_order_ref": "ORDER_1792306116",
"amount": 2500.00,
"currency": "PKR",
"trx_id": "402089985762",
"sender_mobile": "03331234567",
"status": "paid",
"timestamp": "2026-10-18 12:00:00"
}
Query the status of any payment order directly from your server:
GET https://npfast.site/api/check_status.php?order_id=PAY_98F012DA&api_key=pk_live_your_key