curl --request GET \
--url https://api.withflex.com/v1/coupons/{id} \
--header 'Authorization: Bearer <token>'{
"coupon": {
"coupon_id": "fcoup_1234567890",
"duration": "<unknown>",
"name": "<string>",
"valid": true,
"created_at": "<string>",
"test_mode": true,
"amount_off": 123,
"applies_to": {
"products": [
"<string>"
]
},
"duration_in_months": 123,
"metadata": {},
"percent_off": 123,
"max_redemptions": 123,
"times_redeemed": 123
}
}Get a coupon by id
curl --request GET \
--url https://api.withflex.com/v1/coupons/{id} \
--header 'Authorization: Bearer <token>'{
"coupon": {
"coupon_id": "fcoup_1234567890",
"duration": "<unknown>",
"name": "<string>",
"valid": true,
"created_at": "<string>",
"test_mode": true,
"amount_off": 123,
"applies_to": {
"products": [
"<string>"
]
},
"duration_in_months": 123,
"metadata": {},
"percent_off": 123,
"max_redemptions": 123,
"times_redeemed": 123
}
}Use a Bearer token to access this API.
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 subscriptions and checkout sessions.
Show child attributes
Unique identifier for the object.
"fcoup_1234567890"
Name of the coupon displayed to customers.
Taking account of the above properties, whether this coupon can still be applied to a customer.
Date were this coupon was created.
Whether the coupon is in test mode
Amount that will be taken off the subtotal of any invoices for this customer.
If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
Number of times this coupon has been applied to a customer.