woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
229 stars 200 forks source link

Split UPE - Add support for Subscription payments with eligible APMs #2872

Closed james-allan closed 6 months ago

james-allan commented 6 months ago

Describe the bug

The https://github.com/woocommerce/woocommerce-gateway-stripe/pull/2866 PR adds support for taking subscription payments using cards. As part of this issue, we'll look into adding support for the other APMs that support subscription payments.

[!important] As outlined in Stripe docs, these payment methods are only capable of recurring payments by creating a reusable SEPA debit token. This happens on Stripe's end when you attempt to create a reusable token. See the process_order_for_confirmed_intent() function for inspiration as to how this is handled.

These payment methods were previously supported using the the unified UPE element and so should continue to work as split payment methods with deferred intents.

Screenshot 2024-02-02 at 3 30 50 pm
SEPA, Bancontact, and iDEAL APMs available while purchasing a subscription

Testing instructions

  1. Checkout the add/deferred-intent branch.
  2. Enable UPE in the Stripe plugin advanced settings.
  3. Enter Stripe API credentials for an account that has these EU payment method enabled.
  4. Enable SEPA, Bancontact, and iDEAL from the payment methods list
  5. Enable the Woo Subscriptions plugin.
  6. Create at least 1 subscription product.
  7. Add the subscription product to the cart.
  8. On checkout confirm you can take payments with Bancontact, SEPA, and iDEAL and make sure automatic recurring payments work as expected. ie renewing the subscription raises a charge using the underlying SEPA debit token.
mattallan commented 6 months ago

Closed by #2883 🎉 Thanks James for all your work on this one!