A predictable API. Webhooks that fire. SDKs you'd actually use.
REST + JSON, idempotent writes, signed webhooks, test mode by default, and parity across every payment method. Ship in an afternoon.
- • SDKs for Node, Python, PHP, Go, Java, .NET
- • Webhooks with HMAC signatures and automatic retries
- • Test mode with realistic bKash/Nagad/Rocket flows
- • Status page and uptime guarantees, transparent incidents
import TruePay from "truepay";
const tp = new TruePay(process.env.TRUEPAY_SECRET);
const charge = await tp.charges.create({
amount: 2450,
currency: "bdt",
method: "bkash",
customer: { msisdn: "+8801712345456" },
});Your first charge, in any language.
Copy, paste, run. The same request works in sandbox and production — only the key changes.
import TruePay from "truepay";
const tp = new TruePay(process.env.TRUEPAY_SECRET_KEY!);
const charge = await tp.charges.create({
amount: 10_000,
currency: "bdt",
method: "bkash",
customer: { phone: "+8801700000001" },
description: "Order #1024",
metadata: { order_id: "1024" },
});
console.log(charge.id, charge.status);First-class clients for every common stack.
Java
com.truepay:truepay-java
implementation 'com.truepay:truepay-java:3.4.0'github.com/truepay/truepay-java
Drop-in modules for the platforms you already use.
Download a release, install via package manager, or fork the source. Every plugin ships with signed webhooks, refunds, and full BDT settlement out of the box.
WooCommerce plugin
E-commerce · May 2026
Drop-in payment gateway for WordPress + WooCommerce. Adds all TruePay methods to checkout.
Install
wp plugin install truepay-for-woocommerce --activateShopify app
E-commerce · Apr 2026
Custom payment app for Shopify Plus stores. Local methods at checkout, BDT settlement.
Install
shopify app install truepayMagento 2 module
E-commerce · Mar 2026
Composer module for Adobe Commerce / Magento 2. Async webhooks and refund workflow.
Install
composer require truepay/module-magento2Next.js starter
Framework · May 2026
Type-safe checkout, App Router, hosted + embedded flows, signed webhook example.
Install
bunx create-truepay-app@latest --template nextLaravel package
Framework · Apr 2026
Service provider, facades, Eloquent models for charges, refunds, and webhook router.
Install
composer require truepay/laravelDjango app
Framework · Feb 2026
Pluggable Django app with views, models, admin, and signed webhook receiver.
Install
pip install truepay-djangoStrapi plugin
CMS · Mar 2026
Sell digital products from your Strapi headless CMS. Adds a payments collection type.
Install
bun add strapi-plugin-truepayGhost integration
CMS · Feb 2026
Take memberships and one-off tips on Ghost publications with local payment methods.
Zapier app
No-code · Apr 2026
Trigger on charges, refunds, payouts. Create charges from any Zapier flow.
Endpoints
- POST/v1/chargesCreate a charge
- GET/v1/charges/:idRetrieve a charge
- GET/v1/chargesList charges (paginated)
- POST/v1/charges/:id/captureCapture an authorized charge
- POST/v1/refundsRefund a charge (full or partial)
- POST/v1/customersCreate a customer
- GET/v1/customers/:idRetrieve a customer
- POST/v1/payment_methodsSave a tokenised method
- POST/v1/payoutsTrigger a manual payout
- GET/v1/payoutsList payouts
- POST/v1/disputes/:id/evidenceSubmit dispute evidence
- POST/v1/webhook_endpointsRegister a webhook endpoint
- DELETE/v1/webhook_endpoints/:idRemove a webhook endpoint
Webhook events
- charge.succeededSent when a charge is captured.
- charge.failedSent when a charge is declined or expires.
- charge.refundedSent when a refund completes.
- charge.dispute.openedSent when a customer raises a chargeback.
- charge.dispute.closedSent when a dispute is resolved.
- payout.paidSent when funds land in your bank account.
- payout.failedSent when a payout is rejected by the bank.
- customer.createdSent when a customer object is created.
- payment_method.attachedSent when a method is tokenised.
Verify every event you receive.
We sign every payload with HMAC-SHA256. Reject any request whose signature doesn't match.
// app/routes/api/public/truepay-webhook.ts
import { createFileRoute } from "@tanstack/react-router";
import TruePay from "truepay";
export const Route = createFileRoute("/api/public/truepay-webhook")({
server: {
handlers: {
POST: async ({ request }) => {
const body = await request.text();
const sig = request.headers.get("x-truepay-signature")!;
const evt = TruePay.webhooks.verify(body, sig, process.env.TRUEPAY_WEBHOOK_SECRET!);
switch (evt.type) {
case "charge.succeeded": /* fulfil order */ break;
case "charge.refunded": /* update ledger */ break;
case "dispute.opened": /* alert ops */ break;
}
return new Response("ok");
},
},
},
});Limits & quotas.
| Resource | Limit | Notes |
|---|---|---|
| Reads | 100 req/s | Per account, bursts to 200 for 10s |
| Writes | 25 req/s | Per account, bursts to 50 for 10s |
| Webhook delivery | 2s timeout | 7 retries, exponential backoff up to 24h |
| Max metadata | 50 keys | Per object, 500 chars per value |
| Idempotency window | 24 hours | Re-using a key returns the original response |
| Pagination | 100 per page | Cursor-based via starting_after / ending_before |
