Checkout button

The ButtonCheckout component is a dynamic button designed to handle payments and subscriptions seamlessly. It integrates with an API to create a checkout session and redirect users to complete their purchase.

This button integrates directly with an API to create and manage checkout sessions. Depending on the selected mode, it supports both one-time payments and recurring subscriptions. Once triggered, the component communicates with the backend, retrieves a checkout URL, and redirects users to complete their purchase.

It accepts the priceIdwhich allows you to point to a specific product price from different payment provider.

  • Simple payment flow – Eliminates complexity by automating the checkout process.

  • Customizable behavior – Supports different payment modes (payment or subscription).

  • Responsive UI – Displays a loading state while processing and offers interactive visual feedback.

  • Localization support – Uses next-intl for adapting button text based on language preferences.

Last updated