Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeDag
LibraryApp-stripe
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloud_connection_uuiduuidYes—Org-scoped Stripe connection (customer's own account)
price_idstringYes—Recurring price to subscribe the customer to
customer_idstringNo—Existing Stripe customer; skips customer creation
customer_emailstringNo—Create/attach a customer with this email
customer_namestringNo—Name for a newly created customer
trial_daysintegerNo—Free trial length in days
end_user_uuidstringNo—End-user this subscription entitles; stored in metadata
metadatajsonNo—Metadata stored on the customer and subscription

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloud_connection_uuiduuidYes——
subscription_idstringNo——
statusstringNo——
entitledbooleanNo——
customer_idstringNo——
created_customerbooleanNo——
current_period_endintegerNo——
ensure_customerjsonNo——
create_subscriptionjsonNo——
confirm_subscriptionjsonNo——
price_idstringNo——
customer_emailstringNo——
customer_namestringNo——
trial_daysintegerNo——
end_user_uuidstringNo——
metadatajsonNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerintegerNo——
errorstringNo——
error_typestringNo——

DAG Layers ​

#LayerStepsCompensation
1customerstripe.customers.create_customer—
2subscribestripe.subscriptions.create_subscription—
3confirmstripe.subscriptions.get_subscription—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
stripe.customers.create_customerensure_customer
stripe.subscriptions.create_subscriptioncreate_subscription
stripe.subscriptions.get_subscriptionconfirm_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"
  }
}