#kevin-r_payment-element-customer

1 messages ยท Page 1 of 1 (latest)

timid muralBOT
#

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

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

stiff breach
#

I have a paymentIntent and use elements to get the card info, then call confirmPayment(). This creates a customer (right?)

No it does not. It only confirms the payment

deft plaza
#

Interesting. When I look at the paymentIntent on dashboard.stripe.com, there's a customer attached to the intent. I'll get the PaymentInent ID.

stiff breach
#

Can you share more about your Elements integration

deft plaza
#

Stand by - I found something that might mean I'm looking in the wrong place.

#

OK. Can you see the details of this? pi_2SG60VWSZAydrGSw08lK84rA

stiff breach
#

This payment intent was created with a Customer specified

#

That Customer was created in a separate API request.

deft plaza
#

Yep, so it was. Disregard.

stiff breach
#

Both came from your PHP server

#

Looking at your logs, it looks like you are using the Payment Element. You can read more about what data this does collect and how it all works here.

deft plaza
#

Yeah, that's my mistake. Yeah, I have been working off of that page for a while. I've been re-wiring an app that's 5+ years old to use the newer PaymentIntent system.

#

So we have a few steps, from selecting a product , gathering customer info, (including some things that Stripe doesn't need but we do) and then payment, and I'm trying to make this use all the Stripe-recommended components and methods without entirely starting from scratch on the checkout app.

stiff breach
#

Gotcha

#

You can use the Address Element to collect and save customer addresses as part of your payment flow but I don't think we have an element that creates a Customer for you.

deft plaza
#

somehow I got the impression that if you added the setup_future_usage parameter and set it to off_session, it would implicitly create a customer as well. I guess that's not the case.

stiff breach
#

Nope

deft plaza
#

Is there a best practice for finding and removing customer accounts who never end up paying or subscribing? I know we can just leave them, but I figure that could get kind of wasteful if we're not careful.

stiff breach
#

Not really, that's kind of up to each merchant and their business model. There's no limit on the number of Customer records you can have.

deft plaza
#

OK. I'll deal with that later, then. Thanks!

stiff breach
#

Sure thing! Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