OpenCashier is an open-source hosted checkout and payment orchestration platform for teams that want one backend to manage merchant APIs, cashier pages, order/refund flows, and provider-specific integrations.
Chinese documentation: README.zh-CN.md
Status: pre-1.0. Current channel status:
- Alipay: available
- Stripe: available
- WeChat Pay: in testing
- PayPal: not available yet
- Hosted cashier entry with signed token URLs instead of exposing platform order numbers directly
- Unified merchant-facing APIs for orders, order queries, cancellations, refunds, and webhook callbacks
- Platform-managed provider webhooks with downstream merchant notification forwarding and retry backoff
- Multi-provider abstraction layer that prefers official Node SDKs and falls back to direct API calls when needed
pnpm workspacemonorepo built with NestJS, Prisma, PostgreSQL, React, and Ant Design
| Area | Status | Notes |
|---|---|---|
| Merchant API | Available | Supports create order, query order, close order, refund, and notification retry flows |
| Hosted cashier | Available | Signed-token hosted cashier entry with persisted channel session data |
| Alipay | Available | Covers real payment creation, query, close, refund, and webhook signature verification |
| WeChat Pay | In testing | Mostly reserved scaffolding and direct API integration placeholders |
| Stripe | Available | Supports Stripe Hosted Checkout, order query, session expiration or close, refund, and webhook signature verification. Card-only for now |
| PayPal | Not available yet | Official Node SDK slot is reserved, but the real transaction flow is not finished |
- Install dependencies
pnpm install- Start infrastructure
docker compose -f docker-compose.infrastructure.yml up -d- Copy environment variables
cp .env.example .env- Generate Prisma Client and sync the schema
pnpm prisma:generate
pnpm prisma:db:push- Start the development workspace
pnpm dev- Run the merchant-side smoke test
pnpm smoke:merchantFor environment setup, local tunnel usage, default endpoints, seeded demo data, and provider-specific keys, use the docs below instead of the README.
If you want a runnable merchant-side reference instead of the full workspace, try examples/merchant-quickstart/README.md. It shows the Node SDK path for create-order requests, cashierUrl redirect, notification verification, and result-page query fallback in one small app.
If you only need the merchant SDK in your own service, use the npm package path for @opencashier/sdk once the target version is published, and start with the Node SDK guide instead of cloning this monorepo.
It can now provision provider config into the merchant app scope through the admin API, so the default alipay_page path no longer requires apps/web up front. Start pnpm dev:web only if you switch to QR-based channels or prefer managing providers in the UI.
pnpm dev:api
pnpm dev:merchant-quickstartThen open http://127.0.0.1:4100.
apps/
api/ # API
web/ # Cashier admin management
examples/
merchant-quickstart/ # Runnable merchant-side integration reference
packages/
sdk/ # Merchant Node/TypeScript SDK
shared/ # Shared types and constants
wechatpay-sdk # WeChat Pay SDK wrapper
docs/ # Internal plans and notes
skills/
- Changelog: CHANGELOG.md
- Changelog (Simplified Chinese): CHANGELOG.zh-CN.md
- Deployment guide: opencashier-docs.vercel.app/en/deployment
- Node SDK guide: opencashier-docs.vercel.app/en/node-sdk
- Merchant integration guide: opencashier-docs.vercel.app/en/merchant-api-integration
- Merchant quickstart example: examples/merchant-quickstart/README.md
Most deep-dive docs are currently Chinese-first. English and bilingual documentation contributions are welcome.
- Contributing guide: opencashier-docs.vercel.app/en/contributing
- Support and usage help: SUPPORT.md
- Security policy: SECURITY.md
- Code of conduct: CODE_OF_CONDUCT.md