Sample - Stripe API
GET/v1/promotion_codes

List promotion codes

Lists promotion codes. Use the filters to narrow results by active state, customer, coupon, code, or creation time, and use cursor parameters to paginate the list.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

10 parameters
activebooleanoptional
Filter promotion codes by whether they are active.
codestringoptional
Return only promotion codes matching this customer-facing code, case-insensitively. Must be no longer than 5000 characters.
couponstringoptional
Return only promotion codes associated with this coupon. Must be no longer than 5000 characters.
createdobjectoptional
Filter by creation time using a Unix timestamp or a range with `gt`, `gte`, `lt`, or `lte` bounds.
customerstringoptional
Return only promotion codes restricted to this customer. Must be no longer than 5000 characters.
customer_accountstringoptional
Return only promotion codes restricted to this customer account. Must be no longer than 5000 characters.
ending_beforestringoptional
An object ID that marks the end of the previous page when retrieving an earlier page. Must be no longer than 5000 characters.
expandarray<string>optional
Fields to expand in the response. Each field name must be no longer than 5000 characters.
limitintegeroptional
The number of objects to return. Must be between 1 and 100 and defaults to 10 when omitted.
starting_afterstringoptional
An object ID that marks the end of the previous page when retrieving the next page. Must be no longer than 5000 characters.

2 status codes
200Returns a list object containing promotion codes in `data`, the `has_more` pagination flag, the list object type, and the access `url`.
dataarray<PromotionCode>required
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

limit must be between 1 and 100 and defaults to 10 when omitted. created must be a Unix timestamp or a range object using the supported gt, gte, lt, or lte bounds; use starting_after or ending_before for cursor pagination.