I'm creating a pwa based on magento 2 rest api. I have installed stripe/stripe-payments official module to integrate stripe payments. Everything works fine without SCA payments.

i have tried to replicate the same flow of magento's frontend looking at the request done during the payments.

this is what i do:


POST /guest-carts/:cartId/payment-information
RESPONSE {"message":"Authentication Required: pi_**_secret_**"}
CALL stripe.handleCardAction("pi_**_secret_**");

with that the stripe's test modal appear.


REPOST /guest-carts/:cartId/payment-information with same data of 1. (magento frontend make the same request)
RESPONSE {"message":"The provided PaymentMethod is already attached to another object. You cannot reuse PaymentMethods without attaching them to a Customer object first."}

on stripe dashboard i can see that this flow create two payments but with magento's frontend only one.

what is missing?

Help please :)

  • I just updated the stripe module from 1.3 to 1.9, and now I'm having this same error. Our 3D secure checkout was working fine in our PWA previously, but this update caused it to break. I haven't been able to locate the issue yet. Subscribing in hopes someone will answer!
    – rain2o
    Jul 30 '20 at 10:06

There has been a change which broke 3D Secure with PWA / REST API in versions 1.8.8 - 1.9.1 of the Stripe module. Upgrading to 1.9.2 will fix that issue.

Then you can use the following code to place an order through the REST API:

  • i will try 1.9.2 but for now, we have patched the module. Aug 13 '20 at 14:24
  • 1
    @EttorePanini for what it's worth, I just tested with the latest version of the module, 2.0, and it has resolved this issue as well as some others. 3DS works for both logged-in users and guests through the API now.
    – rain2o
    Aug 24 '20 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.