Skip to content
Proud to collaborate with Microsoft for Startups

subscription.billing.workflow-retention.apply-downgrade ​

Apply a scheduled workflow retention billing downgrade after the downgrade cut window.

Apply a previously scheduled workflow-retention downgrade after the renewal cut window.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
retention_daysintegerYes——
storage_gbintegerNo——
max_retained_workflow_storage_bytesintegerNo——
proration_behaviorstringNo——
billing_cycle_anchorstringNo——
downgrade_effective_atstringNo——
downgrade_cut_daysintegerNo——
apply_scheduled_downgradebooleanNo——
scheduled_by_workflow_refstringNo——
workflow_schedule_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
subscription_uuiduuidNo——
retention_daysintegerNo——
storage_gbintegerNo——
included_storage_gbintegerNo——
paid_storage_gbintegerNo——
max_retained_workflow_storage_bytesintegerNo——
stripe_price_refstringNo——
stripe_subscription_item_refstringNo——
stripe_actionstringNo——
workflow_storage_price_refstringNo——
workflow_storage_subscription_item_refstringNo——
workflow_storage_actionstringNo——
proration_behaviorstringNo——
billing_cycle_anchorstringNo——
downgrade_cut_daysintegerNo——
downgrade_effective_atstringNo——
scheduled_workflow_refstringNo——
workflow_schedule_uuiduuidNo——
scheduled_downgradejsonNo——
billing_item_uuiduuidNo——
workflow_storage_billing_item_uuiduuidNo——
policy_uuiduuidNo——
governance_schedule_uuidsjsonNo——
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—apply_change—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingapply_changecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "subscription.billing.workflow-retention.apply-downgrade",
  "initial_data": {
    "organization_uuid": "value",
    "retention_days": 123
  }
}