Skip to content
Install on Stripe

Limits

Measured in a Stripe sandbox where it could be, taken from Stripe’s docs where it couldn’t; the source is on each row.

WhereWhat it meansSource
Classic and flexible billing modeDiscount scripts run on subscription invoices in both billing modes.F14
One-off invoicesThey run on invoices without a subscription too, for the types that count one-time items.F14
Invoice previewsStripe's invoice preview runs the script and matches the invoice Stripe then issues; Verify on Stripe shows it.F15
Promotion codes and subscription-mode CheckoutA promotion code can wrap a Discount Kit coupon, and Checkout in subscription mode applies the coupon or the code.F4
After classic couponsA classic coupon and a Discount Kit coupon stack in the order of the invoice's discounts; the later one sees what the earlier one left.F3
LimitWhat it meansSource
One Discount Kit discount per subscriptionStripe refuses a second discount-script coupon on the same subscription; classic coupons still stack.F3
QuotesA quote refuses a Discount Kit coupon.F4
Checkout in payment modeIt gives no discount and no error; Checkout in subscription mode applies it.F4
Adaptive Pricing in CheckoutIt can bill a customer in their own currency, and a discount with a currency (an amount off, spend tiers) gives nothing in another one. Turn Adaptive Pricing off for those, or use percentages.Engine
LimitWhat it meansSource
One amount per invoiceA discount script returns one amount for the whole invoice, not one per line.Docs
Rounded half-up, spread pro rataStripe rounds the amount half-up to a whole minor unit and spreads it over the lines in proportion to their amounts.F2
Whole yen in JPYAmounts in yen are whole yen, and spend thresholds are in yen.F9
Mid-cycle changesNew charges are discounted for their share of the period; credits for unused time keep the earlier invoice's rate.P2
DowngradesThey are priced the same way, so a downgrade invoice's discount total can be negative.P2
Fixed once createdA coupon's settings can't change. Revising creates a new coupon and archives the old one; subscriptions keep the one they have.F5
LimitWhat it meansSource
Other coupons on the invoiceA discount script can't see the other discounts on the invoice.Docs
Other invoicesA script has no storage and no history, so tiers and bundles count what is on one invoice.Docs
The billing cycle anchorStripe doesn't send it to discount scripts, so Lifecycle discount counts from a date in metadata.P1
A customer on anonymous previewsA preview without a customer carries none, so customer-metadata targeting shows only on a real customer's invoice.P3
Subscription metadata from CheckoutCheckout drops subscription_data.metadata unless your integration sets it, and Payment Links made in the Dashboard set none, so a Lifecycle discount's start date or a subscription segment needs it set.P9
LimitWhat it meansSource
A failing script gives nothingA script that throws or runs longer than 500 milliseconds gives no discount on that invoice, with no error on it, and Stripe doesn't retry it.Docs
Stripe emails youStripe emails your account about a failing script, at most once a day per extension, live mode and sandboxes counted apart.Docs

Zero discounts where you expected money off show in your invoices and on the app’s overview and detail pages.

Sandbox findings, 15 October 2026: measured through the Stripe API in a Stripe sandbox (app 0.0.5 with dk-tiered 0.0.4), raw calls recorded.

  • F2 · Rounding half-up, allocation pro rata by line amount
  • F3 · Classic and custom coupons stack in discounts[] order; a second custom coupon is refused
  • F4 · Promotion codes wrap custom coupons; subscription-mode Checkout applies them; payment mode gives nothing; quotes refuse them
  • F5 · A coupon's configuration is immutable
  • F9 · JPY amounts in whole yen; spend thresholds in yen
  • F14 · Scripts run in classic billing mode and on standalone invoices
  • F15 · create_preview runs the script and matches real invoices

End-to-end probes: run dk-e2e-20261015235736-hcpp in the same sandbox, recorded 15 October 2026 at 23:59 UTC, with its invoices.

  • P1 · anchor: the billing cycle anchor is not delivered
  • P2 · proration: credit lines keep the reversed rate; debit lines are scripted
  • P3 · anonymousCustomer: no customer on anonymous previews
  • P9 · checkoutMetadata: subscription_data.metadata dropped

The app's own engine, as its tests pin it.

  • Engine · The currency guard: a discount with a currency gives nothing on invoices in another currency

Stripe's documentation: the row links the page.