payment-integration
Integrate payments with SePay (VietQR, Vietnamese bank transfers) and Polar (global SaaS subscriptions, billing). Use for checkout flows, webhooks, QR codes, subscription management.
- License 许可
- MIT
- 最近更新
- 2026-08-25
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- payment-integration
- license
- MIT
- version
- 1.0.0
- description
- Integrate payments with SePay (VietQR, Vietnamese bank transfers) and Polar (global SaaS subscriptions, billing). Use for checkout flows, webhooks, QR codes, subscription management.
02 资源文件 21
- 参考文档README.md5.9 KB
- 参考文档references/polar/benefits.md8.2 KB
- 参考文档references/polar/best-practices.md10.9 KB
- 参考文档references/polar/checkouts.md6.2 KB
- 参考文档references/polar/overview.md4.6 KB
- 参考文档references/polar/products.md5.2 KB
- 参考文档references/polar/sdk.md9.3 KB
- 参考文档references/polar/subscriptions.md7.4 KB
- 参考文档references/polar/webhooks.md8.9 KB
- 参考文档references/sepay/api.md3.2 KB
- 参考文档references/sepay/best-practices.md8.2 KB
- 参考文档references/sepay/overview.md3.5 KB
- 参考文档references/sepay/qr-codes.md5.0 KB
- 参考文档references/sepay/sdk.md4.7 KB
- 参考文档references/sepay/webhooks.md4.6 KB
- 脚本scripts/.env.example619 B
- 脚本scripts/checkout-helper.js7.2 KB
- 脚本scripts/package.json324 B
- 脚本scripts/polar-webhook-verify.js5.5 KB
- 脚本scripts/sepay-webhook-verify.js5.4 KB
- 脚本scripts/test-scripts.js7.5 KB
03 SKILL.md 正文
Payment Integration
Implement payment processing with SePay (Vietnamese payments) and Polar (global SaaS monetization).
When to Use
Use when implementing:
- Payment gateway integration (checkout, processing)
- Subscription management (trials, upgrades, billing)
- Webhook handling (payment notifications)
- QR code payments (VietQR, NAPAS)
- Usage-based billing (metering, credits)
- Automated benefit delivery (licenses, GitHub access, Discord roles)
- Customer portals (self-service management)
- Bank transfer automation (Vietnamese banks)
- Product catalogs with pricing
Platform Selection
Choose SePay for:
- Vietnamese market (VND currency)
- Bank transfer automation
- VietQR/NAPAS payments
- Local payment methods
- Direct bank account monitoring
Choose Polar for:
- Global SaaS products
- Subscription management
- Usage-based billing
- Automated benefits (GitHub, Discord, licenses)
- Merchant of Record (tax compliance)
- Digital product sales
Quick Reference
SePay Integration
- Overview & Auth:
references/sepay/overview.md- Platform capabilities, API/OAuth2 auth, supported banks - API Reference:
references/sepay/api.md- Endpoints, transactions, bank accounts, virtual accounts - Webhooks:
references/sepay/webhooks.md- Setup, payload structure, verification, retry logic - SDK Usage:
references/sepay/sdk.md- Node.js, PHP, Laravel implementations - QR Codes:
references/sepay/qr-codes.md- VietQR generation, templates, integration - Best Practices:
references/sepay/best-practices.md- Security, patterns, monitoring
Polar Integration
- Overview & Auth:
references/polar/overview.md- Platform capabilities, authentication methods, MoR concept - Products & Pricing:
references/polar/products.md- Product types, pricing models, usage-based billing - Checkouts:
references/polar/checkouts.md- Checkout flows, embedded checkout, links - Subscriptions:
references/polar/subscriptions.md- Lifecycle, upgrades, downgrades, trials - Webhooks:
references/polar/webhooks.md- Event types, signature verification, monitoring - Benefits:
references/polar/benefits.md- Automated delivery (GitHub, Discord, licenses, files) - SDK Usage:
references/polar/sdk.md- TypeScript, Python, PHP, Go, framework adapters - Best Practices:
references/polar/best-practices.md- Security, patterns, monitoring
Integration Scripts
- SePay Webhook Verification:
scripts/sepay-webhook-verify.js- Verify SePay webhook authenticity - Polar Webhook Verification:
scripts/polar-webhook-verify.js- Verify Polar webhook signatures - Checkout Helper:
scripts/checkout-helper.js- Generate checkout sessions for both platforms
Implementation Workflow
SePay Implementation
- Load
references/sepay/overview.mdfor auth setup - Load
references/sepay/api.mdorreferences/sepay/sdk.mdfor integration - Load
references/sepay/webhooks.mdfor payment notifications - Use
scripts/sepay-webhook-verify.jsfor webhook verification - Load
references/sepay/best-practices.mdfor production readiness
Polar Implementation
- Load
references/polar/overview.mdfor auth and concepts - Load
references/polar/products.mdfor product setup - Load
references/polar/checkouts.mdfor payment flows - Load
references/polar/webhooks.mdfor event handling - Use
scripts/polar-webhook-verify.jsfor webhook verification - Load
references/polar/benefits.mdif automating delivery - Load
references/polar/best-practices.mdfor production readiness
Key Capabilities
SePay:
- Payment gateway (QR, bank transfer, cards)
- Bank account monitoring with webhooks
- Order-based virtual accounts
- VietQR generation API
- 44+ Vietnamese banks supported
- Rate limit: 2 calls/second
Polar:
- Merchant of Record (global tax compliance)
- Subscription lifecycle management
- Usage-based billing (events, meters)
- Automated benefits (GitHub, Discord, licenses)
- Customer portal (self-service)
- Multi-language SDKs
- Rate limit: 300 req/min
Instructions
When implementing payment integration:
- Identify platform based on requirements (Vietnamese vs global, payment types)
- Load relevant references progressively as needed
- Implement authentication using platform-specific methods
- Set up products/pricing according to business model
- Implement checkout flow (hosted, embedded, or API-driven)
- Configure webhooks with proper verification
- Handle payment events (success, failure, refund)
- Test thoroughly in sandbox before production
- Monitor and optimize using platform analytics
Load only the references needed for current implementation step to maintain context efficiency.
04 同仓库更多 Skills
web-testing
Web testing with Playwright, Vitest, k6. E2E/unit/integration/load/security/visual/a11y testing. Use for test automation, flakiness, Core Web Vitals, mobile gestures, cross-browser.
web-frameworks
Build with Next.js (App Router, RSC, SSR, ISR), Turborepo monorepos. Use for React apps, server rendering, build optimization, caching strategies, shared dependencies.
ui-styling
Style UIs with shadcn/ui components (Radix UI + Tailwind CSS). Use for accessible components, themes, dark mode, responsive layouts, design systems, color customization.
threejs
Build 3D web apps with Three.js (WebGL/WebGPU). 556 searchable examples, 60 API classes, 20 use cases. Actions: create 3D scene, load model, add animation, implement physics, build VR/XR. Topics: GLTF loader, PBR materials, particle effects, shadows, post-processing, compute shaders, TSL. Integrations: WebGPU, physics engines, spatial audio.
sequential-thinking
Apply step-by-step analysis for complex problems with revision capability. Use for multi-step reasoning, hypothesis verification, adaptive planning, problem decomposition, course correction.
research
Research technical solutions, analyze architectures, gather requirements thoroughly. Use for technology evaluation, best practices research, solution design, scalability/security/maintainability analysis.