#pawan_code
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/1296041696965955615
๐ 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.
- pawan_code, 1 hour ago, 41 messages
- pawan_docs, 1 day ago, 9 messages
๐ how may I help?
Hi Tarzan I Want to Know Couple of Things
I have an e-commerce site built with React,
and in the "My Account" section under the user's profile, I want to display the Stripe Payment Element form. The goal is to collect the user's card details and save them to their Stripe account for future use.
Note: I do not want the user to save their card information during checkout.
this way we could help you faster
Which Approach Is Fine
- Collecting the Payment Details and Crating the payment Method and Attaching to a customer is it the Correct Approach
I am Using Stripe Payment Element
you can use SetupIntents if you just want to save a PaymentMethod without charging
What about the Approach I told
what about this Approach Its Not Correct ?
that's the same approach that I suggested
Yes I Tried This But The Issue i am facing is Sometimes I am Not Getting Checkbox to Save The Card from stripe Payment Element
which is meant to be used to save for future usage
that's why you don't see the checkbox
are you creating a SetupIntent correctly?
yes then you're good to go
To Show The Checkbox We Need to create Customer Session Right
As shown in this Image i am creating customerSession & passing to Element option to get the checkbox if i am not creating then i am not getting
no
the Checkbox will only show if you're saving during payment
Okay if i am Not Showing the Checkbox then in payment method allow_redisplay in coming as unspecified ?
why so ?
because it's just how it works, the customer/you have to explicitly indicate that the card should be available for reuse
Hi karl
I am using Setup intent to save User card in MY Account Scection so that customer can reuse it later
As Shown in above Image
In payment Form You can Observe Save Checkbox is comming which is coming when i am cretaing customer session
if we are not showing then card is saving but allow_redisplay is unspecified because of that saved card is not showing
sounds right yes
So for That we need to create customer Session ?
But @lilac drum says no
I don't understand what your specific question is, sorry.
I have an e-commerce site built with React,
and in the "My Account" section under the user's profile, I want to display the Stripe Payment Element form. The goal is to collect the user's card details and save them to their Stripe account for future use.
Here Is The Steps what i am Using
After landing to Account - Payment Section : Creating the Customer Session [To Show the Checkbox to save the Card]
then Creating the SetupIntent
On Click of Save button Confirming the Intent [via clientSeceret]
UI of My Site below
Are you there @unkempt vapor
yes. You didn't ask a question though so I was waiting for that.
I don't know because I don't know what your problem is that you're trying to fix.
generally a question would be like "here is what I'm trying to do, here is what I did, here is what I expected to see, here's what I saw instead" and you've only really included the first part.
Please refer this karl
please elaborate on what you expect to see and what you see instead.
you never need to create a CustomerSession, it's an optional feature to add extra functionality like viewing existing saved cards.
If i am not Creating the Session then I am Not Getting the checkBox in Payment Element form.
So The Card is Getting saved but for that allowRedisplay is unspecified because of that i am Not able to see the card in Saved Card what to do to avoid this ?
sounds like the options are you could use a CustomerSession, or you could call https://docs.stripe.com/api/payment_methods/update#update_payment_method-allow_redisplay to update the PaymentMethod to allow redisplay, while you're handling the successful SetupIntent on the backend.
Little Confused karl can you eleborate ?
sure, what part are you confused about specifically
we already creating setupIntent using that automatically created payment method , then why to update the payment method for allow_redisplay why its not updating automatically
I guess it just doesn't, I don't know why it's designed that way. So if you want the PM to have allow_redisplay you can do the two options in my previous message.
The Two Options Are bellow correct.
- customerSession
2.updatePaymentMethod
any one of the above i can follow correct ?
yes
Thanks karl
I'm facing another issue: we've enabled Amazon Pay from the dashboard, and I want to display it in the checkout process. However, I need to hide Amazon Pay in the "My Account" profile section. Could you help with that as well?
How can we Do that ?
you could create a PaymentMethodConfiguration that doesn't inclide AmazonPay and use that with the SetupIntent you create, instead of the default.
I didn't tell you to use payment_method_types:["card"], I told you to use PaymentMethodConfigurations, which would not lead to this error. That's why I said it.
Sure, @unkempt vapor Iโm checking that method. Thanks for the help!
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!