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
}Product
A Product represents a good or service you sell. Products carry only descriptive information (name, description, images), while their pricing is described separately by Price objects. A single Product can have many Prices: for example, the same digital course offered in EGP and USD, or at different tiers. Use Products to model your catalog and Prices to model how each is sold.
Refund
A Refund returns funds from a successful Charge back to the customer's original payment method. Refunds can be full or partial, and a single Charge can be refunded multiple times up to its original amount. The Refund's `status` reflects the processor's progress as the money makes its way back: `pending` while in flight, `succeeded` once the funds have been returned, or `failed` if the processor rejected the request.