Finalize a checkout via the PaymentMethodHandler registry.
Phase 8-B replaces Phase 4-A’s silent-overwrite path. The body is
a discriminated CheckoutComplete (Literal[‘stripe’,‘cod’,
‘bank_transfer’]); the handler decides payment_status, initial
order status, payment_due_at, and payment_method_metadata.
Stripe still arrives via the webhook receiver for buyer-Stripe- Element flows; this route is the synchronous path used by COD, (PR-C) bank-transfer, and back-compat Stripe callers that already have their PI id (e.g. legacy zunkiree-search).
Documentation Index
Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
Use this file to discover all available pages before exploring further.
Storefront checkout completion request — Phase 8-B.
Phase 4-A's freeform payment_method: str is replaced by a
Literal-restricted method discriminator. The PaymentMethodHandler
registry routes the body to the matching handler. Stripe still
arrives via the webhook for buyer-Stripe-Element flows; this route
is for COD + (future PR-C) bank transfer + back-compat callers
that explicitly know their PI.
Field rules per method:
stripe — payment_intent_id required.cod — cod block populated; phone required at
API time when CodConfig.require_phone=true.bank_transfer — bank_transfer_reference optional.
Wired in PR-C; this route 422s today via
the handler's NotImplementedError.stripe, cod, bank_transfer Buyer-supplied COD details. Phase 8-B accepts these but only
phone and accepted_terms are checked at the API edge today —
OTP wiring is Phase 8 Decision 3 (deferred).
Successful Response
Schema for checkout response.
Schema for address. Fields are optional to support simpler address formats from AI widget.
Schema for address. Fields are optional to support simpler address formats from AI widget.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$