Developers

Build payments for Bangladesh in an afternoon.

Clean REST API, eight first-class SDKs, signed webhooks, and drop-in plugins for the platforms you already use. Test mode is always free — no card or KYC required.

API v2024-05
99.99% uptime
PCI DSS L1
5-min quickstart
For developers

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
POST /v1/charges
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" },
});
Quickstart

Your first charge, in any language.

Copy, paste, run. The same request works in sandbox and production — only the key changes.

ts
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);
SDKs & libraries

First-class clients for every common stack.

Node / TypeScript

truepay

bun add truepay
github.com/truepay/truepay-node

Python

truepay

pip install truepay
github.com/truepay/truepay-python

PHP

truepay/truepay-php

composer require truepay/truepay-php
github.com/truepay/truepay-php

Go

truepay-go

go get github.com/truepay/truepay-go
github.com/truepay/truepay-go

Java

com.truepay:truepay-java

implementation 'com.truepay:truepay-java:3.4.0'
github.com/truepay/truepay-java

.NET

TruePay

dotnet add package TruePay
github.com/truepay/truepay-dotnet

React / Web

@truepay/elements

bun add @truepay/elements
github.com/truepay/elements

React Native

@truepay/react-native

bun add @truepay/react-native
github.com/truepay/react-native
Modules & plugins

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

v2.4.1

E-commerce · May 2026

Drop-in payment gateway for WordPress + WooCommerce. Adds all TruePay methods to checkout.

PHPWordPressCheckout

Install

wp plugin install truepay-for-woocommerce --activate
18.4k · 412 KB

Shopify app

v1.8.0

E-commerce · Apr 2026

Custom payment app for Shopify Plus stores. Local methods at checkout, BDT settlement.

ShopifyCheckout

Install

shopify app install truepay
3.2k installs

Magento 2 module

v1.5.2

E-commerce · Mar 2026

Composer module for Adobe Commerce / Magento 2. Async webhooks and refund workflow.

PHPAdobe Commerce

Install

composer require truepay/module-magento2

Next.js starter

v3.0.0

Framework · May 2026

Type-safe checkout, App Router, hosted + embedded flows, signed webhook example.

TypeScriptReactApp Router

Install

bunx create-truepay-app@latest --template next
9.6k · 94 KB

Laravel package

v4.2.0

Framework · Apr 2026

Service provider, facades, Eloquent models for charges, refunds, and webhook router.

PHPLaravel 11+

Install

composer require truepay/laravel

Django app

v2.1.0

Framework · Feb 2026

Pluggable Django app with views, models, admin, and signed webhook receiver.

PythonDjango 5+

Install

pip install truepay-django

Strapi plugin

v1.2.0

CMS · Mar 2026

Sell digital products from your Strapi headless CMS. Adds a payments collection type.

NodeHeadless CMS

Install

bun add strapi-plugin-truepay

Ghost integration

v0.9.4

CMS · Feb 2026

Take memberships and one-off tips on Ghost publications with local payment methods.

MembershipsCMS

Zapier app

v2.0

No-code · Apr 2026

Trigger on charges, refunds, payouts. Create charges from any Zapier flow.

No-codeAutomation

Make (Integromat)

v1.0

No-code · Jan 2026

Visual workflows for payments, payouts and refunds — no code required.

No-codeAutomation
REST API

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
Events

Webhook events

  • charge.succeeded
    Sent when a charge is captured.
  • charge.failed
    Sent when a charge is declined or expires.
  • charge.refunded
    Sent when a refund completes.
  • charge.dispute.opened
    Sent when a customer raises a chargeback.
  • charge.dispute.closed
    Sent when a dispute is resolved.
  • payout.paid
    Sent when funds land in your bank account.
  • payout.failed
    Sent when a payout is rejected by the bank.
  • customer.created
    Sent when a customer object is created.
  • payment_method.attached
    Sent when a method is tokenised.
Webhooks

Verify every event you receive.

We sign every payload with HMAC-SHA256. Reject any request whose signature doesn't match.

ts
// 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");
      },
    },
  },
});
Operational reference

Limits & quotas.

ResourceLimitNotes
Reads100 req/sPer account, bursts to 200 for 10s
Writes25 req/sPer account, bursts to 50 for 10s
Webhook delivery2s timeout7 retries, exponential backoff up to 24h
Max metadata50 keysPer object, 500 chars per value
Idempotency window24 hoursRe-using a key returns the original response
Pagination100 per pageCursor-based via starting_after / ending_before

Get your API keys

Sandbox keys are issued instantly. Switch to live once your KYC is approved — usually under 48 hours.