Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Type-safe open-source TypeScript monorepo for integrating bKash payments into web applications, mobile apps, and serverless environments.
Disclaimer: This is an unofficial community project and is NOT affiliated with, endorsed by, or sponsored by bKash Limited. "bKash" is a registered trademark of bKash Limited.
| Package | Version | Description | Readme |
|---|---|---|---|
bkash-server | 0.1.0 | Fetch-based backend SDK with token mutex, order resolution guard, and Web-standard HTTP handler. | Server Documentation |
bkash-client | 0.1.0 | Headless client SDK with bindings for React, React Native, Vue 3, Svelte, and Angular. | Client Documentation |
Headless-First (AUD-10):
In 0.1.x, bkash-client is strictly headless. We provide state machines, hooks, and lifecycle management without opinionated CSS stylesheets, pre-packaged themes, or modal dialogs. Developers retain 100% control over their checkout UI and brand styling. Styled components and theme presets are planned for future releases.
Server-Enforced Order Security:
Payment amount, currency, and invoice numbers must NEVER originate from untrusted client-side payloads. bkash-server mandates a server-side resolveOrder(req, body) callback that inspects session data or databases before initiating any transaction.
Lockout Prevention: bKash rate-limits token requests (reported as low as 2 grant-token calls per hour; confirm for your account). The server core implements proactive 50-minute rotation, single-flight in-memory deduplication, and atomic Redis locks to guarantee that multiple servers or worker processes never exhaust token quotas.
Multi-Runtime Compatibility:
The core server entry (bkash-server) has zero Node.js built-in dependencies (fs, crypto, http). It is intended to run on Node.js >=18 and other fetch-based runtimes; only Node.js is exercised in CI today (Workers, Edge, Deno and Bun are NOT TESTED). Specialized Node features (such as AWS SNS X.509 RSA signature verification) reside in subpath imports (bkash-server/webhook).
import express from "express";
import { BkashServer } from "bkash-server";
import { createExpressHandler } from "bkash-server/frameworks";
const app = express();
const bkash = new BkashServer({
apiVersion: "v1.2.0-beta", // Required: 'v1.2.0-beta' (stable) or 'v2' (experimental)
appKey: process.env.BKASH_APP_KEY!,
appSecret: process.env.BKASH_APP_SECRET!,
username: process.env.BKASH_USERNAME!,
password: process.env.BKASH_PASSWORD!,
baseUrl: process.env.BKASH_BASE_URL!, // e.g. https://tokenized.sandbox.bka.sh
});
// Mount /create, /callback, and /status endpoints
app.use(
"/api/bkash",
createExpressHandler(bkash, {
resolveOrder: async (req, body) => ({
amount: 1550,
currency: "BDT",
invoiceNumber: "INV_1001",
}),
}),
);
app.listen(3000, () => console.log("Listening on port 3000"));
| Feature | Status | Evidence |
|---|---|---|
| Tokenized Checkout v1.2.0-beta | Beta | automated tests against a local mock; live sandbox create+query run on 2026-10-27 (execute needs a customer PIN and is NOT TESTED live) |
| Tokenized Checkout v2 | Experimental | automated tests against a strict mock of the documented paths and fields; NOT TESTED against the live v2 sandbox |
| Token cache, refresh and lock | Beta | automated tests (concurrency, lease expiry); real Redis tests run in CI |
| Amount and invoice verification | Beta | automated tests |
| Timeout and 2062 reconciliation | Beta | automated tests against a mock |
| Web-standard HTTP handler | Beta | automated tests: tampering, allowlist, error mapping |
| Documented error-code table | Stable | automated tests compare the table with the published codes |
| Agreements (tokenized, v2) | Experimental | automated tests against a strict mock; NOT TESTED live. Not available with apiVersion v1.2.0-beta. |
| Refund and refund status | Experimental | automated tests; NOT TESTED live |
| Search transaction | Beta | automated tests |
| IPN / webhook (AWS SNS) verification | Experimental | automated tests with generated keys; NOT TESTED with a real bKash notification |
| Auth & Capture | Planned | Specification not public |
| Direct Charge / Linked Apps | Planned | Specification not public |
| Dynamic Charging | Planned | Specification not public |
| Disbursement, B2B and M2M payouts | Planned | Specification not public |
| React hook and button | Beta | automated tests (React Testing Library) |
| Vue 3 composable | Beta | automated tests (Vue Test Utils) |
| Svelte store | Beta | automated tests |
| Angular service | Beta | automated tests |
| React Native WebView checkout | Experimental | automated tests (React Native Testing Library); NOT TESTED on a device |
0.1.x, <BkashCheckout /> for React Native does not automatically hook into Android's native hardware BackHandler. If the user presses the device back button during a payment, applications must intercept the back action via React Navigation or custom back listeners to prompt confirmation before dismissal. Built-in Android BackHandler integration is scheduled for the Beta release.bkash-server/webhook is marked EXPERIMENTAL pending live verification against production AWS SNS notification payloads delivered by bKash.BkashFeatureNotSupportedError if called in 0.1.x.# Install workspace dependencies
pnpm install
# Run entire test suite across monorepo
pnpm test
# Build all packages (ESM + CJS + DTS)
pnpm build
# Typecheck workspace
pnpm typecheck
MIT © Open Source & Contributors
| Express adapter | Beta | tests inside real Express (with and without a body parser): server price used, browser callbackUrl ignored, unknown routes 404 |
| Next.js route handler | Beta | tests: route handler answers /create with the web-standard Request and Response |
| Fastify, Hono and Koa adapters | Beta | tests inside real Fastify, Hono and Koa |
| Remix, SvelteKit and Astro adapters | Beta | tests with the web-standard Request and Response these frameworks pass |
| Local bKash simulator package | Planned | - |