#aravind_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/1222858332331577375
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
The likelihood is that the Payment Method object is missing some fields that Checkout needs to pre-fill the card:
In payment mode, Stripe prefills the Checkout page’s email address, name, card details, and billing address with the customer’s most recent card payment method. Customers can’t update their prefilled email address in the Checkout page.
In any case, you shouldn't be using Tokens and Payment Method APIs directly to save cards. You should be using a Setup Intent: https://docs.stripe.com/payments/save-and-reuse
Here I am Token Object is getting created and Based on these details I am creating a payment methods and attach to customer.
affte making it default
Yeah, as I said you shouldn't really be doing that as those APIs don't support 3DS/authentication flows to correctly setup the card for future usage
See the link I shared above for the correct way to be collecting and save card details
ok then If I want to create new card for existing customer and use that card in checkout. how can I achieve it
You'd follow the guide here to save the card: https://docs.stripe.com/payments/save-and-reuse
Checkout has a specific function to do that too if you prefer
That guide will take card of creating te Payment Method object for you, and then wne you use that same cus_xxx ID with Checkout in future it will prefill the card