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

invalid_request_error breaks subscription renewals using SEPA payment method #3776

Closed
haszari opened this issue Feb 10, 2022 · 25 comments
Closed
Assignees
Labels
category: core WC Payments core related issues, where it’s obvious. component: upe component: wc subscriptions integration Issues affecting subscriptions with WC Subscriptions plugin active. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.

Comments

@haszari
Copy link
Contributor

haszari commented Feb 10, 2022

Describe the bug

We've had a report from a merchant via customer support that subscriptions (recurring) payments are failing with SEPA payment method. Thanks @jrodger @felipelousantos cc @madisoncmiller

Store is using WooCommerce Subscriptions extension with WCPay.

Here's an example request (details removed) and error message:

**Request** 400 ERR | POST | /v1/payment_intents
**Request body** 
{
  "amount": "xxxx",
  "currency": "eur",
  "confirm": "true",
  "payment_method": "pm_1234",
  "customer": "cus_2345",
  "capture_method": "automatic",
  "metadata": {
    "customer_name": "Xx Yyyy",
    "customer_email": "[email protected]",
    "site_url": "https://____.com",
    "order_id": "1234",
    "order_key": "wc_order_4567",
    "payment_type": "recurring"
  },
  "description": "------",
  "payment_method_types": {
    "0": "card"
  },
  "off_session": "true",
  "expand": {
    "0": "charges.data.balance_transaction"
  },
  "application_fee_amount": "123"
}

**Error response** invalid_request_error
The PaymentMethod provided (sepa_debit) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card. Alternatively, update the allowed payment_method_types for this PaymentIntent to include "sepa_debit".

Linking in some Stripe docs relating to SEPA:

Internal reference: p1643974407798379-slack-C02BW3Z8SHK p1643785082212209-slack-C7U3Y3VMY

To Reproduce

I don't have reproduce details and haven't tried reproducing as I'm unfamiliar with SEPA and don't know how to test it locally.

Next step would be for someone familiar with SEPA to reproduce this issue to find out if it's unique to this store or more common.

I imagine the steps are something like:

  1. Enable and onboard to WCPay.
  2. Activate WooCommerce Subscriptions and create a subscription product.
  3. Activate / enable SEPA (via UPE?).
  4. Purchase a subscription as a customer.
  5. Wait for renewal or trigger early renewal.
  6. Renewal fails with error.
@haszari haszari added type: bug The issue is a confirmed bug. component: upe labels Feb 10, 2022
@haszari
Copy link
Contributor Author

haszari commented Feb 10, 2022

@shendy-a8c (current Helix porter) Can you investigate and see if you can reproduce this?

@haszari
Copy link
Contributor Author

haszari commented Feb 10, 2022

See also possibly related question about iDEAL + WooCommerce Subscriptions: #3546

@pauljacobson
Copy link

We have similar reports in 4740622-zen and in 4765714-zen. This may also be related to #3233

@jessy-p jessy-p added category: core WC Payments core related issues, where it’s obvious. needs prioritisation Triage finished and issues are ready for the following processing. labels Feb 23, 2022
@sverleis
Copy link

Same issue with 5358797-zen.

@haszari haszari added the component: wc subscriptions integration Issues affecting subscriptions with WC Subscriptions plugin active. label Jul 24, 2022
@haszari haszari added priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. and removed needs prioritisation Triage finished and issues are ready for the following processing. labels Jul 25, 2022
@haszari
Copy link
Contributor Author

haszari commented Jul 25, 2022

Tagging has high priority based on merchant insight from @Luminus in #3546 .

@shrutimoorthy
Copy link

Similar report in 6065983-zen

@Brianmitchtay
Copy link

Seeing another case of this in 6170094-zen

@Brianmitchtay
Copy link

I've taken some time looking into this and will give the caveat that I'm not a dev so not certain that I'm onto the right thread here, but given the lack of action on this wanted to try and move it forward.

User in 6170094-zen says that all SEPA renewal payments are failing, but that initial payments via SEPA are successful.

Looking over their account I see that the customer is properly created and that the SEPA payment method is correctly set up for re-use.

However, when the request for the renewal payment is being made, it seems that the only payment_method_types included in the request must be Card given the error message

The PaymentMethod provided (sepa_debit) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card

Looking over the request itself I actually don't see payment_method_types included in it at all, but I'm not sure if I'm just misunderstanding something here. However, other payment intents from this merchant's site begin with the array of enabled payment methods.

