Token-based checkout with multiple payment providers & post-purchase upsells
Show targeted offers after payment but before the success page. Customers can accept with one click using their stored payment method.
// Include upsellConfig in your checkout token
{
"orderId": "order_123",
"customer": { ... },
"lineItems": [ ... ],
"upsellConfig": {
"enabled": true,
"offers": [
{
"id": "upsell-1",
"productId": "up_shipping",
"name": "Priority Shipping",
"description": "Get it in 2-3 days",
"price": 999, // Price in cents
"compareAtPrice": 1499, // Optional strikethrough price
"headline": "Want it faster?",
"ctaText": "Yes, Upgrade!",
"declineText": "No thanks",
"imageUrl": "https://...", // Optional product image
"timerSeconds": 300, // Optional 5-min countdown
"targeting": {
"minCartValue": 5000, // Cart must be $50+
"productIds": ["prod_1"], // Must have bought prod_1
"excludeProductIds": ["sub_1"] // Must NOT have subscription
}
}
]
}
}/api/token/generateGenerate a checkout token with optional upsell configuration
/api/upsell/create-sessionCreate an upsell session after successful payment
/api/upsell/session/[id]Get current upsell session state and offers
/api/upsell/acceptAccept an upsell offer (1-click charge)
/api/upsell/declineDecline current offer and proceed to next or success page
Stripe
Cards & Wallets
Sticky.io
Subscriptions
Shopify
E-commerce
Konnektive
CRM & Orders
UltraCart
E-commerce
Built with Next.js 16 • SQLite • JWT Authentication