#iltofa

1 messages · Page 1 of 1 (latest)

tawdry karmaBOT
bright galleon
#

Code is actually the sample code (beside the customer creation), but I can show it if it's useful

tribal knot
#

In particuler this code:

  // Confirm the Intent using the details collected by the Payment Element
  const {error} = await confirmIntent({
    elements,
    clientSecret,
    confirmParams: {
      return_url: 'https://example.com/order/123/complete',
    },
  });
bright galleon
#

Yes. the clientSecret is the pi_* and confirmIntent is stripe.ConfirmPayment()

tribal knot
#

And what about the Element

bright galleon
#

This is where the error is returned, actually

tribal knot
#

what PaymentMethod are you using ?

bright galleon
#

card. For some (now that I think about it could be related) reason, only card shows...

#

The "regular" flow shows other payment methods too. I suppesed it was related to being a subscription

tribal knot
#

Have you submited the element ?

await elements.submit();

bright galleon
#

Elements is

    mode: "subscription",
    amount: 7500,
    currency: "eur",
    appearance: {
      theme: "stripe",
    },
  };

  const elements = stripe.elements(options);
#

And, no... no elements.submit() call... is that in the sample code? (looking)

tribal knot
#

Yes you need to follow each part of that guide

bright galleon
#

Uh. Yes. Sorry... I'll fix that. Sorry...

tribal knot
#

No worries