{
  "payment_method_types": {
    "0": "card",
    "1": "sepa_debit"
  },

This isn't included in the failing request at all from what I can tell.

In setting up a testing site to reproduce this I came up against the fact that because we've closed the beta for SEPA payments, my testing account didn't get SEPA as a payment option..

kmIJFN.png

I'm not certain, but wondering whether when the SEPA beta was closed, that change has somehow prevented the gateway from passing a check and returning as active, so it's not being included as an available payment method type in these recurring payment attempts?

Let me know if there's a way I can enable the SEPA method for my testing site, or how else I can move this forward.

@WEBLAZER
Copy link

WEBLAZER commented Apr 5, 2023

Hi there, I have a client with the same issu. If needed, he is ok to give an access to his website to someone at Automattic
if it can help to solve this issu. Let me know.

@csmcneill
Copy link
Contributor

I have a client with the same issu. If needed, he is ok to give an access to his website to someone at Automattic
if it can help to solve this issu.

It is unlikely that this issue can be resolved by accessing the site. I would recommend subscribing to this issue so that you can stay up-to-date with any progress made.

@csmcneill
Copy link
Contributor

csmcneill commented Apr 9, 2023

6091810-zen shared:

My customer want to pay with SEPA. Usually, they do not have to refill their data, it is already stored.

Of course I could ask them to switch to creditcard. But to be honest, my customer mostly do not have this and it is a very delicate issue for them. That´s why they´ve chosen SEPA.

And the subscriptions work with credit card as I can see at the other accounts. Right now 16 accounts are affected by this SEPA-problem.

@jtobiesen
Copy link

jtobiesen commented Apr 12, 2023

Another example here: 6179674-zen

@marissaexplores
Copy link

6196861-zen

@Mailyss2
Copy link

I have the same problem, when the request for the renewal payment is being made, it seems that the only payment_method_types included in the request must be Card

The PaymentMethod provided (sepa_debit) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card

However, the SEPA method is the main payment method used since the launch of our e-commerce site. Our customers can enter their bank details without worries, but nothing during the renewal payment... The SEPA does not work. The bug would come from PaymentIntent.

Do you know if there is any news on the progress of the treatment of the issue ?

@namiokuzono
Copy link

Reported via 6210245-zen — I've also tested this flow on my staging site, and I am able to reproduce this.

Steps are as follows:

  • Enable WC PAY
  • Activate WooCommerce Subscriptions and create a subscription product.
  • Activate/enable SEPA
  • Purchase a subscription as a customer.
  • Run Scheduled action job by looking up sub #
  • Renewal order fails with the error message: A payment of €100.00 failed to complete with the following message: Error: The PaymentMethod provided (sepa_debit) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card. Alternatively, update the allowed payment_method_types for this PaymentIntent to include "sepa_debit".

Here is the Log https://shrtm.nu/b1Z

@kalessil
Copy link
Contributor

kalessil commented Apr 18, 2023

To keep things linked, supporting saved payment methods by SEPA was introduced in #1471, but as more foundational work is required for SEPA we'll make SEPA unavailable for subscriptions as per pchH0V-18S-p2#comment-1311

@grig-23
Copy link

grig-23 commented Apr 22, 2023

6225648-zen

@igorhereira
Copy link

6226311-zen

@solstudioim
Copy link

solstudioim commented Apr 28, 2023

Another merchant experiences that same problem: 6242925-zd-woothemes

Was able to replicate too using Nami's steps

@csmcneill
Copy link
Contributor

Likely 6268978-zen

@kgeorgee
Copy link

kgeorgee commented May 8, 2023

6263861-zen

@kaushikasomaiya
Copy link

6282520-zen

@kalessil
Copy link
Contributor

#6965

@frosso
Copy link
Contributor

frosso commented Aug 30, 2023

SEPA support for subscription payments will come to a later date, the solution will be revisited once SEPA becomes widely available.

It can take up to 14 business days to receive notification on the success or failure of a payment with SEPA. Woo Subscriptions' renewal process is designed with the assumption that payment notification is near immediate (or at least within 24 hours).

Additional context: paJDYF-9Ud-p2#comment-20540

@kalessil kalessil removed their assignment Jan 18, 2024
@pierorocca pierorocca added priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability and removed priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Jan 18, 2024
@frosso frosso self-assigned this Feb 6, 2024
@frosso
Copy link
Contributor

frosso commented Feb 6, 2024

@FangedParakeet I can confirm that SEPA is disabled for subscription products ( also code ref:

)
Screenshot 2024-02-06 at 4 14 46 PM

Manual renewal with card payments works as expected.

Changing the is_reusable flag to false does make SEPA appear at checkout when a subscription product is present.
Screenshot 2024-02-06 at 4 37 22 PM
However, besides toggling the flag's value, it seems that additional work is needed to ensure that SEPA subscriptions are currently processed.
Subscriptions will remain "on hold", despite the related Stripe charge succeeding.
WooPayments Server & WooPayments client logs didn't reveal anything useful.

Since it seems that the original issue isn't reproducible anymore, I think we can close the ticket and open a different one once we decide to move forward with SEPA support for subscription products.

@frosso frosso closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core WC Payments core related issues, where it’s obvious. component: upe component: wc subscriptions integration Issues affecting subscriptions with WC Subscriptions plugin active. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.