#Elios

1 messages ยท Page 1 of 1 (latest)

split citrusBOT
cloud sedge
#

Hi, what's your question? Can you elaborate a bit more?

white frigate
#

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

cloud sedge
#

Are you following a guide to do this?

white frigate
#

for example, what is cardElement, from where it comes?
stripe
.confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {
payment_method: {
card: cardElement,
billing_details: {
name: 'Jenny Rosen',
},
},

cloud sedge
#

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

Learn how to embed a custom Stripe payment form in your website or application. Build a checkout form with Elements to complete a payment using various payment methods.

white frigate
#

thank you!

split citrusBOT
white frigate
#

could you tell me what this error is pointing at? Missing required param: payment_method_data[card].

balmy briar
#

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?

white frigate
#

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

balmy briar
#

what is this in this case?
card: <Card/>

white frigate
#

I've tried many things

#

๐Ÿ‘Ž๐Ÿฟ

#

there should be an instance of the useCard hook?