docs

Promotion Code

A Promotion Code is a customer-facing alphanumeric code (for example `SUMMER25`) that maps to a single Coupon. One Coupon can have many Promotion Codes, letting you run different campaigns (email vs. social, customer-specific codes, regional codes, …) against the same underlying discount. Customers enter the code at checkout to redeem the Coupon's discount. Promotion Codes can carry their own restrictions on top of the Coupon — a per-code redemption cap, an expiry date, or a binding to a specific Customer. You receive `promotion_code.created` and `promotion_code.updated` webhook events whenever a code is created or modified.

A Promotion Code is a customer-facing alphanumeric code (for example SUMMER25) that maps to a single Coupon. One Coupon can have many Promotion Codes, letting you run different campaigns (email vs. social, customer-specific codes, regional codes, …) against the same underlying discount. Customers enter the code at checkout to redeem the Coupon's discount. Promotion Codes can carry their own restrictions on top of the Coupon — a per-code redemption cap, an expiry date, or a binding to a specific Customer. You receive promotion_code.created and promotion_code.updated webhook events whenever a code is created or modified.

{
  "id": "promo_abc123",
  "object": "promotion_code",
  "createdAt": "string",
  "code": "SUMMER25",
  "active": true,
  "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
  },
  "customerId": "cus_abc123",
  "maxRedemptions": 100,
  "timesRedeemed": 0,
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "restrictions": {},
  "metadata": {},
  "merchantId": "string",
  "livemode": true
}