subscription.trial.convert-and-provision ​
Convert a trial to paid subscription, provision keys and seats, and reconcile entitlements.
Convert a trial to paid subscription, provision keys and seats, and reconcile entitlements.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-subscription |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run id. |
organization_uuid | uuid | Yes | — | Organization UUID for tenant isolation. |
actor | string | No | — | User or service actor initiating the workflow. |
idempotency_key | string | No | — | Caller-supplied idempotency key for safe retries. |
dry_run | boolean | No | — | Validate and plan without mutating external resources. |
trial_subscription_uuid | uuid | Yes | — | Trial subscription UUID. |
target_plan | string | Yes | — | Target paid plan. |
payment_method_ref | string | No | — | Payment method reference. |
seat_count | integer | No | — | Seat count to provision. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Organization uuid. |
workflow_run_uuid | uuid | No | — | Workflow run uuid. |
status | string | No | — | Status. |
summary | json | No | — | Summary. |
resource_refs | json | No | — | Resource refs. |
warnings | list | No | — | Warnings. |
completed_at | string | No | — | Completed at. |
compensation_trigger | string | No | — | Compensation trigger. |
compensation_results | json | No | — | Compensation results. |
data_subscription_plan_list | json | No | — | Output state_data from DAG step data_subscription_plan_list. |
subscription_checkout | json | No | — | Output state_data from DAG step subscription_checkout. |
subscription_seat_change | json | No | — | Output state_data from DAG step subscription_seat_change. |
subscription_key_provision | json | No | — | Output state_data from DAG step subscription_key_provision. |
subscription_sync | json | No | — | Output state_data from DAG step subscription_sync. |
failure_reason | string | No | — | Failure reason. |
failed_step | json | No | — | Failed step. |
failed_layer | json | No | — | Failed layer. |
failed_at_state | string | No | — | Failed at state. |
error | string | No | — | Error. |
error_type | string | No | — | Error type. |
failed_at | string | No | — | Failed at. |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | 01_data_subscription_plan_list | data.subscription.plan.list | — |
| 2 | 02_subscription_checkout | subscription.checkout | — |
| 3 | 03_subscription_seat_change | subscription.seat_change | — |
| 4 | 04_subscription_key_provision | subscription.key_provision | — |
| 5 | 05_subscription_sync | subscription.sync | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
data.subscription.plan.list | data_subscription_plan_list |
subscription.checkout | subscription_checkout |
subscription.seat_change | subscription_seat_change |
subscription.key_provision | subscription_key_provision |
subscription.sync | subscription_sync |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "subscription.trial.convert-and-provision",
"initial_data": {
"organization_uuid": "value",
"trial_subscription_uuid": "value",
"target_plan": "value"
}
}