Welcome To payment.bondhonpay.com Docs Last updated: 2025-11-18
Documentation • Clean & Mobile-friendly payment.bondhonpay.com is a simple and Secure payment automation tool which is designed to use personal account as a payment gateway so that you can accept payments from your customer through your website where you will find a complete overview on how payment.bondhonpay.com works and how you can integrate payment.bondhonpay.com API in your website.
API Introduction
payment.bondhonpay.com Payment Gateway enables Merchants to receive money by temporarily redirecting customers to our secure page. After payment the customer is returned to your site and you get server-to-server notification (webhook/verify).
API Operation
Use Live endpoints below. Your server must support cURL/HTTPS.
Live Environment
Create Payment URL
https://payment.bondhonpay.com/api/payment/create
Payment Verify API
https://payment.bondhonpay.com/api/payment/verify
Parameter Details
POST fields for Create Payment
| Field Name | Description | Required | Example |
| cus_name | Customer full name | Yes | John Doe |
| cus_email | Customer email | Yes | john@gmail.com |
| amount | Amount (natural or decimal) | Yes | 10 / 10.50 |
| success_url | Redirect URL (success) | Yes | https://yourdomain.com/payment/success |
| cancel_url | Redirect URL (cancel) | Yes | https://yourdomain.com/payment/cancel |
| webhook_url | Server-to-server callback URL | No (Recommended) | https://yourdomain.com/webhook/bondhonpay |
| metadata | JSON passthrough data | No | {"user_id":123} |
Field for Verify
| Field Name | Description | Required | Example |
| transaction_id | Received from success URL as ?transactionId=XXXX (gateway reference) | Yes | OVKPXW165414 |
Headers (Brand Key only)
| Header Name | Value |
| Content-Type | application/json |
| API-KEY | Your BRAND KEY |
Integration
Integrate into PHP/Laravel/WordPress/WooCommerce etc.
Sample Request (Laravel)
<?php// Create Payment$response = Http::withHeaders([ 'API-KEY' => env('BONDHONPAY_BRAND_KEY'), 'Content-Type' => 'application/json',])->post("https://payment.bondhonpay.com/api/payment/create", [ 'cus_name' => $user->full_name, 'cus_email' => $user->email, 'amount' => 100, 'metadata' => ['user_id' => $user->id], 'success_url' => route('payment.success'), 'cancel_url' => route('payment.cancel'), 'webhook_url' => url('/webhook/bondhonpay'),]);// Redirect to $response['payment_url']
Verify Request (Laravel)
$verify = Http::withHeaders([ 'API-KEY' => env('BONDHONPAY_BRAND_KEY'), 'Content-Type' => 'application/json',])->post("https://payment.bondhonpay.com/api/payment/verify", [ 'transaction_id' => request('transactionId'),]);// $verify->json() contains gateway reference + may include message
Save trx_id (Real bkash/nagad TrxID)
transaction_id = Gateway Reference (12–13 chars). trx_id = Real MFS TrxID (SMS/Statement এ থাকে)। দুটোই রাখুন।
DB schema (add columns)
ALTER TABLE payments ADD COLUMN IF NOT EXISTS trx_id VARCHAR(32) NULL AFTER transaction_id, ADD COLUMN IF NOT EXISTS message TEXT NULL AFTER payment_method;
Webhook – best place to save both
<?phpfunction extractTrxId(?string $msg): ?string { if (!$msg) return null; return preg_match('/\b(TrxID|TxnID)[:\s]+([A-Za-z0-9]+)/i', $msg, $m) ? $m[2] : null;}
Success fallback (যদি webhook miss হয়)
$verify = Http::withHeaders([ 'API-KEY' => env('BONDHONPAY_BRAND_KEY'), 'Content-Type' => 'application/json',])->post("https://payment.bondhonpay.com/api/payment/verify", [ 'transaction_id' => request('transactionId'),]);
Modules