Stripe Coupon
Stripe Coupon manages the discount coupons in your Stripe account. A coupon can take off a percentage or a fixed amount, and apply once, forever or for several months. From a flow you can create, look up and delete them.
When to use it
- You want to create a welcome coupon every time a new customer signs up.
- You launch a campaign and want to generate a coupon with a maximum number of uses.
- You want to review the coupons you have in Stripe.
- A promotion has ended and you want to delete its coupon.
Configuration
You need a Stripe API credential with the secret key of your Stripe account. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Stripe API credential of your account. |
| Operation (required) | The action the component performs. Defaults to Create. See Operations. |
| Get Mode | Only in Get. By ID looks up one coupon; All returns the list of coupons. Defaults to By ID. |
| Coupon ID | The coupon’s identifier in Stripe. Required in Get with By ID and in Delete. |
| Name | Name of the coupon your customers will see. Only in Create. |
| Duration | How long the discount applies: once, forever or repeating (several months). Defaults to once. Only in Create. |
| Duration in Months | Number of months the discount applies when Duration is repeating. Defaults to 1. Only in Create. |
| Percent Off | Percentage discount, from 1 to 100. Only in Create. |
| Amount Off | Fixed discount in the smallest unit of the currency, for example cents: 500 is 5.00. Used together with Currency. Only in Create. |
| Currency | The currency of the fixed discount, such as eur or usd. Defaults to usd. Only in Create. |
| Max Redemptions | Maximum number of times the coupon can be used. Only in Create. |
| Redeem By | Date after which the coupon can no longer be used, as a Unix timestamp (number of seconds). Only in Create. |
| Limit | Only in Get with All. Maximum number of coupons returned, between 1 and 100. Defaults to 100. |
In Create you must fill in Percent Off or Amount Off. If you fill in both, the percentage is used.
Operations
- Create: creates a new coupon with the given discount and duration.
- Delete: deletes a coupon so it can no longer be used.
- Get: with
By IDreturns one coupon; withAllreturns the list of coupons.
Output
The Data output returns the coupon that was created, looked up or deleted. With Get and All, it returns one item per coupon. Each item includes the coupon’s identifier, which is what your customers or your flows use to apply it.
You can connect it to an email for the customer or to a spreadsheet where you log your coupons. The component can also be connected to an Agent as a tool, so the agent decides when to use it. See Tool Mode.
Example
An online shop wants to give a 15% discount on the first purchase to every customer who subscribes to the newsletter.
- When a new sign-up arrives, add Stripe Coupon with Operation set to
Create. - Set Percent Off to
15, Duration toonceand Max Redemptions to1. - In Name, write “Welcome 15%”.
- Connect the Data output to a welcome email that includes the coupon’s identifier.
Related components
- Stripe Customer: create and manage customers.
- Stripe Subscription: your customers’ subscriptions.
- Stripe Price: prices of your products.