curl --request POST \
--url https://api.example.com/api/payments/billing-portal \
--header 'Authorization: <authorization>'{
"message": "<string>",
"data": {
"url": "<string>"
}
}Create a Stripe Customer Portal session for managing subscriptions and payment methods.
curl --request POST \
--url https://api.example.com/api/payments/billing-portal \
--header 'Authorization: <authorization>'{
"message": "<string>",
"data": {
"url": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devxtra-community/hayon/llms.txt
Use this file to discover all available pages before exploring further.
400 error./settings page in the Hayon frontend.
Bearer <token>.stripeCustomerId on file. This is set automatically when the user first completes a checkout session. Calling this endpoint without a prior subscription returns:
{
"message": "No billing account found. Please subscribe first."
}
200 OK with a JSON body containing a single-use Stripe Customer Portal URL.
Hide properties
customer.subscription.updated event keeps the database in sync./settings after they exit.url is single-use. If the user’s session expires, call this endpoint again to generate a fresh URL.curl --request POST \
--url https://api.hayon.app/api/payments/billing-portal \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
"message": "Billing portal session created",
"data": {
"url": "https://billing.stripe.com/p/session/test_YWNjdF8xTzBTVGFCdUhyZ3JhTkJ4LF9RZlQ0eUhwUkdMRzFmRFR5d2lQUFFZVG9jbloxSnlm0100KgiqMBKb"
}
}
{
"message": "No billing account found. Please subscribe first."
}
{
"message": "Unauthorized"
}
{
"message": "Failed to open billing portal"
}
User manages their subscription