API v2.0 · Live & Operational

FuturePay Developer Documentation

Integrate automated real-time payments for bKash, Nagad, Rocket, Upay & Crypto with simple JSON APIs, webhooks, and pre-built checkout modules.

Base URL: https://payment.futureitlab.com/api
Get API Keys Quickstart Guide →
Supported Gateways Automated
bKash Personal/Merchant Nagad Rocket Upay Binance Pay & Crypto
All payments match device SMS notifications instantly or verify through official OpenAPIs.

1. Quickstart

FuturePay turns your personal or merchant MFS accounts (bKash, Nagad, Rocket, Upay) and Crypto wallets into an automated payment gateway.

1. Create a Merchant
Go to your Merchant Console and get your unique API Key.
2. Connect Android Device
Install the FuturePay Android app to synchronize incoming payment SMS messages automatically.
3. Make Your 1st Call
Call POST /api/payment/create to generate a checkout URL for your customer.

2. Authentication

Every API request requires your merchant API Key. You can pass it either via the HTTP headers or as a query parameter.

Header Authentication (Recommended):
API-KEY: 9JAIY696IRdDOJQfwzdOOTUwKvsgxZAQ...

Alternatively, you may pass api_key=YourKeyHere inside the JSON request body. Keep your API key secret and never expose it in clientside code.

3. Payment Lifecycle

Here is the end-to-end checkout flow:

  1. Initiate: Your server calls POST https://payment.futureitlab.com/api/payment/create with amount and redirect URLs.
  2. Redirect: FuturePay returns a hosted payment_url (e.g. https://payment.futureitlab.com/api/execute/SESSION_ID). You redirect the customer to this link.
  3. Customer Pays: The customer chooses bKash, Nagad, Rocket, Upay, or Crypto, views the merchant number or QR, sends money, and enters their Transaction ID (TrxID).
  4. Verification: FuturePay matches the TrxID with device SMS messages or Binance OpenAPIs in real-time.
  5. Completion: Upon success, the customer is redirected to your success_url, and an automated background webhook is dispatched to your webhook_url.

4. Create Payment Session

POST Request

Generates a secure, temporary checkout session and returns a URL to which you redirect your customer.

POST https://payment.futureitlab.com/api/payment/create
Request Parameters
Parameter Type Status Description
amount numeric Required Payment amount in BDT (or merchant currency). e.g. 500
success_url string (url) Required URL to redirect customer after successful verification.
cancel_url string (url) Required URL to redirect customer if they cancel checkout.
webhook_url string (url) Optional Callback IPN URL on your server that receives instant payment notification.
metadata object/json Optional Custom key-value pairs (e.g. order_id, customer_name) returned upon completion.
Code Examples
curl -X POST "https://payment.futureitlab.com/api/payment/create" \
  -H "Content-Type: application/json" \
  -H "API-KEY: YOUR_MERCHANT_API_KEY" \
  -d '{
    "amount": 500,
    "success_url": "https://yourdomain.com/payment/success",
    "cancel_url": "https://yourdomain.com/payment/cancel",
    "webhook_url": "https://yourdomain.com/api/payment-webhook",
    "metadata": {
      "order_id": "ORD-12345",
      "customer_name": "Rahim Khan"
    }
  }'
