Skip to content
Proud to collaborate with Microsoft for Startups

stripe.subscriptions.create_subscription ​

Create a Stripe subscription for an existing customer

Creates a Stripe subscription for an existing customer.

Acts on the CUSTOMER'S OWN Stripe account, authenticated via the org-scoped Stripe connection selected by cloud_connection_uuid.

The subscription is created immediately and is active (or trialing if trial_days is set). If the customer has a default payment method, the first invoice is paid automatically.

Inputs:

  • cloud_connection_uuid: Org-scoped Stripe connection UUID (required).
  • customer_id: Stripe customer ID (required), e.g. cus_ABC123
  • price_id: Stripe price ID (required), e.g. price_DEF456
  • trial_days: Trial period in days before billing begins (optional)
  • metadata: Arbitrary key-value metadata to attach to the subscription (optional)

Outputs (terminal state_data):

  • subscription_id: str — Stripe subscription ID, e.g. sub_XYZ789
  • status: str — subscription status: active, trialing, incomplete, etc.
  • current_period_end: str — ISO-8601 timestamp when the current billing period ends

Connection required: cloud_connection_uuid — the organization's own Stripe account credentials; there is no platform-key fallback.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-stripe
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuiduuidYes—Org-scoped Stripe connection (customer's own account)
customer_idstringYes—Stripe customer ID, e.g. cus_ABC123
price_idstringYes—Stripe price ID, e.g. price_DEF456
trial_daysintegerNo—Number of trial days before the first charge
metadatajsonNo—Arbitrary key-value metadata to attach

Output Schema ​

FieldTypeRequiredDefaultDescription
current_period_endstringNo——
statusstringNo——
subscription_idstringNo——
customer_idstringNo——
metadatajsonNo——
price_idstringNo——
trial_daysintegerNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "stripe.subscriptions.create_subscription",
  "initial_data": {
    "cloud_connection_uuid": "value",
    "customer_id": "value",
    "price_id": "value"
  }
}