List Promotion Codes
stripe.list_promotion_codes
ActionBusiness appsconnection required
Calls the Stripe API with the connection's secret key.
List Stripe promotion codes, newest first, with optional filters.
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
9 fields, none 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 |
|---|---|---|---|---|---|
code Return only the code matching this string, ignoring case. | string | No | — | — | — |
coupon Return only codes that redeem this coupon. | string | No | — | — | — |
customer Return only codes restricted to this customer (cus_...). | string | No | — | — | — |
active Return only active codes, or only inactive ones. | boolean | No | — | — | — |
limit How many objects to return, 1-100. Stripe defaults to 10. | number | No | 10 | 1–100 | — |
starting_after Cursor: return the page after this object id, for walking forward. | string | No | — | — | — |
ending_before Cursor: return the page before this object id, for walking backward. | string | No | — | — | — |
created_after Only objects created at or after this Unix timestamp, in seconds. | number | No | — | ≥ 0 | — |
created_before Only objects created at or before this Unix timestamp, in seconds. | number | No | — | ≥ 0 | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"limit": 10
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
promotion_codes[].id The promotion code id (promo_...). | string | — |
promotion_codes[].code The string customers type at checkout. | string | — |
promotion_codes[].coupon The coupon this code redeems. | string | — |
promotion_codes[].active True while the code can be redeemed. | boolean | — |
promotion_codes[].customer The only customer allowed to use it, or null. | string | — |
promotion_codes[].expires_at When the code stops working, Unix seconds, or null. | number | — |
promotion_codes[].max_redemptions How many times the code may be redeemed, or null. | number | — |
promotion_codes[].times_redeemed How many times it has been redeemed so far. | number | — |
promotion_codes[].created Creation time, as a Unix timestamp in seconds. | number | — |
count How many objects this page returned. | number | — |
has_more True when Stripe has a further page to fetch. | boolean | — |
{
"count": 0,
"has_more": false,
"promotion_codes": [
{
"active": false,
"code": "",
"coupon": "",
"created": 0,
"customer": "",
"expires_at": 0,
"id": "",
"max_redemptions": 0,
"times_redeemed": 0
}
]
}See List Promotion Codes 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.