Skip to main content
Schema2020-08-27object

promotion_code

A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create multiple codes for a single coupon.

Source
openapi/spec3.json
Commit
d70de345383d
Active snapshot
da69df7e6e11

PromotionCode

object

A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create multiple codes for a single coupon.

active boolean
required

Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.

code string
required

The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.

coupon Coupon object
required

A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge).

created integer (unix-time)
required

Time at which the object was created. Measured in seconds since the Unix epoch.

customer
optionalnullable

The customer that this promotion code can be used by.

expires_at integer (unix-time)
optionalnullable

Date at which the promotion code can no longer be redeemed.

id string
required

Unique identifier for the object.

livemode boolean
required

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

max_redemptions integer
optionalnullable

Maximum number of times this promotion code can be redeemed.

metadata object
optionalnullable

Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

object string
required

String representing the object's type. Objects of the same type share the same value.

times_redeemed integer
required

Number of times this promotion code has been used.