Skip to content
Proud to collaborate with Microsoft for Startups

subscription.billing.portal-session.create ​

Create a Stripe Billing Portal URL for customer self-service billing management.

Create a Stripe Billing Portal session and return a browser handoff.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID.
return_urlstringYes—Browser return URL.
user_uuiduuidNo—User requesting the portal URL.
return_channeljsonNo—Optional notification routing metadata.
agent_session_refstringNo—Optional initiating agent session reference.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
stripe_customer_refstringNo——
portal_urlstringNo——
return_urlstringNo——
return_channeljsonNo——
agent_session_refstringNo——
next_actionjsonNo——
statusstringNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—create_portal_session—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingcreate_portal_sessioncompleted—
* (any state)failfailed—

Business Errors ​

CodeMessage Template
BILLING_ORGANIZATION_NOT_FOUNDOrganization {organization_uuid} not found
BILLING_STRIPE_NOT_CONFIGUREDSTRIPE_SECRET_KEY is required to create a Stripe billing portal session
BILLING_PORTAL_URL_UNAVAILABLEStripe did not return a billing portal URL
BILLING_ITEM_INPUT_ERROR
BILLING_AUTHORIZATION_REQUIRED

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "subscription.billing.portal-session.create",
  "initial_data": {
    "organization_uuid": "value",
    "return_url": "value"
  }
}