Skip to main content

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.
Renders the server-selected payment experience. An active Square connection uses Square Web Payments; a location without Square uses Stripe Elements.

Preview

Behavior

  • Branches only on paymentSession.provider; browser state cannot choose or switch the processor.
  • Square supports card, Square gift-card partial authorization, authenticated stored cards, optional card saving, and wallet tokens when an eligible Square wallet method supplies the source token.
  • Stripe Elements remains available only for non-Square locations.
  • The parent checkout flow owns customer validation, confirmation, errors, idempotent retries, and final redirect.
  • Raw card and gift-card data stays in provider-hosted fields and is never accepted or logged by Crave application code.
Do not render Stripe after a Square session has been created. A missing or unhealthy Square dependency fails the cart closed so the customer cannot be charged by the wrong processor.