docs

Discount

A Discount records a single application of a Coupon to a specific Checkout Session, PaymentIntent, or Customer. Where a Coupon is the reusable template, a Discount captures the concrete redemption: which Coupon was applied, when it became active, when it expires, and (when applicable) which Promotion Code the customer entered to claim it.

{
  "id": "string",
  "object": "discount",
  "coupon": {
    "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
  },
  "promotionCodeId": "string",
  "promotionCodeCode": "string",
  "checkoutSessionId": "string",
  "customerId": "string",
  "start": "string",
  "end": "string"
}