List Coupons

stripe.list_coupons
ActionBusiness appsconnection required

Calls the Stripe API with the connection's secret key.

List the discount coupons in the Stripe account, newest first.

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

5 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
limit
How many objects to return, 1-100. Stripe defaults to 10.
numberNo101–100—
starting_after
Cursor: return the page after this object id, for walking forward.
stringNo———
ending_before
Cursor: return the page before this object id, for walking backward.
stringNo———
created_after
Only objects created at or after this Unix timestamp, in seconds.
numberNo—≥ 0—
created_before
Only objects created at or before this Unix timestamp, in seconds.
numberNo—≥ 0—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "limit": 10
}

Output

One shape.

result

FieldTypeExample
coupons[].id
The coupon id, which is also the code applied to a customer.
string—
coupons[].name
The name customers see on invoices, or null.
string—
coupons[].percent_off
Percentage taken off, when the coupon is percentage-based.
number—
coupons[].amount_off
Amount taken off, in the currency's minor unit.
number—
coupons[].currency
The currency of amount_off, or null for a percentage coupon.
string—
coupons[].duration
forever, once or repeating.
string—
coupons[].duration_in_months
How many months a repeating coupon applies for.
number—
coupons[].max_redemptions
How many times the coupon may be redeemed, or null.
number—
coupons[].times_redeemed
How many times it has been redeemed so far.
number—
coupons[].redeem_by
Last moment it can be redeemed, Unix seconds, or null.
number—
coupons[].valid
True while the coupon can still be applied.
boolean—
coupons[].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,
  "coupons": [
    {
      "amount_off": 0,
      "created": 0,
      "currency": "",
      "duration": "",
      "duration_in_months": 0,
      "id": "",
      "max_redemptions": 0,
      "name": "",
      "percent_off": 0,
      "redeem_by": 0,
      "times_redeemed": 0,
      "valid": false
    }
  ],
  "has_more": false
}

See List Coupons 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.