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.
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": { "property1": null, "property2": null }, "merchantId": "string", "livemode": true }, "promotionCodeId": "string", "promotionCodeCode": "string", "checkoutSessionId": "string", "customerId": "string", "start": "string", "end": "string"}Customer
A Customer represents a buyer you do business with. Use Customers to save payment methods for reuse, track lifetime spend, attach metadata for your CRM, and group related Charges, Refunds, and Checkout Sessions under a single record. You can identify a Customer by their email or by a stable external ID from your own system and reference them on any future payment.
Payment Intent
A PaymentIntent tracks the full lifecycle of collecting one payment from your customer: from creation, through authorization and 3-D Secure, to capture and final outcome. We recommend creating one PaymentIntent per order: you can inspect its history of Charge attempts, watch its `status` as it transitions, and reference the successful Charge it ultimately produces. PaymentIntents are the object that the hosted Checkout and xpay.js drive on the client to complete a payment.