Usage
Return Value
redirectToCheckout(options?)
Redirects the user to the Crovver pricing/checkout page. Internally:
- Calls
POST /api/public/auth/checkout-tokenwith the tenant’s public key - Receives a signed JWT token
- Redirects to
{ecomUrl}/pricing?token={jwt}
Options
Examples
redirectToPortal()
Redirects the user to the billing portal to manage their subscription (view invoices, update payment method, cancel).
- Calls
POST /api/public/auth/portal-token - Redirects to
{ecomUrl}/portal?token={jwt}