subscription.billing.lumen-addon.change ​
Change purchased Lumen entry packs (1M entries/month each) and storage GB.
Change purchased Lumen entry packs and storage GB above the tier-included allowance.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-subscription |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
entries_packs | integer | No | — | — |
storage_gb | integer | No | — | — |
payment_confirmed | boolean | No | — | — |
stripe_checkout_session_ref | string | No | — | — |
proration_behavior | string | No | — | — |
billing_cycle_anchor | string | No | — | — |
return_channel | json | No | — | — |
agent_session_ref | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
subscription_uuid | uuid | No | — | — |
plan | string | No | — | — |
entries_packs | integer | No | — | — |
storage_gb | integer | No | — | — |
included_entries_month | integer | No | — | — |
max_entries_month | integer | No | — | — |
included_storage_gb | integer | No | — | — |
max_storage_bytes | integer | No | — | — |
entries_pack_price_ref | string | No | — | — |
entries_pack_subscription_item_ref | string | No | — | — |
entries_pack_action | string | No | — | — |
storage_price_ref | string | No | — | — |
storage_subscription_item_ref | string | No | — | — |
storage_action | string | No | — | — |
proration_behavior | string | No | — | — |
billing_cycle_anchor | string | No | — | — |
downgrade_cut_days | integer | No | — | — |
downgrade_effective_at | string | No | — | — |
scheduled_workflow_ref | string | No | — | — |
workflow_schedule_uuid | uuid | No | — | — |
scheduled_downgrade | json | No | — | — |
entries_pack_billing_item_uuid | uuid | No | — | — |
storage_billing_item_uuid | uuid | No | — | — |
lumen_provisioning | json | No | — | — |
lumen_provisioning_reconcile_schedule_uuid | uuid | No | — | — |
payment_confirmed | boolean | No | — | — |
stripe_checkout_session_ref | string | No | — | — |
status | string | No | — | — |
completed_at | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | change_addons | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | change_addons | completed | — |
* (any state) | fail | failed | — |
Business Errors ​
| Code | Message Template |
|---|---|
BILLING_AUTHORIZATION_REQUIRED | |
BILLING_OPERATION_INPUT_ERROR | |
BILLING_OPERATION_STRIPE_NOT_CONFIGURED | STRIPE_SECRET_KEY is required for paid billing item changes |
BILLING_OPERATION_PRICE_NOT_CONFIGURED | No Stripe price is configured for {item_code} |
BILLING_OPERATION_PLATFORM_SUBSCRIPTION_NOT_FOUND | No active platform subscription found for organization |
BILLING_OPERATION_PLATFORM_SUBSCRIPTION_NOT_BILLED | Organization {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-addon.change",
"initial_data": {
"organization_uuid": "value"
}
}