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.

BASE https://api.bridgepaysolution.com/v1
💡 You can grab your API keys from the dashboard under API & Keys. The demo account uses sandbox keys — no real money moves.

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.

CodeMeaning
200OK — the request succeeded.
201Created — a resource was created.
400Bad Request — a parameter was missing or invalid.
401Unauthorized — invalid or missing API key.
404Not Found — the resource does not exist.
429Too Many Requests — you hit a rate limit.

Charges

A charge represents a single payment from a customer to your account.

Create a charge

POST /v1/charges
ParameterTypeDescription
amountnumberRequired. Amount to charge (e.g. 1500).
currencystringRequired. ISO currency code, e.g. BDT.
methodstringRequired. One of bKash, Nagad, Rocket, Upay.
customer_emailstringCustomer's email for the receipt.
referencestringYour 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

GET /v1/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

GET /v1/transactions/:id

Payment links let you accept direct purchases without writing any code — share the URL and get paid.

Create a payment link

POST /v1/payment_links
ParameterTypeDescription
titlestringRequired. What the customer is paying for.
amountnumberFixed amount (omit if custom_amount is true).
custom_amountbooleanLet the customer choose the amount.
descriptionstringOptional 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

DELETE /v1/payment_links/:id

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.

EventDescription
charge.succeededA payment was completed successfully.
charge.pendingA payment is awaiting settlement.
charge.failedA payment failed or was declined.
Ready to build? Create a merchant account and grab your API keys.