payment-integration
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.
More from the1studio/theone-training-skills
theone-cocos-standards
Enforces TheOne Studio Cocos Creator development standards including TypeScript coding patterns, Cocos Creator 3.x architecture (Component system, EventDispatcher), and playable ads optimization guidelines. Triggers when writing, reviewing, or refactoring Cocos TypeScript code, implementing playable ads features, optimizing performance/bundle size, or reviewing code changes.
169theone-unity-standards
Enforces TheOne Studio Unity development standards including C# coding patterns, Unity architecture (VContainer/SignalBus and TheOne.DI/Publisher), and code review guidelines. Triggers when writing, reviewing, or refactoring Unity C# code, implementing features, setting up dependency injection, working with events, or reviewing code changes.
38debugging
Systematic debugging framework ensuring root cause investigation before fixes. Includes four-phase debugging process, backward call stack tracing, multi-layer validation, and verification protocols. Use when encountering bugs, test failures, unexpected behavior, performance issues, or before claiming work complete. Prevents random fixes, masks over symptoms, and false completion claims.
24ui-ux-pro-max
Frontend UI/UX design intelligence - activate FIRST when user requests beautiful, stunning, gorgeous, or aesthetic interfaces. The primary skill for design decisions before implementation. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check frontend UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
23theone-react-native-standards
Enforces TheOne Studio React Native development standards including TypeScript patterns, React/Hooks best practices, React Native architecture (Zustand/Jotai, Expo Router), and mobile performance optimization. Triggers when writing, reviewing, or refactoring React Native code, implementing mobile features, working with state management/navigation, or reviewing pull requests.
20frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications, OR when they provide screenshots/images/designs to replicate or draw inspiration from. For screenshot inputs, extracts design guidelines first using ai-multimodal analysis, then implements code following those guidelines. Generates creative, polished code that avoids generic AI aesthetics.
17