#pauliita_api

1 messages ¡ Page 1 of 1 (latest)

slow geyserBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1413581130573156372

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

cobalt stratus
#

So in the previous conversation I was advised to set the payment method types manually on the stripe element in the client, then create the invoice with the same payment method types. I just want to validate my approach because I couldnt find much documentation about it online

vocal sluice
#

You can create a one-time Invoice, then pass its Payment Intent client secret to collect the payment method details from the Payment Element

#

Are you facing any problem with this?

cobalt stratus
#

So this approach is correct?

#

No

#

I wanted to validate the approach

#

because the other thread was closed

vocal sluice
#

When you pass the client secret to the client side, it should be set at Elements options, not at the confirmation request. It should work if you set the client secret at the correct place

cobalt stratus
#

I set it here

this.args.stripeInstance
.confirmPayment({
elements: this.args.stripeElements,
clientSecret: response.client_secret,
confirmParams: {
return_url: response.return_url,
payment_method_data: {
billing_details:
{
email: this.session.currentUser.email,
},
},
},
})

#

and it works

vocal sluice
#

Generally, we recommend to set the client secret at the Elements group if you're using Payment Element.

elements = stripe.elements({ appearance, clientSecret });

const paymentElement = elements.create("payment");

For confirmation request, clientSecret doesn't have to be set

cobalt stratus
#

but I dont have the payment intent client secret at the time of the creation of the element

#

Im using the element without intent approach

vocal sluice
#

Ah I see! Then the deferred intent flow like yours should work

cobalt stratus
#

great!! Thank you

#

And just another quik question.

I dont see apple pay and google pay as possible options for the payment_method_types

what should I do in that case?

vocal sluice
#

Apple Pay and Google Pay will only show after the domain is registered. Your website should be on HTTPS (not HTTP)

cobalt stratus
#

yess

#

Ah okey, so no need to specify them in payment_method_types

#

?

vocal sluice
#

Apple Pay and Google Pay are part of card payment method type

cobalt stratus
#

Excelent!! thank you so much