1. Quickstart
FuturePay turns your personal or merchant MFS accounts (bKash, Nagad, Rocket, Upay) and Crypto wallets into an automated payment gateway.
POST /api/payment/create to generate a checkout URL for your customer.
Integrate automated real-time payments for bKash, Nagad, Rocket, Upay & Crypto with simple JSON APIs, webhooks, and pre-built checkout modules.
FuturePay turns your personal or merchant MFS accounts (bKash, Nagad, Rocket, Upay) and Crypto wallets into an automated payment gateway.
POST /api/payment/create to generate a checkout URL for your customer.
Every API request requires your merchant API Key. You can pass it either via the HTTP headers or as a query parameter.
Alternatively, you may pass api_key=YourKeyHere inside the JSON request body. Keep your API key secret and never expose it in clientside code.
Here is the end-to-end checkout flow:
POST https://payment.futureitlab.com/api/payment/create with amount and redirect URLs.payment_url (e.g. https://payment.futureitlab.com/api/execute/SESSION_ID). You redirect the customer to this link.success_url, and an automated background webhook is dispatched to your webhook_url.Generates a secure, temporary checkout session and returns a URL to which you redirect your customer.
| 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. |
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"])
{
"status": 1,
"message": "Payment Link",
"payment_url": "https://payment.futureitlab.com/api/execute/95c154618ffbdc15be67048d06853715"
}
Query the status of any transaction anytime using the generated Transaction ID.
| Parameter | Type | Status | Description |
|---|---|---|---|
| transaction_id | string | Required | The unique transaction ID returned upon payment completion. |
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"
}'
{
"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\"}"
}
If you provide a webhook_url when creating the payment session, FuturePay sends an asynchronous POST request as soon as payment verification completes.
success_url.
{
"status": "COMPLETED",
"transaction_id": "FPTRX98765432",
"amount": 500.00,
"currency": "BDT",
"payment_method": "bkash",
"metadata": {
"order_id": "ORD-12345"
}
}
Don't want to write custom API code? Download our official plug-and-play integrations for popular CMS and billing platforms.
Plug-and-play payment gateway for WordPress WooCommerce. Works with Classic Checkout and Blocks.
Automate web hosting invoice payments inside WHMCS. Marks invoices paid automatically via IPN.
Pre-configured Controller, routes, and webhook receiver ready to drop into any Laravel 10/11 app.
Zero-dependency, clean PHP client class with methods for payment creation, status verification, and webhook handling.
The core mobile gateway app that forwards incoming bank/MFS SMS notifications to your FuturePay account in real-time.
Send live test requests directly to the FuturePay API from your browser and view real-time JSON responses.
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). |