#bethany-elements-customer

1 messages · Page 1 of 1 (latest)

flint stormBOT
raw magnet
#

bethany-elements-customer

#

Hey @bold folio let's talk here instead

bold folio
#

sorry, yeah, not totally clear on discord threading :-)

raw magnet
#

You don't have to create a Customer upfront, you can do the Customer async after the first payment if you prefer

#

(all good, I created it as you were typing :p)

#

so based on what you said in the main channel you can
1/ Create a SetupIntent (no Customer)
2/ Collect payment method details client-side with other info
3/ Async after success of the SetupIntent create a Customer, attach the PaymentMethod and store the rest of the information

bold folio
#

okay, so I can create a SetupIntent with no customer to get the client-secret for the payment element.

#

do I need to do cleanup on that SetupIntent if the user doesn't follow through on registration?

#

like, if i'm creating that every time somebotty loads the registration page, that could be messy

raw magnet
#

they don't really do anything and they aren't in the Dashboard so it's not really crucial

#

but you can always run a script to clean up SetupIntents older than a day or something every day

bold folio
#

ok, makes sense. i'll go give it a try.

#

thanks!