Skip to content
Gravity Logo / Docs Gravity home
Browse documentation
Documentation/Gravity Web

usePlans

When you need a list of available Stripe plans, you can use the usePlans hook to fetch a list of plans formatted for the UI.

const plans = usePlans();

plans.loading tracks the request. When it succeeds, plans.data.list contains { value, label } options, plans.data.active identifies the active plan and plans.data.raw contains the original response data.