#benbarnett02_best-practices

1 messages ยท Page 1 of 1 (latest)

broken barnBOT
#

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

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

modest tartan
#

Hi, let me help you with this.

#

What do you mean by "tokenize" in this context?

#

You can save a PaymentMethod with SetupIntents, but it can only be used within Stripe.

#

And it needs to be attached to a Customer object to be used. Why you don't want to attach it to a Customer exactly?

sick marsh
#

Sorry Vanya - to clarify, yes I mean saving a payment method.
https://docs.stripe.com/api/tokens

The Payment method needs to not be attached to a customer because the third party platform creates a new customer, then attaches the payment method to that customer before charging.

#

All the documentation I've seen for SetupIntents seems to require a customer either being made or already existing/ID being supplied

modest tartan
#

No, you can create a SetupIntent without a Customer and collect a PaymentMethod.

sick marsh
#

Okay great. Thank you. Can that be done with Checkout or Elements or do I need to use a custom process for that?

#

Oh! The payment element only collects the payment method details and not the customer details. I think I've answered my own question - I was mostly just a little bit confused about how Elements works without a customer.

modest tartan
#

Both Stripe Checkout and Elements work without a Customer.

#

Since billing details are saved on the PaymentMethod object, not the Customer object.

sick marsh
#

Great, thanks Vanya! That's all my questions for now ๐Ÿ˜„

modest tartan
#

Happy to help.