#tarantino-47_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/1230117510041436250
đ 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.
- tarantino_payment-flow, 1 day ago, 47 messages
- tarantino-47_api, 1 day ago, 6 messages
Hello! Billing details will be set on the generated Payment Method (pm_xxx) not the intent directly: https://docs.stripe.com/api/payment_methods/object#payment_method_object-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can I retrieve it from the client?
Not directly no
can I use PaymentElement and setup intent in order to create payment method? and then retrieve billing address from it and change this payment method immediately or later if needed?
https://docs.stripe.com/js/payment_methods/create_payment_method_elements
Yes, Setup Intents are the recommended way to create Payment Methods
What do you mean by 'change this payment method'?
sorry, I meant charge
Oh, yes. That is supported, see: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method
I can use this approach even if I need to charge user immediately, right?
If you want to charge the customer now and save the card, this is the better guide: https://docs.stripe.com/payments/save-during-payment
but in this case I won't be able to retrieve billing address on the client?
No, you'd need to make a backend call to do that in any case
but if I use this
https://docs.stripe.com/js/payment_methods/create_payment_method_elements
billing address will be available in the .then(function(result) on the client
stripe .createPaymentMethod({ elements, params: { billing_details: { name: 'Jenny Rosen', }, }, }) .then(function(result) { // Handle result.error or result.paymentMethod });
Yeah, but in most integrations that function is redundant. If you really need the billing details client-side when use a Confirmation Token instead: https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This fucntion has replaced createPaymentMethod: https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token
hm
ok, I'll look into it thanks
this is the docs for FE integration, correct?
https://docs.stripe.com/payments/build-a-two-step-confirmation
hi! I'm taking over this thread.
it depends which doc you are referring to (I see many links in that thread)
hello
so in the latest message from @rich hearth he told me about Confirmation Token.
I'm assuming this is the docs for the approach he suggested
https://docs.stripe.com/payments/build-a-two-step-confirmation