Merchant API Reference
The Bridge Pay Merchant API lets you accept payments, create direct purchase links, and reconcile transactions programmatically. It is organised around REST: predictable, resource-oriented URLs, JSON-encoded requests and responses, and standard HTTP verbs.
Authentication
Authenticate requests by sending your secret key in the Authorization
header as a bearer token. Keep your secret key private; never expose it in client-side code
or public repositories. Use your public key for the hosted checkout only.
Authorization: Bearer <YOUR_SECRET_KEY>
Errors
Bridge Pay uses conventional HTTP status codes to indicate success or failure.
| Code | Meaning |
|---|---|
200 | OK — the request succeeded. |
201 | Created — a resource was created. |
400 | Bad Request — a parameter was missing or invalid. |
401 | Unauthorized — invalid or missing API key. |
404 | Not Found — the resource does not exist. |
429 | Too Many Requests — you hit a rate limit. |
Charges
A charge represents a single payment from a customer to your account.
Create a charge
| Parameter | Type | Description |
|---|---|---|
amount | number | Required. Amount to charge (e.g. 1500). |
currency | string | Required. ISO currency code, e.g. BDT. |
method | string | Required. One of bKash, Nagad, Rocket, Upay. |
customer_email | string | Customer's email for the receipt. |
reference | string | Your internal order reference. |
curl https://api.bridgepaysolution.com/v1/charges \ -H "Authorization: Bearer" \ -d amount=1500 \ -d currency=BDT \ -d method=bKash \ -d customer_email=customer@example.com
Example response:
{
"id": "txn_8fa21b7c9d10",
"object": "charge",
"amount": 1500,
"currency": "BDT",
"method": "bKash",
"status": "success",
"reference": "ORD-1A2B3C4D",
"created_at": "2026-06-20T15:30:00Z"
}
Transactions
List transactions
Returns a list of transactions, most recent first. Supports filtering by status and method.
curl https://api.bridgepaysolution.com/v1/transactions?status=success \ -H "Authorization: Bearer"
Retrieve a transaction
Payment Links
Payment links let you accept direct purchases without writing any code — share the URL and get paid.
Create a payment link
| Parameter | Type | Description |
|---|---|---|
title | string | Required. What the customer is paying for. |
amount | number | Fixed amount (omit if custom_amount is true). |
custom_amount | boolean | Let the customer choose the amount. |
description | string | Optional description shown at checkout. |
{
"id": "plink_premium_monthly",
"object": "payment_link",
"title": "Premium Plan — Monthly",
"amount": 1500,
"url": "https://bridgepaysolution.com/pay.html?link=plink_premium_monthly",
"status": "active"
}
Delete a payment link
Webhooks
Configure a webhook endpoint to receive real-time notifications when a transaction's status
changes. Bridge Pay sends a signed POST request with the event payload.
| Event | Description |
|---|---|
charge.succeeded | A payment was completed successfully. |
charge.pending | A payment is awaiting settlement. |
charge.failed | A payment failed or was declined. |