Mayson Monorepo Documentation
    Preparing search index...

    A discount represents the actual application of a coupon or promotion code. It contains information about when the discount began, when it will end, and what it is applied to.

    Related guide: Applying discounts to subscriptions

    interface Discount {
        id: string;
        object: "discount";
        checkout_session: string;
        customer: string | Stripe.Customer | DeletedCustomer;
        customer_account: string;
        deleted?: void;
        end: number;
        invoice: string;
        invoice_item: string;
        promotion_code: string | Stripe.PromotionCode;
        source: Stripe.Discount.Source;
        start: number;
        subscription: string;
        subscription_item: string;
    }
    Index

    Properties

    id: string

    The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.

    object: "discount"

    String representing the object's type. Objects of the same type share the same value.

    checkout_session: string

    The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.

    customer: string | Stripe.Customer | DeletedCustomer

    The ID of the customer associated with this discount.

    customer_account: string

    The ID of the account representing the customer associated with this discount.

    deleted?: void

    Always true for a deleted object

    end: number

    If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.

    invoice: string

    The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.

    invoice_item: string

    The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.

    promotion_code: string | Stripe.PromotionCode

    The promotion code applied to create this discount.

    start: number

    Date that the coupon was applied.

    subscription: string

    The subscription that this coupon is applied to, if it is applied to a particular subscription.

    subscription_item: string

    The subscription item that this coupon is applied to, if it is applied to a particular subscription item.