turbot/stripe

steampipe plugin install stripesteampipe plugin install stripe

Table: stripe_coupon

Coupons issued in the Stripe account.

Examples

List all coupons

select
*
from
stripe_coupon

Coupons that are currently valid

select
id,
name
from
stripe_coupon
where
valid

Coupons by popularity

select
id,
name,
times_redeemed
from
stripe_coupon
order by
times_redeemed desc

.inspect stripe_coupon

Coupons available for purchase or subscription.

NameTypeDescription
amount_offbigintAmount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
createdtimestamp without time zoneTime at which the coupon was created.
currencytextIf amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
deletedbooleanTrue if the customer is marked as deleted.
durationtextOne of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
duration_in_monthsbigintIf duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
idtextUnique identifier for the coupon.
livemodebooleanHas the value true if the coupon exists in live mode or the value false if the coupon exists in test mode.
max_redemptionsbigintMaximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
metadatajsonbSet of key-value pairs that you can attach to an coupon. This can be useful for storing additional information about the coupon in a structured format.
nametextThe coupon’s full name or business name.
percent_offdouble precisionPercent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $100 invoice $50 instead.
redeem_bytimestamp without time zoneDate after which the coupon can no longer be redeemed.
times_redeemedbigintNumber of times this coupon has been applied to a customer.
validbooleanTaking account of the above properties, whether this coupon can still be applied to a customer.