# 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.

<figure><img src="https://1120314470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIC4frjJCaZ16PqRKkhj%2Fuploads%2F2WFoyA81twRGPYDx60tU%2FScreenshot%202025-02-09%20at%2002.10.21.png?alt=media&#x26;token=0f25414d-e88e-4d82-b8a7-1e4fbc1420f3" alt="" width="375"><figcaption></figcaption></figure>

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 `priceId`which 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.

####
