one_time or renewal) as well as many other configurable options. Plans can be created manually in the dashboard or via the API.
A checkout configuration allows you to attach custom metadata and redirect URLs to one or more checkouts created from it. These can only be created via the API.
Option 1: Create a checkout link
Checkout links are the simplest way to accept payments. Create a plan to get a shareable checkout URL.- Dashboard
- API
- Go to your Dashboard > Checkout links
- Click + Create checkout link
- Select a product and configure your pricing (free, one-time, or recurring)
- Click Create checkout link
Option 2: Embedded checkout
For a custom checkout experience, use the embedded checkout component with a checkout configuration.Step 1: Create a checkout configuration
Create a checkout configuration on your server with an inline plan:company_idis your company IDplan.initial_priceis the payment amountplan.plan_typeis eitherone_timeorrenewalfor subscriptionsmetadatastores custom data for your reference
Step 2: Render the checkout
Use the embedded checkout component to render the payment form on the client:checkoutConfig.id from step 1 as the sessionId prop.
The returnUrl is required to handle redirects from external payment providers. When redirected, check the status query parameter:
- success: The payment succeeded. Use the receipt information to render a success page.
- error: The payment failed or was canceled. Remount the checkout so your customer can try again.
Handle payment webhooks
Listen for thepayment.succeeded webhook to fulfill orders on your server:
API Reference
Create Checkout Configuration API
See the full API reference for creating checkout configurations

