#fred88 - charges

1 messages · Page 1 of 1 (latest)

gentle path
#

With the payment element you do need to create the payment intent ahead of time, yes. You can do that and associate with a customer within minimal details, though, and update the customer with info you collect during your checkout flow

#

eg:
1/ create ~empty customer
2/ create payment intent
3/ show checkout form and payment element
4/ complete payment & update customer details

grizzled lynx
#

Thanks for this. So we'd have to take care of instances where users abandon the cart or refresh, right? Through sessions or similar? I'm thinking to avoid empty customer and intents proliferation.

gentle path
#

Yea, its a bit tricky with the payment element because it requires the PI up front, but you can also associate a payment intent with a customer after the fact, if you wanted to

#

(or cancel payment intents and delete customers to clean up etc)

grizzled lynx
#

OK, thank you. Let me play with some PoCs and come back to this.