#bethany-elements-customer
1 messages · Page 1 of 1 (latest)
sorry, yeah, not totally clear on discord threading :-)
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
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
you can cancel it https://stripe.com/docs/api/setup_intents/cancel but you don't have to
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