Get Subscription
stripe.get_subscription
ActionBusiness appsconnection required
Calls the Stripe API with the connection's secret key.
Retrieve one Stripe subscription by its id.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Stripe
- Secret shape
- the Stripe secret key (sk_...)
- Resolved by
- config.connection_id, else node.connection_id
Configuration
1 field, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
subscription_id The subscription to act on (sub_...). Supports {{ }} expressions. | string | Yes | — | — | sub_1MowQVLkdIwHu7ixeRlqHVzs |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"subscription_id": "sub_1MowQVLkdIwHu7ixeRlqHVzs"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The subscription id (sub_...). | string | — |
status One of incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid or paused. | string | — |
customer The customer this subscription bills. | string | — |
currency Three-letter lowercase ISO currency code. | string | — |
collection_method charge_automatically or send_invoice. | string | — |
cancel_at_period_end True when it stops at the end of the period. | boolean | — |
canceled_at When it was cancelled, Unix seconds, or null. | number | — |
start_date When the subscription started, Unix seconds. | number | — |
trial_end When the trial ends, Unix seconds, or null. | number | — |
latest_invoice The most recent invoice id, or null. | string | — |
default_payment_method The payment method it charges, or null. | string | — |
created Creation time, as a Unix timestamp in seconds. | number | — |
metadata The key/value pairs stored on the subscription. | object | — |
{
"cancel_at_period_end": false,
"canceled_at": 0,
"collection_method": "",
"created": 0,
"currency": "",
"customer": "",
"default_payment_method": "",
"id": "",
"latest_invoice": "",
"metadata": {},
"start_date": 0,
"status": "",
"trial_end": 0
}See Get Subscription run in a workflow.
In a technical demo we add the Stripe connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.