stripe.subscription.start ​
Ensure the customer, create a Stripe subscription, and confirm its status
Ensure the customer, create the subscription, and read back its real status.
The read-back matters: Stripe can return a subscription in incomplete when the customer has no usable payment method, which looks like success to a caller that only checks for a subscription_id. entitled is the field to gate access on.
For a customer who has not paid before, drive stripe.charge.hosted with mode=subscription instead — it collects a payment method. This workflow suits customers who already have one on file.
Mirrors abacatepay.subscription.start.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-stripe |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | Org-scoped Stripe connection (customer's own account) |
price_id | string | Yes | — | Recurring price to subscribe the customer to |
customer_id | string | No | — | Existing Stripe customer; skips customer creation |
customer_email | string | No | — | Create/attach a customer with this email |
customer_name | string | No | — | Name for a newly created customer |
trial_days | integer | No | — | Free trial length in days |
end_user_uuid | string | No | — | End-user this subscription entitles; stored in metadata |
metadata | json | No | — | Metadata stored on the customer and subscription |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
subscription_id | string | No | — | — |
status | string | No | — | — |
entitled | boolean | No | — | — |
customer_id | string | No | — | — |
created_customer | boolean | No | — | — |
current_period_end | integer | No | — | — |
ensure_customer | json | No | — | — |
create_subscription | json | No | — | — |
confirm_subscription | json | No | — | — |
price_id | string | No | — | — |
customer_email | string | No | — | — |
customer_name | string | No | — | — |
trial_days | integer | No | — | — |
end_user_uuid | string | No | — | — |
metadata | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | customer | stripe.customers.create_customer | — |
| 2 | subscribe | stripe.subscriptions.create_subscription | — |
| 3 | confirm | stripe.subscriptions.get_subscription | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
stripe.customers.create_customer | ensure_customer |
stripe.subscriptions.create_subscription | create_subscription |
stripe.subscriptions.get_subscription | confirm_subscription |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "stripe.subscription.start",
"initial_data": {
"organization_uuid": "value",
"cloud_connection_uuid": "value",
"price_id": "value"
}
}