Stripe API
coupons public
0
Node
JavaScript
Python beta
Ruby beta
Shell
curl
Hey! Want to build awesome, scalable APIs like this one?
Sign up with Standard Library today and build your own API or connect to others in seconds.
We hope you enjoy documentation for the Stripe coupons API on Standard Library! This API can be used via the command line (shell), Node, Ruby, Python or as a generic HTTP call in any language. Check the code examples on the right associated with each API method for how to use this API in your language of choice.
API Description
No "description" field found in package.json
# API Documentation This file should contain documentation introducing your API to **end-users**. It will display on your service's [Standard Library](https://stdlib.com/) documentation page if you choose to publish it. Usage examples and additional information around calling your API belong here.
Create a Coupon
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
duration
required
enum
Specifies how long the discount will be in effect.
current value set to
enter a test value
id
string
Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific code you’ll give to your customer to use when signing up (e.g., FALL25OFF).
optional, default value is
null
optional, current value set to
enter a test value
amount_off
number
The amount to subtract from an invoice total in cents (required if percent_off is not passed).
optional, default value is
null
optional, current value set to
enter a test value
currency
string
Three-letter ISO code for the currency of the amount_off parameter (required if amount_off is passed).
optional, default value is
null
optional, current value set to
enter a test value
percent_off
number
A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if amount_off is not passed).
optional, default value is
null
optional, current value set to
enter a test value
duration_in_months
number
Required only if duration is repeating, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
optional, default value is
null
optional, current value set to
enter a test value
max_redemptions
number
A positive integer specifying the number of times the coupon can be redeemed before it’s no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
optional, default value is
null
optional, current value set to
enter a test value
metadata
object
A set of key-value pairs that you can attach to a coupon object. It can be useful for storing additional information about the coupon in a structured format.
optional, default value is
null
optional, current value set to
enter a test value
name
string
Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the id is shown if name is not set.
optional, default value is
null
optional, current value set to
enter a test value
redeem_by
number
Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
optional, default value is
null
optional, current value set to
enter a test value
List Coupons
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
created
object
A filter on the list based on the coupon "created" field.
optional, default value is
null
optional, current value set to
enter a test value
ending_before
string
A cursor for use in pagination. ending_before is an object ID that defines your place in the list.
optional, default value is
null
optional, current value set to
enter a test value
starting_after
string
A cursor for use in pagination. starting_after is an object ID that defines your place in the list.
optional, default value is
null
optional, current value set to
enter a test value
limit
number
A limit on the number of objects to be returned. Limit can range between 1 and 100.
optional, default value is
100
optional, current value set to
enter a test value
Retrieve a Coupon by id
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
id
required
string
The Coupon id
current value set to
enter a test value
Made with by the Stripe team with the help of Standard Library.