Multi-provider payment integration — Stripe (checkout, billing, Connect), Paddle (MoR subscriptions), SePay (VietQR, Vietnamese banks), Polar (global SaaS), Creem.io (MoR + licensing). Checkout flows, webhooks, subscriptions, QR payments, multi-provider management.
Production-proven multi-provider payment processing with Stripe, Paddle, SePay, Polar, and Creem.io.
| Platform | Best For | Tax Handling | Pricing |
|---|---|---|---|
| Stripe | Enterprise, custom flows, Connect platforms | You handle tax | 2.9% + 30¢ |
| Paddle | SaaS subscriptions, global sales | MoR (they handle tax) | 5% + 50¢ |
| SePay | Vietnam market, VND, bank transfers | You handle | Low fees |
| Polar | Open-source SaaS, subscriptions | MoR | 5% |
| Creem.io | MoR + software licensing | MoR | Varies |
1. Auth (API keys, secrets)
2. Create Products/Prices
3. Implement Checkout
4. Handle Webhooks
5. Manage Subscriptions
6. Monitor & Reconcile
// Server: Create checkout session
import Stripe from 'stripe'
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)
const session = await stripe.checkout.sessions.create({
line_items: [{
price: 'price_xxx',
quantity: 1
}],
mode: 'subscription',
success_url: 'https://myapp.com/success?session_id={CHECKOUT_SESSION_ID}',
cancel_url: 'https://myapp.com/cancel'
})
// Redirect to session.url
// Webhook handler
import { buffer } from 'micro'
export async function POST(req: Request) {
const body = await req.text()
const sig = req.headers.get('stripe-signature')!
const event = stripe.webhooks.constructEvent(body, sig, process.env.STRIPE_WEBHOOK_SECRET!)
switch (event.type) {
case 'checkout.session.completed':
await handleCheckoutComplete(event.data.object)
break
case 'invoice.payment_succeeded':
await handlePaymentSuccess(event.data.object)
break
case 'customer.subscription.deleted':
await handleSubscriptionCancelled(event.data.object)
break
}
return new Response('ok')
}
stripe listen --forward-to localhost:3000/webhook| Skill | When to Use |
|---|---|
| rust-backend-advance | Webhook handling, payment APIs |
| databases | Order/payment data storage |
| nextjs-turborepo | Checkout UI, payment forms |
| testing | Payment flow E2E testing |
| devops | Webhook security, secrets management |