Skip to content

Conversation

@voidzenn
Copy link

@voidzenn voidzenn commented Oct 16, 2025

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-15 in parts) to the required preview version 2025-04-30.preview. Stripe notified us that this upgrade is required to continue receiving correct L2/L3 rate handling.

  • For StripePaymentIntentsGateway we changed behavior around where L3 data is attached:

    • add_level_two now populates payment_details and amount_details. Newer API behavior expects Level 3/line item fields to be included within amount_details instead of a top-level level3 key.
    • add_level_three in stripe_payment_intents.rb was commented out because the gateway places line items inside amount_details (via add_level_two) rather than sending a separate post[: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 that add_level_three is intentionally commented out because add_level_two handles amount_details/L3 placement.

References

Followed this Stripe docs for params structure line_items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants