Create Promotion Code
stripe.create_promotion_code
ActionBusiness appsconnection required
Calls the Stripe API with the connection's secret key.
Create a customer-facing code that redeems an existing Stripe coupon.
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
10 fields, 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 |
|---|---|---|---|---|---|
coupon The coupon this code redeems. | string | Yes | — | — | nVJYDOag |
code The string customers type at checkout. Letters, digits and dashes only; leave blank and Stripe generates one. | string | No | — | ≤ 500 characters | WELCOME25 |
customer Restrict the code to this customer (cus_...). | string | No | — | — | — |
active Whether the code can be redeemed right away. | boolean | No | — | — | — |
expires_at When the code stops working, as a Unix timestamp in seconds. | number | No | — | ≥ 0 | — |
max_redemptions How many times in total this code may be redeemed. | number | No | — | ≥ 1 | — |
minimum_amount Only allow the code on orders at or above this amount, in the currency's minor unit. Needs 'minimum_amount_currency'. | number | No | — | ≥ 1 | — |
minimum_amount_currency Three-letter lowercase ISO currency code of 'minimum_amount'. | string | Conditional | — | 3–3 characters; only with minimum_amount | — |
metadata Key/value pairs stored on the promotion code and returned on every read. | object | No | — | — | — |
idempotency_key Overrides the key this node derives from the step. Set it to a business identifier (an order id, say) when the same write must not repeat across runs; leave it blank and a retry of this step reuses the step's own key. | string | No | — | ≤ 255 characters | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"code": "WELCOME25",
"coupon": "nVJYDOag"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The promotion code id (promo_...). | string | — |
code The string customers type at checkout. | string | — |
coupon The coupon this code redeems. | string | — |
active True while the code can be redeemed. | boolean | — |
customer The only customer allowed to use it, or null. | string | — |
expires_at When the code stops working, Unix seconds, or null. | number | — |
max_redemptions How many times the code may be redeemed, or null. | number | — |
times_redeemed How many times it has been redeemed so far. | number | — |
created Creation time, as a Unix timestamp in seconds. | number | — |
{
"active": false,
"code": "",
"coupon": "",
"created": 0,
"customer": "",
"expires_at": 0,
"id": "",
"max_redemptions": 0,
"times_redeemed": 0
}Notes
- This call pins Stripe API version 2025-09-30.clover, which is where the coupon reference moved into a promotion hash, so the request does not depend on the account's default version.
See Create Promotion Code 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.