Interactive testing environment for react-shared components
Current: Default
Stripe payment integration with support for cards, wallets, and alternative payment methods
Configure the payment element options
Amount in cents (e.g., 1099 = $10.99)
displayMode'live' | 'preview' - Display mode (default: 'live')
usernamestring (required) - Creator username
previewAmountnumber (optional) - Amount in cents for preview mode (default: 1099)
previewCurrencystring (optional) - Currency code for preview mode (default: 'usd')
showWalletboolean (optional) - Show Apple Pay / Google Pay options (default: true)
pageIdnumber (optional) - Product page ID
fanNamestring (optional) - Customer name for billing details
fanEmailstring (optional) - Customer email for billing details
onPaymentSuccess() => void (optional) - Callback when payment succeeds
onPaymentError(error: { message: string }) => void (optional) - Callback when payment fails
Environment Variables: Requires NEXT_PUBLIC_STRIPE_KEY to be set in your environment variables.
Preview Mode: Use displayMode="preview" for testing and demonstrations without creating real payment intents.
Live Mode: In live mode, the component automatically creates payment intents and handles the full payment flow.
Ref Methods: The component exposes processPayment() and updatePaymentData() methods via ref for programmatic control.