Mint a short-lived JWT to redirect the user to the billing portal.
curl -X POST "https://api.crovver.com/api/public/auth/portal-token" \ -H "x-public-key: pk_live_..." \ -H "Content-Type: application/json" \ -d '{ "externalTenantId": "workspace_123", "returnUrl": "https://app.com/settings/billing" }'
{ "success": true, "data": { "token": "eyJhbGciOiJIUzI1NiJ9...", "expiresAt": "2025-01-01T00:10:00Z" }, "meta": { "portalUrl": "https://ecom.crovver.com/portal?token=eyJhbGci...", "expiresIn": 600 } }
pk_live_...