stripe.billing_portal.create_session ​
Create a Stripe Billing Portal URL for customer self-service
Create a hosted Billing Portal session and return its URL.
This is the single highest-leverage workflow for a builder: Stripe hosts cancel, plan change, card update, and invoice history, so the app never has to build or maintain any of it. Redirect a signed-in customer to portal_url; they return to return_url when done.
Acts on the CUSTOMER'S OWN Stripe account, authenticated via the org-scoped Stripe connection selected by cloud_connection_uuid.
Inputs:
- cloud_connection_uuid: Org-scoped Stripe connection (customer's own account).
- customer_id: Stripe customer ID (cus_...).
- return_url: Where Stripe returns the customer when they are done.
- configuration_id: Portal configuration to use (optional).
Outputs (terminal state_data):
- portal_session_id: str
- portal_url: str — redirect the customer here
- return_url: str
Connection required: cloud_connection_uuid — the organization's own Stripe account credentials; there is no platform-key fallback.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-stripe |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cloud_connection_uuid | uuid | Yes | — | Org-scoped Stripe connection (customer's own account) |
customer_id | string | Yes | — | Stripe customer ID (cus_...) |
return_url | string | Yes | — | Where Stripe returns the customer when they are done |
configuration_id | string | No | — | Portal configuration to use (optional) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
portal_session_id | string | No | — | — |
portal_url | string | No | — | — |
return_url | string | No | — | — |
cloud_connection_uuid | uuid | No | — | — |
customer_id | string | No | — | — |
configuration_id | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_layer | integer | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "stripe.billing_portal.create_session",
"initial_data": {
"cloud_connection_uuid": "value",
"customer_id": "value",
"return_url": "value"
}
}