#iltofa
1 messages · Page 1 of 1 (latest)
Code is actually the sample code (beside the customer creation), but I can show it if it's useful
Hi
Are you confirming the payment intent following this:
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription#confirm-the-subscription
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',
},
});
Yes. the clientSecret is the pi_* and confirmIntent is stripe.ConfirmPayment()
And what about the Element
This is where the error is returned, actually
what PaymentMethod are you using ?
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
Have you submited the element ?
await elements.submit();
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)
Uh. Yes. Sorry... I'll fix that. Sorry...
No worries