Issue with SEPA Tokens in WooCommerce Stripe Payment Gateway Version 8.5.2
-
Hello WooCommerce Community,
I am encountering an issue with the WooCommerce Stripe Payment Gateway plugin, specifically in version 8.5.2. The problem arises with SEPA tokens that are attached to the customer before sending the API request to Stripe, resulting in an accession error. Here are the details:
Issue Description:
- Plugin Version: 8.5.2
- Problem: SEPA tokens attached to the customer are causing an accession error when the API request is sent to Stripe.
- Error Details: The PaymentIntent was confirmed with the
off_session
option, but the attached Source is not chargeable.
Stripe’s Feedback:
After discussing with Stripe support, it was found that the issue is related to charging a reusable source without first attaching it. The source is consumed (its status changes from chargeable to consumed), and consumed sources cannot be used for further payments. Stripe has recommended checking the source before making the request.
Here is the relevant information from Stripe support:
As discussed, you are using WooCommerce integration to create charges for you. When we checked, it appeared that they were charging a reusable source without first attaching it. As it appears to be the case, the source is consumed (its status changes from chargeable to consumed). As I have mentioned, consumed sources cannot be used for further payments. They can refer to the link below for more detailed information:
Reusable Sources – Stripe Documentation
Also, we noticed on the logs below that they are attaching the “consumed” source in the request.
Additionally, they pointed out that we are using a deprecated version of the Sources API and suggested migrating to the Payment Methods API. For more details, refer to the link below:
Example Error Log:
POST /v1/payment_intents Status 400 ERR ID req_hgGAbPoFB3sxe0 Time 07-08-24 00:47:20 IP Address
redacted for privacy
API Version 2024-06-20 Application WooCommerce Inc. Source WooCommerce Stripe Gateway/8.5.2 (https://woocommerce.com/products/stripe/) Idempotency Key:
redacted for privacy
invalid_request_error The PaymentIntent was confirmed with the off_session option, but the attached Source is not chargeable. { "amount": "redacted for privacy
", "capture_method": "automatic", "confirm": "true", "confirmation_method": "automatic", "currency": "eur", "customer": "redacted for privacy
", "description": "shop Orderredacted for privacy
", "metadata": { "customer_email": "redacted for privacy", "customer_name": "redacted for privacy", "order_id": "redacted for privacy
", "payment_type": "recurring", "site_url": "https://redacted for privacy
" }, "off_session": "true", "payment_method_options": { "card": { "mandate_options": { "amount": "redacted for privacy
", "amount_type": "redacted for privacy
", "interval": "redacted for privacy
", "interval_count": "1", "reference": "redacted for privacy
", "start_date": "redacted for privacy
", "supported_types": { "0": "india" } } } }, "payment_method_types": { "0": "sepa_debit" }, "source": "src_partly redacted for privacy I35" } Response: { "error": { "message": "The PaymentIntent was confirmed with theoff_session
option, but the attached Source is not chargeable.", "request_log_url": "redacted for privacy", "type": "invalid_request_error" } }Steps to Reproduce:
- Attach a SEPA token to a customer.
- Attempt to create a PaymentIntent with the
off_session
option enabled. - Observe the error.
Request for Assistance:
Could anyone please provide guidance on how to properly attach and use SEPA tokens with the WooCommerce Stripe Payment Gateway plugin? Any insights on migrating to the Payment Methods API would also be highly appreciated.
Thank you in advance for your help!
Best regards,
Shaady
- You must be logged in to reply to this topic.