Skip to content
Proud to collaborate with Microsoft for Startups

subscription.plan.change-with-proration ​

Change a subscription plan, preview proration, collect confirmation when required, and reconcile entitlements.

Change a subscription plan, preview proration, collect confirmation when required, and reconcile entitlements.

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
workflow_run_idstringNo—DAG-stamped parent run id.
organization_uuiduuidYes—Organization UUID for tenant isolation.
actorstringNo—User or service actor initiating the workflow.
idempotency_keystringNo—Caller-supplied idempotency key for safe retries.
dry_runbooleanNo—Validate and plan without mutating external resources.
subscription_uuiduuidYes—Subscription UUID.
target_planstringYes—Target plan key.
billing_cyclestringNo—Billing cycle.
confirmbooleanNo—Apply after preview/approval.
effective_atstringNo—Effective timestamp.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo—Organization uuid.
workflow_run_uuiduuidNo—Workflow run uuid.
statusstringNo—Status.
summaryjsonNo—Summary.
resource_refsjsonNo—Resource refs.
warningslistNo—Warnings.
completed_atstringNo—Completed at.
compensation_triggerstringNo—Compensation trigger.
compensation_resultsjsonNo—Compensation results.
data_subscription_listjsonNo—Output state_data from DAG step data_subscription_list.
data_subscription_plan_listjsonNo—Output state_data from DAG step data_subscription_plan_list.
subscription_plan_changejsonNo—Output state_data from DAG step subscription_plan_change.
approval_request_collect_and_expirejsonNo—Output state_data from DAG step approval_request_collect_and_expire.
failure_reasonstringNo—Failure reason.
failed_stepjsonNo—Failed step.
failed_layerjsonNo—Failed layer.
failed_at_statestringNo—Failed at state.
errorstringNo—Error.
error_typestringNo—Error type.
failed_atstringNo—Failed at.

DAG Layers ​

#LayerStepsCompensation
101_data_subscription_listdata.subscription.list—
202_data_subscription_plan_listdata.subscription.plan.list—
303_subscription_plan_changesubscription.plan_change—
404_approval_request_collect_and_expireapproval.request.collect-and-expire—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
data.subscription.listdata_subscription_list
data.subscription.plan.listdata_subscription_plan_list
subscription.plan_changesubscription_plan_change
approval.request.collect-and-expireapproval_request_collect_and_expire

API Usage ​

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

{
  "workflow_type": "subscription.plan.change-with-proration",
  "initial_data": {
    "organization_uuid": "value",
    "subscription_uuid": "value",
    "target_plan": "value"
  }
}