Skip to main content
GET
https://api.destined.ai
/
v1
/
billing
/
portal
curl "https://api.destined.ai/v1/billing/portal" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "url": "https://billing.stripe.com/p/session/xxx"
}

Response

url
string
required
Stripe billing portal URL (valid for 24 hours)

Portal Features

The Stripe billing portal allows users to:
  • Update payment method
  • View invoice history
  • Download invoices
  • Cancel subscription
  • Change subscription tier
curl "https://api.destined.ai/v1/billing/portal" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "url": "https://billing.stripe.com/p/session/xxx"
}

Usage in React

function BillingButton() {
  const handleManageBilling = async () => {
    const portal = await client.billing.getBillingPortalV1BillingPortalGet();
    window.open(portal.url, "_blank");
  };

  return (
    <button onClick={handleManageBilling}>
      Manage Billing
    </button>
  );
}