Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-stripe
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuiduuidYes—Org-scoped Stripe connection (customer's own account)
customer_idstringYes—Stripe customer ID (cus_...)
return_urlstringYes—Where Stripe returns the customer when they are done
configuration_idstringNo—Portal configuration to use (optional)

Output Schema ​

FieldTypeRequiredDefaultDescription
portal_session_idstringNo——
portal_urlstringNo——
return_urlstringNo——
cloud_connection_uuiduuidNo——
customer_idstringNo——
configuration_idstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
errorstringNo——
error_typestringNo——
failed_layerintegerNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

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"
  }
}