Checkout
Migrate Dynamic Payments
Replace temporary Paylinks with independent API Checkout Sessions.
Migrate Dynamic Payments
No migration is needed for fixed-price Paylinks. Continue using them as reusable product pages.
For dynamic carts, replace the temporary-Paylink pattern with this server flow:
- Recalculate and lock the final order total on your backend.
- Create one Checkout Session with
amount,currency, and an order-scopedIdempotency-Key. - Save the returned
checkoutSessionIdagainst your order. - Redirect the buyer to the returned hosted
url. - Fulfill only when a verified
payment.confirmedwebhook matches the order.
Before and after
| Temporary Paylink pattern | API Checkout |
|---|---|
| Create a reusable product object per cart total | Create a short-lived payment attempt |
| Clean up unused links | Session expires automatically |
| Price modeled as catalog configuration | Price stored as an immutable order snapshot |
Webhook always has paylinkId | Standalone webhook uses checkoutSessionId and merchantOrderId |
If existing code expects paylinkId on every invoice event, make that field optional for invoice
and payment events. It remains present for Paylink and subscription flows.