Skip to content
Proud to collaborate with Microsoft for Startups

subscription.billing.lumen-plan.change ​

Change an organization's Lumen tier through Stripe-backed billing.

Change the Stripe-backed Lumen tier and request Lumen provisioning.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
planstringYes——
retention_daysintegerNo——
payment_confirmedbooleanNo——
stripe_checkout_session_refstringNo——
proration_behaviorstringNo——
billing_cycle_anchorstringNo——
return_channeljsonNo——
agent_session_refstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
subscription_uuiduuidNo——
planstringNo——
retention_daysintegerNo——
effective_retention_daysintegerNo——
rate_limit_per_minuteintegerNo——
stripe_price_refstringNo——
stripe_subscription_item_refstringNo——
stripe_actionstringNo——
proration_behaviorstringNo——
billing_cycle_anchorstringNo——
downgrade_cut_daysintegerNo——
downgrade_effective_atstringNo——
scheduled_workflow_refstringNo——
workflow_schedule_uuiduuidNo——
scheduled_downgradejsonNo——
billing_item_uuiduuidNo——
lumen_provisioningjsonNo——
lumen_provisioning_reconcile_schedule_uuiduuidNo——
payment_confirmedbooleanNo——
stripe_checkout_session_refstringNo——
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—change_plan—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingchange_plancompleted—
* (any state)failfailed—

Business Errors ​

CodeMessage Template
BILLING_AUTHORIZATION_REQUIRED
BILLING_OPERATION_INPUT_ERROR
BILLING_OPERATION_STRIPE_NOT_CONFIGUREDSTRIPE_SECRET_KEY is required for paid billing item changes
BILLING_OPERATION_PRICE_NOT_CONFIGUREDNo Stripe price is configured for {item_code}
BILLING_OPERATION_PLATFORM_SUBSCRIPTION_NOT_FOUNDNo active platform subscription found for organization
BILLING_OPERATION_PLATFORM_SUBSCRIPTION_NOT_BILLEDOrganization {organization_uuid} has an active platform subscription record with no Stripe subscription behind it — platform checkout must complete before paid add-ons can be purchased

API Usage ​

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

{
  "workflow_type": "subscription.billing.lumen-plan.change",
  "initial_data": {
    "organization_uuid": "value",
    "plan": "value"
  }
}