Integrate payments with SePay (VietQR), Polar, Stripe, Paddle (MoR subscriptions), Creem.io (licensing). Checkout, webhooks, subscriptions, QR codes, multi-provider orders.
Production-proven payment processing with SePay (Vietnamese banks), Polar (global SaaS), Stripe (global infrastructure), Paddle (MoR subscriptions), and Creem.io (MoR + licensing).
| 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 |
| Paddle |
| MoR subscriptions, global tax compliance, churn prevention |
| Creem.io | MoR + licensing, revenue splits, no-code checkout |
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 patternsreferences/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 patternsreferences/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 upgradesreferences/paddle/overview.md - MoR, auth, entity IDsreferences/paddle/api.md - Products, prices, transactionsreferences/paddle/paddle-js.md - Checkout overlay/inlinereferences/paddle/subscriptions.md - Trials, upgrades, pausereferences/paddle/webhooks.md - SHA256 verificationreferences/paddle/sdk.md - Node, Python, PHP, Goreferences/paddle/best-practices.md - Production patternsreferences/creem/overview.md - MoR, auth, global supportreferences/creem/api.md - Products, checkout sessionsreferences/creem/checkouts.md - No-code links, storefrontsreferences/creem/subscriptions.md - Trials, seat-basedreferences/creem/licensing.md - Device activationreferences/creem/webhooks.md - Signature verificationreferences/creem/sdk.md - Next.js, Better Authreferences/multi-provider-schema-and-currency.md - Unified orders schema, currency conversion, commission system, referrer tiersreferences/multi-provider-webhooks-and-revenue.md - Revenue tracking, refunds, webhook idempotency, discount cross-provider syncscripts/sepay-webhook-verify.js - SePay HMAC webhook verificationscripts/polar-webhook-verify.js - Polar webhook verificationscripts/checkout-helper.js - Checkout session generator| 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 |
| Paddle | MoR, overlay/inline checkout, Retain (churn prevention), tax |
| Creem.io | MoR, licensing, revenue splits, no-code checkout |
Webhook signature verification (generic pattern)
import crypto from 'crypto';
function verifyWebhook(payload: Buffer, signature: string, secret: string): boolean {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
// Express handler — always use raw body for signature verification
app.post('/webhooks/payment', express.raw({ type: 'application/json' }), (req, res) => {
if (!verifyWebhook(req.body, req.headers['x-signature'] as string, process.env.WEBHOOK_SECRET!)) {
return res.status(401).send('Invalid signature');
}
res.status(200).send('ok'); // Respond fast, process async
processEventAsync(JSON.parse(req.body.toString()));
});
Idempotent payment creation
async function createCheckout(orderId: string, amount: number) {
return stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [{ price_data: { currency: 'usd', unit_amount: amount, product_data: { name: 'Order' } }, quantity: 1 }],
mode: 'payment',
success_url: `${BASE_URL}/success?order=${orderId}`,
cancel_url: `${BASE_URL}/cancel`,
metadata: { orderId }, // For webhook reconciliation
}, { idempotencyKey: `checkout-${orderId}` });
}
See references/implementation-workflows.md for step-by-step guides per platform.
General flow: auth → products → checkout → webhooks → events