#geekcorner_best-practices
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/1281648233973678220
đ 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.
- geekcorner_best-practices, 1 day ago, 32 messages
- geekcorner_best-practices, 1 day ago, 6 messages
You would need to create your own custom form for accepting the billing info and then add that to the Payment Method object that's created by the Card Element
i already got the card fields like the CardNumber, Expiry and CVC
But i'd like to collect billing address
Yup! You would need to collect that via your own custom form then pass it to the Payment Method object: https://docs.stripe.com/api/payment_methods/update#update_payment_method-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.
pretty sure you can pass it to confirmPayment but I'm using setup intents
Yeah, that's another way to do it, but it doesn't work with the Card Element. It effectively does the same thing, but with less steps using the Payment Element (which is much better and not deprecated): https://docs.stripe.com/js/setup_intents/confirm_setup#confirm_setup_intent-options-confirmParams-payment_method_data-billing_details
You'd still have to have their address before the confirmation step though. This doesn't display anything in the UI for you. It just allows you to send info you already have along with the Payment Method while it gets confirmed.
I'm not using the cardElement anyways
So we got no way to have autocomplete unless i implement it myself, correct?
Correct. You would need to build that yourself if you don't want to use the Address Element
alright, thanks
Oh and last thing, is there a way to disable my button if the card number is invalid, if there are no cvc, or no expiry date?
Those are required fields, so they won't be able to submit the payment (as far as I know) if they're not filled in