<?php
$payload = [
    'amount'      => 500,
    'success_url' => 'https://yourdomain.com/payment/success',
    'cancel_url'  => 'https://yourdomain.com/payment/cancel',
    'webhook_url' => 'https://yourdomain.com/api/payment-webhook',
    'metadata'    => [
        'order_id'      => 'ORD-12345',
        'customer_name' => 'Rahim Khan',
    ]
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL            => 'https://payment.futureitlab.com/api/payment/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode($payload),
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
        'API-KEY: YOUR_MERCHANT_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$result = json_decode($response, true);
if (!empty($result['payment_url'])) {
    // Redirect customer to the checkout page
    header('Location: ' . $result['payment_url']);
    exit;
}
<?php
use GuzzleHttp\Client;

$client = new Client();
$response = $client->post('https://payment.futureitlab.com/api/payment/create', [
    'headers' => [
        'Content-Type' => 'application/json',
        'API-KEY'      => 'YOUR_MERCHANT_API_KEY',
    ],
    'json' => [
        'amount'      => 500,
        'success_url' => 'https://yourdomain.com/payment/success',
        'cancel_url'  => 'https://yourdomain.com/payment/cancel',
        'webhook_url' => 'https://yourdomain.com/api/payment-webhook',
        'metadata'    => [
            'order_id' => 'ORD-12345',
        ],
    ],
]);

$data = json_decode($response->getBody(), true);
return redirect($data['payment_url']);
const axios = require('axios');

async function createPayment() {
    try {
        const response = await axios.post('https://payment.futureitlab.com/api/payment/create', {
            amount: 500,
            success_url: 'https://yourdomain.com/payment/success',
            cancel_url: 'https://yourdomain.com/payment/cancel',
            webhook_url: 'https://yourdomain.com/api/payment-webhook',
            metadata: {
                order_id: 'ORD-12345',
                customer_name: 'Rahim Khan'
            }
        }, {
            headers: {
                'Content-Type': 'application/json',
                'API-KEY': 'YOUR_MERCHANT_API_KEY'
            }
        });

        // Redirect user to payment URL
        console.log('Payment URL:', response.data.payment_url);
        return response.data.payment_url;
    } catch (error) {
        console.error('Payment creation failed:', error.response ? error.response.data : error.message);
    }
}
import requests

url = "https://payment.futureitlab.com/api/payment/create"
headers = {
    "Content-Type": "application/json",
    "API-KEY": "YOUR_MERCHANT_API_KEY"
}
payload = {
    "amount": 500,
    "success_url": "https://yourdomain.com/payment/success",
    "cancel_url": "https://yourdomain.com/payment/cancel",
    "webhook_url": "https://yourdomain.com/api/payment-webhook",
    "metadata": {
        "order_id": "ORD-12345"
    }
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

if data.get("status") == 1:
    print("Redirect to:", data["payment_url"])
Sample JSON Response
200 OK — Session Created
{
  "status": 1,
  "message": "Payment Link",
  "payment_url": "https://payment.futureitlab.com/api/execute/95c154618ffbdc15be67048d06853715"
}

5. Verify Payment Status

POST Request

Query the status of any transaction anytime using the generated Transaction ID.

POST https://payment.futureitlab.com/api/payment/verify
Request Body
Parameter Type Status Description
transaction_id string Required The unique transaction ID returned upon payment completion.
cURL Verification Example
HTTP Request
curl -X POST "https://payment.futureitlab.com/api/payment/verify" \
  -H "Content-Type: application/json" \
  -H "API-KEY: YOUR_MERCHANT_API_KEY" \
  -d '{
    "transaction_id": "FPTRX98765432"
  }'
Verification Response
200 OK — Payment Verified
{
  "status": "COMPLETED",
  "amount": "500.00",
  "transaction_id": "FPTRX98765432",
  "payment_method": "bkash",
  "cus_name": "Rahim Khan",
  "cus_email": "rahim@example.com",
  "metadata": "{\"order_id\":\"ORD-12345\"}"
}

6. Webhooks & IPN Callbacks

If you provide a webhook_url when creating the payment session, FuturePay sends an asynchronous POST request as soon as payment verification completes.

Webhooks ensure your database is updated even if the user closes their browser before redirecting to success_url.
Webhook Payload Example
Payload dispatched to webhook_url
{
  "status": "COMPLETED",
  "transaction_id": "FPTRX98765432",
  "amount": 500.00,
  "currency": "BDT",
  "payment_method": "bkash",
  "metadata": {
    "order_id": "ORD-12345"
  }
}

7. Ready-to-Use Modules & Plugins

Don't want to write custom API code? Download our official plug-and-play integrations for popular CMS and billing platforms.

WooCommerce Plugin

Plug-and-play payment gateway for WordPress WooCommerce. Works with Classic Checkout and Blocks.

Download Plugin (.zip)
WHMCS Gateway Module

Automate web hosting invoice payments inside WHMCS. Marks invoices paid automatically via IPN.

Download Module (.zip)
Laravel Sample Controller

Pre-configured Controller, routes, and webhook receiver ready to drop into any Laravel 10/11 app.

Download Sample (.zip)
Official PHP SDK Helper

Zero-dependency, clean PHP client class with methods for payment creation, status verification, and webhook handling.

Android SMS Sync App

The core mobile gateway app that forwards incoming bank/MFS SMS notifications to your FuturePay account in real-time.

Download APK (~8.9 MB)

8. Interactive API Playground (Try Live)

Send live test requests directly to the FuturePay API from your browser and view real-time JSON responses.

Live Sandbox Runner
Want to test Bangla QR & SMS Matching without real money? Use our built-in simulator to push mock bKash/Nagad/Rocket SMS alerts instantly.
Open Simulator
Find this in your Merchant Console.

9. Status & Error Codes

FuturePay returns standard HTTP response codes alongside JSON payload diagnostics.

HTTP Code Status Value Description
200 OK COMPLETED / 1 Request succeeded or payment completed and verified.
200 OK PENDING Checkout session initiated; customer has not submitted payment yet.
400 Bad Request 0 / error Missing required parameters or malformed JSON body.
404 Not Found 0 Invalid API key, non-existent merchant, or invalid transaction ID.
422 Unprocessable failed Transaction ID verification failed (no matching SMS or invalid format).