woocommerce / woocommerce-gateway-stripe

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

Subscription renewal fails when shipping charge of the recurring payment is different than the parent order. #3394

Open Mayisha opened 3 weeks ago

Mayisha commented 3 weeks ago

Describe the bug India issued cards need e-mandate setup for payment. Renewal fails when the shipping charge of the subscription order and the recurring order are different. Suppose the subscription price is 1000, the initial shipping charge is free and the recurring shipping charge is 20. Then it fails with the following error-

payment_intent_mandate_invalid This mandate can only be used for a payment of 12000. You attempted a payment of 10000.

To Reproduce

Screenshot 2024-08-29 at 11 14 53 PM

Expected behavior

annemirasol commented 2 days ago

Wait for 2 minutes before renewal because it takes a couple of minutes on the Stripe end for the mandate to be active.

@Mayisha Is there a way to know if the mandate is already active?

annemirasol commented 2 days ago

Wait for 2 minutes before renewal because it takes a couple of minutes on the Stripe end for the mandate to be active.

@Mayisha Is there a way to know if the mandate is already active?

Found a way using CLI: stripe mandates retrieve <mandate id>

annemirasol commented 2 days ago

I am unable to reproduce this: I always get the correct amount for the subscription renewal charge (e.g. 1200 with shipping, instead of 1000 free shipping).

I also tried to get charge mismatches using fixed/recurring coupons, but the renewal charge matches the mandate amount.