Skip to main content
All CollectionsIntegrationsWeb Payment
Web payment billing portal
Web payment billing portal
Updated over a week ago

The flow for opening the Web Payment billing portal is similar to the checkout flow. Treefort will reach out to your API to request a link to redirect the user to. The flow begins when a subscriber clicks the “Manage billing” button in the web app. The web app then reaches out to the Treefort API, and the Treefort API reaches out to your billing portal session endpoint to fetch a billing portal link. The Treefort API sends your checkout session back to the app, which redirects the user to the link.

What functionality you provide in the billing portal is up to you, but the billing portal should at least allow users to manage their billing information.

If the user’s actions in the billing portal result in you making requests to the Treefort API to update the user’s subscription state, you should wait for success responses for those requests before redirecting the user back to the app, otherwise they might briefly see an incorrect subscription state. To redirect the user back to the app when they’ve finished managing their billing information, use the back URL specified in the request to your billing portal session endpoint.

Did this answer your question?