個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Open-source billing for SaaS. Subscriptions, metering, invoices, and wallets — without the enterprise price tag.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Most billing platforms assume Stripe-only, USD-only, and card-only. PimaBill is built for businesses that operate across multiple currencies, countries, and payment providers — especially in Africa where mobile money, bank transfers, and regional gateways are the norm.
| Category | What you get |
|---|---|
| Subscriptions | Create plans with recurring billing (monthly, yearly, weekly), upgrade/downgrade with proration |
| Usage Metering | Ingest events via API, aggregate with billable metrics, charge based on consumption |
| Invoicing | Auto-generated invoices with PDF export, email delivery, hosted checkout pages |
| Prepaid Wallets | Customer credit wallets with purchased/granted credits, auto-deduction on invoices |
| Coupons & Add-ons | Percentage or fixed-amount discounts, one-time add-on charges |
| Credit Notes | Issue refunds, void invoices, pro-rated credits on cancellation |
| Analytics | Revenue, subscriptions, customers, and payment analytics dashboards |
| Customer Portal | Self-service portal for customers to view invoices and manage subscriptions |
| Webhooks | Real-time event notifications for invoice, payment, and subscription lifecycle |
| SDKs | Auto-generated TypeScript and Python SDKs via Fern |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Landing │ │ Dashboard │ │ Docs │ │ Portal │
│ Next.js │ │ Next.js │ │ Nuxt/Docus │ │ Next.js │
│ :4001 │ │ :4002 │ │ :4003 │ │ :4002/… │
└──────┬──────┘ └──────┬──────┘ └─────────────┘ └──────┬──────┘
│ │ │
└────────────────┼──────────────────────────────────┘
│
┌──────▼──────┐
│ NestJS │
│ API │
│ :4000 │
└──┬───┬───┬──┘
│ │ │
┌─────┘ │ └─────┐
▼ ▼ ▼
PostgreSQL Redis BullMQ
(Central + (Cache) (Workers)
Tenant DBs)
git clone https://github.com/pimabill/billing.git
cd billing
cp .env.example .env
# Edit .env — set JWT_SECRET, JWT_REFRESH_SECRET, ENCRYPTION_KEY
docker compose up -d --build
| Service | URL |
|---|---|
| API | http://localhost:4000 |
| Landing | http://localhost:4001 |
| Dashboard | http://localhost:4002 |
| Docs | http://localhost:4003 |
# On your server:
curl -O https://raw.githubusercontent.com/pimabill/billing/main/docker-compose.prod.yml
curl -O https://raw.githubusercontent.com/pimabill/billing/main/.env.example
cp .env.example .env
# Edit .env with real secrets and domain URLs
docker compose -f docker-compose.prod.yml up -d
See nginx.conf.example for a reverse proxy setup with custom domains.
# Start infrastructure
docker compose up -d central-db internal-tenant-db redis --wait
# Backend
cd backend
npm ci
npx prisma generate --schema=./prisma/schema-central.prisma
npx prisma generate --schema=./prisma/schema-tenant.prisma
npm run migrate:central # tenant databases are migrated when created
npm run start:dev
# Dashboard (separate terminal)
cd dashboard
npm ci
npm run dev
backend/ NestJS API — TypeScript, Prisma, BullMQ, PostgreSQL
dashboard/ Next.js 16 dashboard — shadcn/ui, Tailwind v4, Zustand
landing/ Next.js 15 marketing site
docs/ Nuxt/Docus documentation site
fern/ Fern SDK generation config
sdks/ Generated TypeScript and Python SDKs
PimaBill exposes a REST API with 107 endpoints across 18 controllers. Interactive API docs are available at /api/reference (powered by Scalar).
Authentication: Register a tenant, get a JWT, and pass it as Authorization: Bearer <token>. Alternatively, use the API key from your tenant settings as X-API-Key: <key>.
# Register
curl -X POST http://localhost:4000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"name": "John", "email": "[email protected]", "password": "secret", "companyName": "Acme Corp"}'
# Create a customer
curl -X POST http://localhost:4000/api/customers \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "email": "[email protected]", "currency": "USD"}'
Official SDKs for TypeScript, Python and PHP are generated from the OpenAPI spec and published with every release (MIT licensed):
npm install pimabill
pip install pimabill
composer require pimabill/pimabill-php
import { PimaBillClient, PimaBillEnvironment } from "pimabill";
const client = new PimaBillClient({ token: process.env.PIMABILL_API_KEY! });
// Sandbox: new PimaBillClient({ token: "sk_test_...", environment: PimaBillEnvironment.Sandbox })
// Self-hosted: new PimaBillClient({ token, baseUrl: "https://billing.example.com" })
const customer = await client.customers.create({
externalId: "usr_98765",
name: "Jane Doe",
email: "[email protected]",
currency: "USD",
});
import os
from pimabill import PimaBillClient
client = PimaBillClient(token=os.environ["PIMABILL_API_KEY"])
customer = client.customers.create(
external_id="usr_98765",
name="Jane Doe",
email="[email protected]",
currency="USD",
)
See the SDK guides and RELEASING.md for how the packages are built and published.
A sandbox deployment (SANDBOX_MODE=true) runs the same code against payment providers' test accounts, with sk_test_ keys. The live dashboard can switch between live and sandbox; see the Sandbox guide.
| Provider | Regions | Methods |
|---|---|---|
| Stripe | Global | Cards, bank transfers, wallets |
| Paystack | Nigeria, Ghana, South Africa, Kenya | Cards, bank transfers, mobile money |
| Flutterwave | 30+ African countries | Cards, mobile money, bank transfers |
| DPO | 20+ African countries | Cards, mobile money |
| PayU | South Africa, Nigeria, Kenya | Cards, EFT, mobile money |
| PesaPal | Kenya, Uganda, Tanzania | M-Pesa, Airtel Money, cards |
Configure providers per-tenant in the dashboard under Settings > Payment Providers. Credentials are encrypted at rest.
We're actively looking for contributors and testers. See CONTRIBUTING.md for setup instructions and the roadmap.
Areas where help is needed:
See SECURITY.md for vulnerability reporting.
PimaBill is licensed under AGPL-3.0. The generated SDKs are MIT-licensed, so they can be used in any project.