• Resolved bartomatto

    (@bartomatto)


    Hi,

    I used Woocommerce stripe gateway for a while, but now I am experiencing a problem that prevents customers from paying. I allow customers to make a deposit and a second payment of the rest for each order, and the second payment systematically fails and gives this error:”Sorry, we are unable to process your payment at this time. Please retry later.”

    This is the error that I receive in the response body from Stripe:

    “error”: {
    “code”: “payment_intent_unexpected_state”,
    “doc_url”: “https://stripe.com/docs/error-codes/payment-intent-unexpected-state”,
    “message”: “This PaymentIntent’s source could not be updated because it has a status of succeeded. You may only update the source of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.”,
    “payment_intent”: {
    ………information related to the 1st payment, removed for privacy…..
    },
    “type”: “invalid_request_error”
    }

    I investigated and noted that now the Stripe gateway sends a different request POST body, compared to the one that used to work a few months ago. This is the request that it sends now and that gives back the error:

    {
    “source”: “xxxxxxxxxxxxxxxx”,
    “amount”: “xxxxx”
    }

    Note that the amount is the correct amount required by the second payment but Stripe interprets the request as trying to change the original 1st payment and gives back the error.

    This is instead a request POST body of a successful second payment done a few months ago:

    {
    “statement_descriptor”: “UCPA Vacanze”,
    “amount”: “xxxxx”,
    “expand”: [
    “balance_transaction”
    ],
    “metadata”: {
    “customer_email”: “xxxxxxxxxx”,
    “customer_name”: “xxxxxx xxxxxxx”,
    “order_id”: “xxxx”
    },
    “description”: “UCPA Vacanze – Order xxxx”,
    “capture”: “true”,
    “currency”: “eur”,
    “source”: “xxxxxxxxxxxxxxxxxx”
    }

    Can you dig into this? It’s causing major issues to my store ??

    I already spoke with Stripe technical team and it looks like the error is connected with the request POST being wrong, related either with Woocommerce Stripe Gateway or Woocommerce. Hope you can help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @bartomatto,

    I think part of the issue could be how you’re setup to take deposits and their additional payments.

    I allow customers to make a deposit and a second payment of the rest for each order, and the second payment systematically fails and gives this error:”Sorry, we are unable to process your payment at this time. Please retry later.”

    Could you explain how the above works, is it handled via a WooCommerce extension or in some other way? For example, I know via our Deposits extension on WooCommerce.com it creates a new order to collect the remaining amount. If you are working from the same order and trying to collect multiple payments on that one order this might cause issues.

    Thread Starter bartomatto

    (@bartomatto)

    Hi @ryanr14

    Thanks for your reply. I use another extension that allows me to collect 2 payments for the same order (I tried Woocommerce deposit extension in the past, but the creation of 2 different orders doesn’t work for my store set up).

    As I explained in my previous email, it looks like with the plugin update multiple payments per order are not supported anymore. Is this feature going to be reintroduced?

    Also, today I was doing some further checks and I can see that customers are not automatically created in Stripe after a successfull payment. This used to be done automatically and I could just send invoices to existing customers directly from the stripe dashboard. Now I have to manually set up a new customer, even if the customer already paid on my site, since its information are not synched with Stripe. Is this also due to the plugin update?

    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @bartomatto,

    Thanks for the further explanation here.

    As I explained in my previous email, it looks like with the plugin update multiple payments per order are not supported anymore. Is this feature going to be reintroduced?

    I would doubt at the moment the ability to collect multiple payments for one order will be re-introduced. You could always suggest that via our ideas board though. –> https://ideas.woocommerce.com/forums/133476-woocommerce

    Also, today I was doing some further checks and I can see that customers are not automatically created in Stripe after a successfull payment.

    I just tested this on my test site while logged out using a fake name and email address and did see that the customer was created in my Stripe.com account still. If this isn’t happening for you, then perhaps there is something else on the site blocking this or causing issues.

    Again this was a guest checkout, did not create an account on my test site, but the customer was still created in Stripe.com

    Thread Starter bartomatto

    (@bartomatto)

    Hi @ryanr14 ,

    So I realised that the issue with the customer data not imported in the Stripe dashboard was only present in the plug in version 4.2, it’s been solved in 4.3.

    For the payment issue, I found a work around that works for me. I started to send the second payment as invoice directly from Stripe.

    Thanks for your help anyway.

    Mattia

    subair.tc

    (@subairtc)

    Is this issue fixed in the plugin ?

    • This reply was modified 5 years ago by subair.tc.
    Thread Starter bartomatto

    (@bartomatto)

    The creation of the customer in Stripe yes. I don’t know about the other issue. I have started using a different solution to collect the second payment.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Invalid request error’ is closed to new replies.