subscription.billing.lumen-addon.apply-downgrade ​
Apply a scheduled Lumen add-on (entry pack / storage) downgrade.
Apply a previously scheduled Lumen add-on downgrade at its effective date.
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 | — | — |
proration_behavior | string | No | — | — |
billing_cycle_anchor | string | No | — | — |
downgrade_effective_at | string | No | — | — |
downgrade_cut_days | integer | No | — | — |
apply_scheduled_downgrade | boolean | No | — | — |
scheduled_by_workflow_ref | string | No | — | — |
workflow_schedule_uuid | uuid | 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 | — | apply_change | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | apply_change | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "subscription.billing.lumen-addon.apply-downgrade",
"initial_data": {
"organization_uuid": "value"
}
}