#artdudejoe
1 messages ยท Page 1 of 1 (latest)
what should I be setting it to?
And if I don't set it to that will I be charged at the higher rate (US customers)
Did you take a look at that guide?
First you process in-person as normal
Then you use the generated_card to pass to a new PaymentIntent when you want to charge it later
PaymentIntent to save to a customer? or setupIntent to add a paymentIntent?
capture a payment via a card in person with a terminal. Then save that card to that customer for later use.
I have clinics as connects and they want to charge their patients if they don't show up
Got it
So you don't need a SetupIntent at all in this case
You first take the in-person payment as normal
It would be awesome if they could just say [X] save this for later
When you do so, the Charge will have a generated_card in the response
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yep. I see that. It starts with "pm"
When you are ready to charge later, you grab that generated_card and you create a PaymentIntent just like you are doing except you don't pass card_present
Correct
You pass that as the payment_method for the PaymentIntent
And you also will pass confirm: true
To actually initiate the charge
I've got a whole process for saving cards for later use that uses setupIntent so patients can add a card to their patient portal (a prerequiste for making appointments). Ignore that?
SetupIntent <-- ignore that?
Yeah you don't need a SetupIntent here since you are taking a payment
You only need a SetupIntent if you are collecting card details without a payment occurring
Ok. Hmm. Let me work with this new information. But as I understand it PaymentIntent isn't something you keep around for months but that you will use very soon after the request.
You wouldn't create the PaymentIntent until you want to charge that PaymentMethod
The PaymentMethod from the generated_card isn't going to expire
If you really want to track it, you could go ahead and just attach that PaymentMethod to a Customer
You don't need a SetupIntent for that though
Yeah, doing that.
So if I want to allow a patient to add a card for later use but not charge it in person right away use setupIntent. If you
If I want to charge a present card and save it for later use I take the generated_card from the payememnt and apply it to a new paymentIntent at the time of the charge.
Yep.
Awesome! Without your help I would not have deduced this from the docs
For this you may want to just attach it to a Customer immediately
Can you tell me where in the docs you were confused or it was insufficient?
Would love to relay some feedback to our team for improvements
https://stripe.com/docs/api/payment_intents/create has nothing about how to reuse of the generated_card
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
https://stripe.com/docs/terminal/features/saving-cards/save-after-payment?terminal-sdk-platform=js This article doesn't take the additional steps either. It does point to generated_card
Plus the whole thing with setupIntent had me believing that I could just follow setupIntent steps to add that paymentMethod to a customer after a reader capture
Thanks that is all good feedback
I will say that there is one line in https://stripe.com/docs/terminal/features/saving-cards/save-after-payment?terminal-sdk-platform=js that states:
You can automatically attach the generated_card PaymentMethod to a customer object to easily retrieve saved card details in the future.
But it is a bit hidden
I am building a Stripe layer ontop of an existing application I've built so I've needed to integrate with my PHP/jquery application. So, I've been building PHP programs that AJAX goes back and forth with to give my clinics the best experience.
It doesn't necessarily say you don't need a SetupIntent to do that though
I saw that but my mind was stuck on setupIntent as THE way to add a paymentMethod to a customer.
Got it
I'll relay the feedback back to the team and see if we can add in some clarifiers!
Appreciate this. Your docs are so thorough but my needs were very specific and knitting together docs and API reference were always very confusing. Maybe after I get all this working I can document and comment my solution and share it. With some of my SQL stuff to show integration with an existing app.
Or it is possible my hack status isn't useful anywhere but in my on little mind.
Yeah it can definitely be a lot to sift through
We try to make it both succinct and comprehensive... hard to do both ๐
Especially with all the functionality you have and localization. Documentation is very difficult.
Appreciate your help. I'm off to test!