Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Mayisha opened this issue Aug 29, 2024 · 4 comments
Assignees
Labels
priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@Mayisha
Copy link
Contributor

Mayisha commented Aug 29, 2024

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

  • Connect to an Indian Stripe account.
  • Set your store currency to INR.
  • Go to WooCommerce > Settings > Shipping and add 2 shipping methods having different amount (e,g free => 0 and flat rate => 20 INR)
  • Install the WooCommerce Subscription plugin and create a subscription product worth 1000 INR.
  • As a shopper add the subscription product to your cart.
  • Choose free shipping for initial shipment and flat rate for recurring shipment.
Screenshot 2024-08-29 at 11 14 53 PM
  • In the payment section use a card from Indian recurring payment(e.g 4000003560000123) and complete the checkout.
  • Wait for 2 minutes before renewal because it takes a couple of minutes on the Stripe end for the mandate to be active.
  • Now go to the edit subscription page. From the dropdown select Process renewal.
  • Notice that the renewal order fails.
  • Check the logs in your Stripe dashboard (https://dashboard.stripe.com/test/logs) or in your admin dashboard (WooCommerce > Status > Logs

Expected behavior

  • If needed a new mandate should be created.
  • The renewal should be successful.
@Mayisha Mayisha added type: bug The issue is a confirmed bug. priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. labels Aug 29, 2024
@annemirasol annemirasol self-assigned this Sep 17, 2024
@annemirasol
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

@annemirasol annemirasol removed their assignment Sep 19, 2024
@annemirasol annemirasol self-assigned this Dec 23, 2024
@annemirasol
Copy link
Contributor

Unable to repro this issue, possibly fixed by #3359. Closing this issue for now. Please re-open if issue persists.

In my testing, mandate amount correctly matches the recurring payment amount, i.e. 1000, and not the initial charges amount, i.e. 1200:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants