#Elios
1 messages ยท Page 1 of 1 (latest)
Hi, what's your question? Can you elaborate a bit more?
I'm trying to confirm a payment, but first I need to create a payment method. This's the first time I'm trying to do this. I've been trying to create a payment method, changed 100 times the parameters inside, but I wasn't able to make it work
Are you following a guide to do this?
for example, what is cardElement, from where it comes?
stripe
.confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {
payment_method: {
card: cardElement,
billing_details: {
name: 'Jenny Rosen',
},
},
That's a specific method in our client-side library. I would recommend following an actual guide that tells you how to do this.
Here's a good one: https://stripe.com/docs/payments/quickstart
thank you!
could you tell me what this error is pointing at? Missing required param: payment_method_data[card].
Stepping in for my teammate, sorry for the delay!
I suspect you're not including your card element when calling confirmCardPayment? Can you share more information about what exactly is returning this error?
const stripe = await stripePromise
const {paymentIntent, error} = await stripe.confirmCardPayment(clientSecret, {
payment_method: {
card: <Card/>,
billing_details: {
name: 'Elias Monzon',
},
}
})
if (error) {
console.log(error.message);
} else if (paymentIntent && paymentIntent.status === 'succeeded') {
console.log('Payment succeeded!');
}
I'm trying to confirm a cart payment, I don't know if I am doing it right
what is this in this case?
card: <Card/>