docs

Coupon

A Coupon defines a reusable discount you can apply to Checkout Sessions and PaymentIntents. Coupons can grant either a percentage off (`percentOff`) or a fixed amount off (`amountOff`), and can apply once, forever, or repeating for a number of billing cycles. You can also cap how many times a Coupon may be redeemed and when it expires. Coupons are the reusable template. Each concrete application of a Coupon to a customer's purchase is recorded as a Discount. To give customers a redeemable code (e.g. `SUMMER25`) instead of applying the Coupon directly, create one or more Promotion Codes that map to this Coupon — a single Coupon can have many Promotion Codes, each with its own per-code restrictions. You receive `coupon.*` and `promotion_code.*` webhook events for each as they are created or changed.

A Coupon defines a reusable discount you can apply to Checkout Sessions and PaymentIntents. Coupons can grant either a percentage off (percentOff) or a fixed amount off (amountOff), and can apply once, forever, or repeating for a number of billing cycles. You can also cap how many times a Coupon may be redeemed and when it expires.

Coupons are the reusable template. Each concrete application of a Coupon to a customer's purchase is recorded as a Discount. To give customers a redeemable code (e.g. SUMMER25) instead of applying the Coupon directly, create one or more Promotion Codes that map to this Coupon — a single Coupon can have many Promotion Codes, each with its own per-code restrictions. You receive coupon.* and promotion_code.* webhook events for each as they are created or changed.

{
  "id": "string",
  "object": "coupon",
  "createdAt": "string",
  "discountType": "percentage",
  "percentOff": 0,
  "amountOff": 0,
  "currency": "EGP",
  "duration": "once",
  "durationInMonths": 0,
  "name": "string",
  "maxDiscountAmount": 0,
  "minValue": 0,
  "maxRedemptions": 0,
  "customerMaxRedemptions": 0,
  "timesRedeemed": 0,
  "redeemBy": "string",
  "valid": true,
  "active": true,
  "appliesToProductIds": [
    "string"
  ],
  "metadata": {},
  "merchantId": "string",
  "livemode": true
}