Update Stripe to version '2025-04-30.preview'#3
Open
voidzenn wants to merge 1 commit intobc-v1.128.0from
Open
Conversation
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.
PR: Stripe API upgrades and Level 2/3 handling (bc-v1.129.0)
Summary
This PR updates our Stripe gateways and documents the changes required to support updated Level 2/Level 3 (L2/L3) reporting.
What changed
Bumped the Stripe API version used by the legacy Stripe payments gateway from the old baseline (previously
2020-08-27/2022-11-15in parts) to the required preview version2025-04-30.preview. Stripe notified us that this upgrade is required to continue receiving correct L2/L3 rate handling.For
StripePaymentIntentsGatewaywe changed behavior around where L3 data is attached:add_level_twonow populatespayment_detailsandamount_details. Newer API behavior expects Level 3/line item fields to be included withinamount_detailsinstead of a top-levellevel3key.add_level_threeinstripe_payment_intents.rbwas commented out because the gateway places line items insideamount_details(viaadd_level_two) rather than sending a separatepost[:level3]hash.Files touched
lib/active_merchant/billing/gateways/stripe.rb— updated to accept and forward Level 3 keys (line items and transaction-level L3 fields).lib/active_merchant/billing/gateways/stripe_payment_intents.rb— clarified thatadd_level_threeis intentionally commented out becauseadd_level_twohandlesamount_details/L3 placement.References
Followed this Stripe docs for params structure line_items