stripe-js: [BUG]: .confirmSetup promise doesn't resolve

What happened?

I’m trying to handle errors for .confirmSetup call.

const { setupIntent, error } = await this.stripe.confirmSetup({
  elements: this.stripeElements,
  redirect: 'if_required',
  confirmParams: {
    return_url: window.location.hash,
  },
});

debugger;

if (error) {
  this.handleError(error);
...

When I use 4000 0000 0000 0002 card it properly triggers card_error with generic_decline and the piece above stops on debugger line (and I can handle the error).

But as soon as I try to use Apple Pay and select the card from Wallet, which I know will trigger the same error (card_error + generic_decline) - nothing happens. I never get to debugger statement, I don’t have any response, nothing happens at all.

One thing to note thought - I can see failed request to /v1/token with 402 status code and response body having proper error information, but it never gets returned from .confirmSetup.

P.S. I’ve tried both Discord and Support chat. In Discord I was told that yes, it looks like a bug and I can follow up in Support chat to get status update for this issue. Past 5 days - Support chat doesn’t know about it and thinks I’m requesting a new feature.

Environment

Safari Version 15.6.1 (17613.3.9.1.16) on macOS Monterey 12.5.1 (21G83)

Reproduction

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Hi all - we’ve just deployed a fix for this. Apologies for the delay, and feel free to open this issue back up if you still see the problem persisting!

@oaleynik This issue is being worked on right now. We don’t have an ETA, but we will post back here when the fix is deployed.

@jackieosborn-stripe thank you, Jackie!

Same issue here with Apple Pay and Stripe Element. Also difficult to identify a pattern between devices and OS. We see it happening on Mac and iPhones

@oaleynik Thank you for flagging this. We are actively investigating this issue and will report back with results.