create_subscription_portal_link
Create a short-lived Stripe customer portal URL for a subscriber to update their card (flow payment_method_update, default) or see invoices and card (overview). Mint it when the customer asks; don't store it. With user_id/email, uses their most recent subscription. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | No | ||
| No | Customer email (alternative to subscription_id) | ||
| api_key | No | Cred API key (optional if set via the x-api-key header) | |
| user_id | No | External user ID (alternative to subscription_id) | |
| project_id | No | Cred project ID (optional; the API key already identifies the project) | |
| return_url | No | URL to return to from the portal; must be https on a Cred host or a domain listed under Dashboard → Payments → Allowed redirect domains, else 400 REDIRECT_NOT_ALLOWED | |
| x402_payment | No | Base64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD | |
| subscription_id | No | Cred subscription ID or Stripe sub_… ID |