Skip to content

Apply discounts to existing subscriptions #8714

@pieterbeulque

Description

@pieterbeulque

When a "once" discount is applied to an existing active subscription mid-billing-cycle, the discount is immediately considered expired and will never be applied to any invoice.

# server/polar/models/discount.py:144-147

def is_repetition_expired(self, started_at, current_period_start, trial_ended=False):
    if self.duration == DiscountDuration.once:
        return not trial_ended

For repeating discounts, it's influenced by the subscription's start date too, so it also won't work as expected. Applying a 3 month 50% off discount in the fifth month of the subscription will just consider the discount expired.

You'd expect it to apply to the next invoice, which is useful for cases like customer support granting next month for free as compensation for an issue, or trying to prevent churn with next X charges 80% off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions