{"object":"doc","slug":"migrate-from-stripe-checkout","title":"Migrate from Stripe Checkout","summary":"How Stripe Checkout Session names map to ZeroPoint checkout sessions, what is the same, what differs, and what is not supported.","tags":["guide","checkout","migration"],"body":"# Migrate from Stripe Checkout\n\nZeroPoint checkout sessions follow Stripe's shape for payment mode, so most of your code keeps its field names. This table lists every difference that changes code. See [Accept payments with hosted checkout](accept-payments-with-checkout.md) for the full flow.\n\n| Stripe | ZeroPoint |\n|---|---|\n| `checkout.sessions.create` | `POST /v1/checkout/sessions`. The merchant taking the payment is `merchant_id` in the body, or the `ZeroPoint-Account` header (`Stripe-Account` is accepted too), or the platform's only merchant in that mode |\n| Form-encoded body | Same: form-encoded or JSON |\n| `Idempotency-Key` optional | Same on create and expire: with a key, a retry replays the first answer |\n| `cs_test_` and `cs_live_` ids | One `cs_` prefix; `livemode` on the object says which |\n| `payment_intent` | `payment` (`pay_...`), also echoed as `payment_intent` |\n| `expand[]=line_items` | Accepted; `line_items` are always inline anyway (at most 100) |\n| `expand[]=customer`, `subscription`, `invoice`, `payment_intent` | Same: the object in place of its id (on retrieve, on create in the body, and as `data.` paths on the list) |\n| Any other `expand[]` | Refused: `parameter_unavailable`, naming it, never ignored |\n| List filters `customer`, `payment_intent`, `subscription`, `status`, `starting_after` | Same; the list carries `url` |\n| `payment_intent_data.metadata` | Same: copied onto the payment, over the session's `metadata` |\n| `subscription_data.metadata` | Same: subscription mode only, copied onto the subscription the session creates; other `subscription_data` keys (trials) are `parameter_unavailable` |\n| `currency`, `ui_mode` | `usd` only; `ui_mode` `hosted_page` or `hosted` only. Anything else is `parameter_invalid` |\n| `automatic_tax` | Not supported: no tax line; `enabled: true` answers `parameter_unavailable` |\n| `payment_status: processing` | ZeroPoint addition: an attempt is in flight or the session is held while an outcome is confirmed. Through the Stripe SDK (and on a `stripe_compatible_payload` endpoint) the same session reads `payment_status: unpaid` with `zeropoint_payment_status: processing` |\n| `payment_status: no_payment_required` | Same meaning: a promotion code brought the total to $0 and the buyer completed the order with no card (payment mode; in subscription mode a code that would make the first invoice $0 is refused) |\n| `mode: subscription` | Available: one recurring catalog `price`, quantity 1; no trials yet (see [Hosted checkout](checkout.md)). Different from Stripe: unless the merchant's `subscription_guard` is `off` (it is `product` by default), the session must name the buyer with `customer`, `client_reference_id` or `customer_email`, else `400 customer_identity_required` and nothing is created; and a buyer who already holds a live subscription the guard matches is refused with `subscription_exists` (400 through a Stripe SDK, 409 to plain HTTP), naming it |\n| `mode: setup` | Not supported: save a card with the card on file API |\n| `price`, `allow_promotion_codes`, `discounts` | Same names: a catalog price (quantity 1; one-time in payment mode, recurring in subscription mode); promotion codes (the page's code field, or one code applied at create) on a session with exactly one catalog price line |\n| `shipping_address_collection`, `shipping_options`, `custom_fields`, `consent_collection` and other fields | Not supported: `parameter_unknown`, naming the field in `param` |\n| `phone_number_collection`, `tax_id_collection`, `invoice_creation`, `adaptive_pricing` | `enabled: false` is accepted; `enabled: true` is `parameter_unknown` |\n| `billing_address_collection` | `auto` (Stripe's default) is accepted and changes nothing: the card form asks for the ZIP code either way. `required` is `parameter_unknown`: the page does not collect a billing address |\n| `locale` | `auto` (Stripe's default) is accepted and changes nothing: the page shows its own language. Any other locale is `parameter_unknown` |\n| `submit_type` | `auto` (Stripe's default) is accepted: the page sets its own button wording. `pay`, `book`, `donate` and `subscribe` are `parameter_unknown` |\n| `payment_method_collection` | `always` (Stripe's default) is accepted: the page asks for a card whenever there is an amount to pay. In payment mode it cannot be sent with `allow_promotion_codes: true` (`parameter_invalid`), because a 100 percent off code there completes the order with no card. `if_required` is `parameter_unknown` |\n| `line_items[n].adjustable_quantity` | `{enabled: false}` (Stripe's default) is accepted: the buyer cannot change the quantity. `enabled: true` is `parameter_unknown` |\n| `payment_intent_data.capture_method` | `automatic` (Stripe's default) is accepted: the payment is captured when the buyer pays. `manual` and `automatic_async` are `parameter_unknown`; `setup_future_usage` is refused too |\n| `customer_update`, `custom_text`, `payment_method_options`, `saved_payment_method_options`, `wallet_options`, `return_url`, `redirect_on_completion` | Not supported: `parameter_unknown`, whatever the value |\n| `payment_method_types` | `[\"card\"]` only; anything else is `parameter_invalid` |\n| `checkout.session.completed`, `checkout.session.expired` | Same names; `data.object` is the session with `url` null |\n| `checkout.session.async_payment_*` | Not sent: there are no delayed payment methods |\n| `client_reference_id`, `customer_email`, `metadata`, `success_url`, `cancel_url`, `expires_at` | Same names and meaning; `expires_at` is 30 minutes to 24 hours ahead. In subscription mode `customer`, `client_reference_id` and `customer_email` are also the buyer's identity for the duplicate guard: send one stable value per buyer (your user id as `client_reference_id`), never one per order |\n| `{CHECKOUT_SESSION_ID}` in `success_url` | Same |\n\n## What to change in your code\n\n1. Keep your create call; name the merchant with `merchant_id` or the `ZeroPoint-Account` header when your platform has more than one. Send an `Idempotency-Key` to make retries safe. In subscription mode name the buyer (`customer`, `client_reference_id` or `customer_email`), and on `subscription_exists` send the buyer to the portal instead of opening another session.\n2. Read `payment` (or `payment_intent`) for the payment id.\n3. Treat `payment_status: processing` (through the Stripe SDK: `zeropoint_payment_status: processing`) as \"not paid yet\": do not fulfil and do not create a second session for the same buyer. A create with the same `client_reference_id` answers `409 checkout_outcome_unknown` while one is held.\n4. Keep fulfilling on `checkout.session.completed`, once per session id, and check `status` and `payment_status` on the success page. Never trust the redirect alone.\n5. A refusal is cached under its `Idempotency-Key` for 24 hours: after fixing the cause, retry under a new key.\n\n## Not available yet\n\nGoogle Pay and Apple Pay on the page, and trials in subscription mode, are planned. Subscription mode is available. There is no tax line in this version.","updated":1795275945}