payment.bondhonpay.com Docs

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 NameDescriptionRequiredExample
cus_nameCustomer full nameYesJohn Doe
cus_emailCustomer emailYesjohn@gmail.com
amountAmount (natural or decimal)Yes10 / 10.50
success_urlRedirect URL (success)Yeshttps://yourdomain.com/payment/success
cancel_urlRedirect URL (cancel)Yeshttps://yourdomain.com/payment/cancel
webhook_urlServer-to-server callback URLNo (Recommended)https://yourdomain.com/webhook/bondhonpay
metadataJSON passthrough dataNo{"user_id":123}

Field for Verify

Field NameDescriptionRequiredExample
transaction_idReceived from success URL as ?transactionId=XXXX (gateway reference)YesOVKPXW165414

Headers (Brand Key only)

Header NameValue
Content-Typeapplication/json
API-KEYYour 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'),]);