#laurenhawkes_code

1 messages ยท Page 1 of 1 (latest)

old latchBOT
#

๐Ÿ‘‹ 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/1270327355872903180

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

scarlet stone
#

Just seen ibn #help that the prior dev question is exactly the same ๐Ÿ˜† be great to add example doc, happy to write one for you once I got it working.

golden sequoia
#

Hi, let me help you with this.

#

Have you tried building this already? Are you running into any issues?

scarlet stone
#

Yes I have got a customer with a paymentMethod with this flag filled in

#

Then using that customerId for a paymentIntent to load the Stripe elements block

#

But nothing appears

#

Docs suggest that perhaps It would show, but also seen on #1270315050829090941 query you suggested it wasn't possible?

#

Just wanted a clear answer so I don't time trying something to work that doesn't exist ๐Ÿ˜†

golden sequoia
#

Please talk in this thread.

scarlet stone
#

I'm here ๐Ÿ™

golden sequoia
#

Re-displaying PMs on Payment Element is a new functionality. Before you were able to just charge it off-session, without involving the Customer to the session.

#

Which way do you actually want to do this?

scarlet stone
#

On the PaymentElement

#

Actually both, but I'm comfortable doing off_session already and familiar with how that works.

#

Any other docus on how to implement the new functionality?

#

Not sure how I use that with a PaymentIntent?

golden sequoia
scarlet stone
#

Ok great

#

How do I use that with a payment intent?

golden sequoia
#

You create a PaymentIntent and then create a Customer Session for the same Customer. You can then send both client_secrets to the frontend to display the Payment Element.

scarlet stone
#

Ok, appreciate it. Just need work out where the session_id goes on the payment element and will report back ๐Ÿ™

golden sequoia
scarlet stone
#

Make sense, it doesn't take an array of them though? I assume elements needs to know about the PaymentIntent (to make the payment) and the Session to be aware of the saved payment methods?

#

I guess session into customerSessionClientSecret ?

#

and PI as was before?

solemn monolith
#

hi! I'm taking over this thread.

#

Make sense, it doesn't take an array of them though?
the customerSessionClientSecret is just as string, as mentioned in the doc

scarlet stone
#

Got you

#

Maybe I am missing something, but from a DX perspective it would be great to just have this as a flag on the PaymentIntent opposed to required 2 API calls.

solemn monolith
#

I'm not very familiar with this new feature, but there's probabbly a good reason why it's done this way.

scarlet stone
#

Fair ๐Ÿ™ Always love what you guys are doing.

#

If you leave this thread open I can post a screenshot of how it looks with saved cards, i don't think this is currently available via the docs.

solemn monolith
#

not sure I follow. you mean you would like the doc to include a screenshot?

scarlet stone
#

I can share one for others looking here.
But yes also a docs specific for this would be awesome, i'm almost certain it has been custom built over 100k times with a saved card drop down + add new with Stripe elements.
Certainly something to shout about on Twitter once a "guide" docs are up ๐Ÿ™

solemn monolith
#

makes sense! I'm sure there are plans for more docs about this new feature.

scarlet stone
solemn monolith
#

interesting. give me a few minutes to run some tests.

#

and based on this, looks like you have to use a CustomerSession, so the other doc might be missleading. I

scarlet stone
#

Ok great.

#

Giving me this parameter: customerSessionClientSecret is not a recognized parameter.

#

Might be a problem how I am calling it, 2s

solemn monolith
#

also make sure you are using the latest version of react-stripe-js

scarlet stone
#

Ye just updated.

#

Moment.

#

Excellent, thank you!

solemn monolith
#

haha, well done ๐Ÿ™‚

scarlet stone
#

Stripe has come along way since the old "drop in the stripe.js" attach to dom element days

#

Much appreciated ๐Ÿ™

solemn monolith
#

happy to help ๐Ÿ™‚