Payment Integration
Production-proven payment processing with SePay (Vietnamese banks), Polar (global SaaS), and Stripe (global infrastructure).
When to Use
- Payment gateway integration (checkout, processing)
- Subscription management (trials, upgrades, billing)
- Webhook handling (notifications, idempotency)
- QR code payments (VietQR, NAPAS)
- Multi-provider order management
Platform Selection
| Platform | Best For |
|---|---|
| SePay | Vietnamese market, VND, bank transfers, VietQR |
| Polar | Global SaaS, subscriptions, automated benefits (GitHub/Discord) |
| Stripe | Enterprise payments, Connect platforms, custom checkout |
Quick Reference
SePay
references/sepay/overview.md- Auth, supported banksreferences/sepay/api.md- Endpoints, transactionsreferences/sepay/webhooks.md- Setup, verificationreferences/sepay/sdk.md- Node.js, PHP, Laravelreferences/sepay/qr-codes.md- VietQR generationreferences/sepay/best-practices.md- Production patterns
Polar
references/polar/overview.md- Auth, MoR conceptreferences/polar/products.md- Pricing modelsreferences/polar/checkouts.md- Checkout flowsreferences/polar/subscriptions.md- Lifecycle managementreferences/polar/webhooks.md- Event handlingreferences/polar/benefits.md- Automated deliveryreferences/polar/sdk.md- Multi-language SDKsreferences/polar/best-practices.md- Production patterns
Stripe
references/stripe/stripe-best-practices.md- Integration designreferences/stripe/stripe-sdks.md- Server SDKsreferences/stripe/stripe-js.md- Payment Elementreferences/stripe/stripe-cli.md- Local testingreferences/stripe/stripe-upgrade.md- Version upgrades- External: https://docs.stripe.com/llms.txt
Multi-Provider
references/multi-provider-order-management-patterns.md- Unified orders, currency conversion
Scripts
scripts/sepay-webhook-verify.js- SePay webhook verificationscripts/polar-webhook-verify.js- Polar webhook verificationscripts/checkout-helper.js- Checkout session generator
Key Capabilities
| Platform | Highlights |
|---|---|
| SePay | QR/bank/cards, 44+ VN banks, webhooks, 2 req/s |
| Polar | MoR, subscriptions, usage billing, benefits, 300 req/min |
| Stripe | CheckoutSessions, Billing, Connect, Payment Element |
Implementation
General flow: auth → products → checkout → webhooks → events