PaymentForm
Need storefront configuration?
Use the public API origin, merchant slug, and location ID. Storefront components
never receive a Crave API key; register each exact browser origin before making
requests.
ONLINE order submission. Crave persists the
canonical order before it creates or recovers the connected-account PaymentIntent.
Preview
Behavior
- Read
checkout.getCollectionOptionsfor the current cart before rendering. Mount this component only when the server-returnedONLINEoption is available. - Submit the order with
collectionMode: "ONLINE"; online responses never select Square, Clover, or Toast. - Mount Stripe Elements with the returned
clientSecretand immutableconnectedAccountId. - Poll
getOrderSubmissionOutcomewith the returnedattemptIdafter confirmation, redirects, ambiguous responses, or browser restarts. - Reuse the original submission idempotency key. Never create a second order to recover a response.
- Handle every online outcome status:
PAIDis settled,PROCESSINGis still resolving,CUSTOMER_ACTION_REQUIREDneeds the customer back in Stripe with the returnedclientSecret, andACTION_REQUIREDcarries asafeErrorCodeand needs a decision.ACCEPTEDwith averificationobject belongs to pay-at-store collection and is never returned forONLINE. - Raw card data stays in Stripe-hosted fields and is never accepted or logged by Crave application code.
