PaymentForm
Need an API key?
Get one from Crave Dashboard > Developers > API Development > Step 1 - API Keys. Copy the matching
locationId from Step 2 - Location IDs on the same page.Preview
Import
Usage
Props
'square' | 'stripe'
required
The payment provider configured for this merchant.
number
required
The total amount to charge in cents.
(token: string) => void
required
Callback fired with the payment token after successful tokenization.
(error: PaymentError) => void
required
Callback fired when payment processing fails.
Behavior
- Loads the appropriate payment provider SDK (Square Web Payments or Stripe Elements)
- Secure iframe-based card input fields
- Supports Apple Pay and Google Pay when available
- Displays inline validation errors
- Shows loading state during payment processing