Skip to content
Proud to collaborate with Microsoft for Startups

subscription.billing.lumen-plan.checkout ​

Create a Stripe Checkout URL for a paid Lumen plan upgrade.

Create a prepaid checkout before applying paid Lumen upgrades.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
planstringYes——
retention_daysintegerNo——
success_urlstringYes——
cancel_urlstringYes——
return_channeljsonNo——
agent_session_refstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
subscription_uuiduuidNo——
planstringNo——
retention_daysintegerNo——
effective_retention_daysintegerNo——
prior_planstringNo——
prior_retention_daysintegerNo——
prior_effective_retention_daysintegerNo——
amount_dueintegerNo——
currencystringNo——
stripe_customer_refstringNo——
stripe_price_refstringNo——
stripe_checkout_session_refstringNo——
checkout_urlstringNo——
next_actionjsonNo——
return_channeljsonNo——
agent_session_refstringNo——
billing_actor_refstringNo——
change_resultjsonNo——
statusstringNo——
completed_atstringNo——
canceled_atstringNo——
cancel_reasonstringNo——
failed_atstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—create_checkout—
checkout_createdNoNo———
canceledNoYesYes——
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingcreate_checkoutcheckout_created—
checkout_createdpayment_receivedcompleted—
checkout_createdcancelcanceled—
* (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
BILLING_OPERATION_CHECKOUT_URL_UNAVAILABLEStripe did not return a checkout URL

API Usage ​

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

{
  "workflow_type": "subscription.billing.lumen-plan.checkout",
  "initial_data": {
    "organization_uuid": "value",
    "plan": "value",
    "success_url": "value",
    "cancel_url": "value"
  }
}