#keith_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1268487985091837984
๐ 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.
- keith_webhooks, 5 hours ago, 10 messages
hi! geneally the recommended approach would be to prefill it on the frontend where you collect the paymnent details, for example https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-defaultValues-billingDetails when using the PaymentElement, not on the backend.
Does it allow me to prefill and not display the address?
no but if you want that there are ways
like set address collection to never https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-fields and pass your address directly to https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details when processing the payment
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Is there not a way to expand the payment intent through the JS API? I tried to do this a couple ways but neither worked.
unfortunately that's not possible
you need to send a request to your API and get that information with the secret_key
what is the expand on the confirmPayment used for?
but that doesn't provide all information
I was hoping to get the payment_method data
even if you expand there are information that you won't have access via publishable_key
in that case you can use confirmationTokens
I created the payment intent on the server before the page loads. I guess I'm not sure what the purpose is of the token compared to creating a payment intent and confirming payment
the confirmationToken holds the payment method data even before confirming the Payment
after that you can confirm the Payment directly using the confirmationToken
I'd rather not confirm the payment at all. I will probably just have to do the lookup on the server using the return_url because I need to save the payment before it moves to the next page. Thanks for your help.
exactly why you would need the confirmation token for