#TLShadow
1 messages ยท Page 1 of 1 (latest)
Hi there!
hi .. just as little detail information
oh okay so i have to go over the customer
You should use a customer object if you plan to reuse the payment method multiple times yes.
ok let me write up a littel abstract what we ware doing because its not really multiple use .. just a rather delayed one
we do have a wordpress checkout .. problem ist we need a singlepage checkout .. so payment and all other information will be collected, yesterday i got the information that setupIntents would be thing to use for that case ... (had found out the stripe plugin usese sources which is kinda legacy) ... sofar we have a successfull payment method on a setup intent .. and a bit later on i get all information for the order .. like item price etc .. so now i want to actualyl charge that order.
As far as i understand it now .. i need to create a customer .. attach the pamyent from the setup intent .. and then pass the customer and payment method to the newly created intent to actually charge it ?
oh and do i need to set on or off session for that process ?
Hi there ๐ I'm jumping in as my teammate needed to step away. If you created a Customer during the Setup Intent process, then you would reuse that Customer rather than create a new one when you wish to process a payment. If you don't already have a Customer created, then yes, you will need to create one and attach the previously created Payment Method to it. You can then create a Payment Intent to handle the payment, and if your customer is likely to not actively be on your site when that payment is processed then you'll want to set off_session to true.
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.