Repository navigation
fix(payment): pin promo-code checkout presentment to USD so the $269 minimum passes (#23299) - #23557
Merged
Merged
Conversation
…icing off) Stripe evaluates a promotion code's minimum_amount restriction against the checkout session's presentment currency. With Adaptive Pricing enabled, the converted total (e.g. EUR) falls below the USD-authored $269 minimum on Unlimited yearly activation codes and a valid code is rejected (#23299).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_amountrestriction 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
backend/tests/unit/test_payment_promo_adaptive_pricing.py: promo sessions setadaptive_pricing={'enabled': False}; promo-free sessions keep Stripe's default; static contract scopes the pin to the promo branch.backend/tests/unit/test_payment_promotion_codes.pystays green — its no-coupon contract on checkout/upgrade is untouched.