Skip to main content

Purchase-type filtering now enforced for app discounts

The appliesOnSubscription and appliesOnOneTimePurchase fields on app discounts are now enforced at checkout. Previously, these fields existed on DiscountCodeAppInput and DiscountAutomaticAppInput but had no effect. All app discounts applied to every line item regardless of purchase type.

What changed

If an app discount is configured with appliesOnSubscription: false, it will only apply to one-time purchase line items, and vice versa. This filtering happens at the platform level after your discount function runs, so function-targeted lines that don't match the purchase type configuration will be excluded.

As part of this change, we also backfilled all existing app discounts to appliesOnSubscription: true and appliesOnOneTimePurchase: true. This means existing discounts continue to apply to all line items, so there's no behavior change for current discounts.

What you need to do

No action is required. If you're building a full-page app discount experience, you can now use these fields to control which purchase types your discount applies to.

Related docs

For more details, see the API documentation for DiscountAutomaticAppInput.

Was this section helpful?