Checkout Flow
Orchestrate the checkout process: cart snapshot, customer details, payment creation, and completion with automatic order + stock + email. Works with Stripe and Mollie for payments.
Try it with your AI assistant
Once WebsitePublisher is connected to your AI assistant, paste one of these into the chat. Replace the parts in [brackets] with your own details.
@WebsitePublisher add a checkout to my shop with customer details and payment via [Mollie or Stripe]@WebsitePublisher after payment, create the order, update the stock and send the confirmation email automaticallyWith WebsitePublisher, add a checkout to my shop with customer details and payment via [Mollie or Stripe]With WebsitePublisher, after payment, create the order, update the stock and send the confirmation email automaticallyWith WebsitePublisher, add a checkout to my shop with customer details and payment via [Mollie or Stripe]With WebsitePublisher, after payment, create the order, update the stock and send the confirmation email automaticallyEndpoints (11)
Start a checkout from a cart. Snapshots cart items and totals. Returns checkout_token. Idempotent on the cart: re-calling returns the SAME checkout. If the cart changed since the checkout was created, the snapshot is refreshed to the current cart + totals and the response carries snapshot_refreshed=true. If a live mollie/stripe payment is already attached the checkout is NOT silently re-priced: it is returned with cart_changed=true + checkout_locked=true (plus divergence) so you can cancel-checkout and initiate again to re-price.
No input parameters required.
Set customer details and shipping/billing address. Recalculates total if shipping or tax costs are provided.
No input parameters required.
Create a payment for an active checkout. With provider "mollie"/"stripe" the provider is called server-side (vault keys never leave the server) and a redirect URL is returned. With provider "invoice" no online payment is created (deferred / "op factuur"): the checkout becomes completable and the resulting order gets status "pending" / payment_status "unpaid". Invoice mode requires the project setting allow_invoice_checkout. For mollie/stripe the checkout is re-priced to the current cart at charge time, so the amount sent to the provider always matches the live cart; a checkout that already has a confirmed payment is refused (complete it instead).
No input parameters required.
Link an external payment to the checkout. Use create-payment instead for automatic payment creation. This endpoint is for manual linking only.
No input parameters required.
Get the full checkout state including items, customer, payment, and totals.
No input parameters required.
Attach validated typed meta (e.g. a contact-lens prescription) to a checkout line, identified by product_sku and bound to the checkout token. Values are validated server-side against the meta definition + its config source, stored on the checkout, and promoted to the order line on completion. If product_sku matches no checkout line the call still succeeds and returns a LINE_NOT_MATCHED entry in warnings[] (the meta is stored but will not reach an order line). If it matches several lines (shared article code, or variants inheriting the product SKU) the call returns 409 and variant_id is required to pin the line.
No input parameters required.
Record that the customer explicitly accepted the shop terms (and optionally a licence) for this checkout (#228). The server stores the version, its own timestamp and the IP on the checkout and copies it onto the order (metadata.legal_acceptance). When the project setting require_terms_acceptance is on, create-payment refuses (412) until this was called with the current terms_version (and license_version, if configured); a version that does not match gives 409. Call it when the customer ticks the box, before create-payment.
No input parameters required.
Complete the checkout after payment. Marks as paid, creates order, decrements stock, sends confirmation email. Idempotent: safe to call multiple times. A checkout that already expired is still completed when the payment provider confirms a covering payment; that order gets an internal note to check stock.
No input parameters required.
Cancel a checkout. Cart remains active and can be used for a new checkout.
No input parameters required.
Owner only. Current checkout settings of this project, e.g. whether invoice checkout ("op factuur") is enabled.
No input parameters required.
Owner only. Checkout settings for this project; send any of them. allow_invoice_checkout: enable or disable invoice checkout ("op factuur"); required before create-payment with payment_provider "invoice" works (until then 403). Only enable it when the owner asked for it: invoice orders are created unpaid and payment is collected outside the platform. reserve_order_number: when true, create-payment already returns order_id and order_number (the order is held as status "reserved" until the payment completes; a payment that fails, is canceled or expires releases it). Use it when the shop must show the order number before payment, e.g. on a payment page, PDF or WhatsApp handoff. Default false.
No input parameters required.
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| initiate-checkout | checkout-flow_initiate_checkout |
| set-customer | checkout-flow_set_customer |
| create-payment | checkout-flow_create_payment |
| set-payment | checkout-flow_set_payment |
| get-checkout-status | checkout-flow_get_checkout_status |
| set-line-meta | checkout-flow_set_line_meta |
| set-legal-acceptance | checkout-flow_set_legal_acceptance |
| complete-checkout | checkout-flow_complete_checkout |
| cancel-checkout | checkout-flow_cancel_checkout |
| get-settings | checkout-flow_get_settings |
| configure | checkout-flow_configure |
Website