
























Building on our recent billing button components, we're introducing a set of React hooks that enable you to build fully custom billing flows. These hooks provide direct access to billing data and functionality, giving you complete control over the user experience.
You can now build your own checkout flow with Clerk Billing for both users and organizations. Leverage the useCheckout() hook to create a custom checkout experience. Choose between prompting users to enter their payment details or pay with a saved payment method.
Below you can see a simple example of a custom checkout flow that is using the <PaymentElement /> component where users can enter their payment details.
To enable users to pay with a saved payment method, you can use the usePaymentMethods() hook to display a list of saved payment methods.
usePlans() fetches your instance's configured plans, perfect for building custom pricing tables or plan selection interfaces.

Access current subscription details to build custom account management interfaces and display billing status.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。