fix(payment): pin promo-code checkout presentment to USD so the $269 minimum passes (#23299)

Merged
GI
2d ago
+78-0

Summary

Disable Stripe Adaptive Pricing on checkout sessions created with a resolved promotion code, pinning presentment to the price's native USD currency.

Stripe evaluates a promotion code's minimum_amount restriction against the checkout session's presentment currency. With Adaptive Pricing enabled, a EUR customer's converted total (e.g. €249 for the $269 Unlimited yearly price) falls below the USD-authored $269 minimum on the Unlimited yearly activation codes, and redemption fails with "code is valid but order total is below the minimum amount" even though the code is valid. With presentment pinned to USD, the minimum passes and the 100%-off first-year coupon applies for any customer.

Scope note: minimal durable fix by design. It does not add a coupon fallback — the upgrade path is repo-contracted to apply promotion codes, never raw coupons, to preserve Stripe-side restrictions and redemption tracking — and it does not change trial handling (#23300 tracks that separately).

Fixes #23299

Failure-Class

Failure-Class: none

Testing

  • New backend/tests/unit/test_payment_promo_adaptive_pricing.py: promo sessions set adaptive_pricing={'enabled': False}; promo-free sessions keep Stripe's default; static contract scopes the pin to the promo branch.
  • Existing backend/tests/unit/test_payment_promotion_codes.py stays green — its no-coupon contract on checkout/upgrade is untouched.
  • Both suites run locally green on this head via the worktree venv; backend CI re-runs them on this PR.