Skip to main content
Below is a complete example of a basic checkout integration using the Billing Web SDK in a simple web page. The example allows users to select between two prices (e.g., monthly vs yearly) and initiates the checkout. The implementation includes:
  • Configuring SDK: Set up the SDK once with your orgId using Billing.configure.
  • Creating checkout: Initialize a new checkout with Billing.createCheckout using a priceId and customer details (external ID and email).
  • Event handling: Listen for success (redirect to confirmation page), error (display error message to user), and status changes (track checkout progress).
Find more complete examples in the GitHub repository.