#artdudejoe

1 messages ยท Page 1 of 1 (latest)

brittle sierraBOT
manic rover
#

Hey there

#

So you shouldn't be setting card_present as a payment_method_type here

wintry orchid
#

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)

manic rover
#

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

wintry orchid
#

PaymentIntent to save to a customer? or setupIntent to add a paymentIntent?

manic rover
#

Let's back up a second

#

What exactly are you trying to do?

wintry orchid
#

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

manic rover
#

Got it

#

So you don't need a SetupIntent at all in this case

#

You first take the in-person payment as normal

wintry orchid
#

It would be awesome if they could just say [X] save this for later

manic rover
#

When you do so, the Charge will have a generated_card in the response

wintry orchid
#

yep. I see that. It starts with "pm"

manic rover
#

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

wintry orchid
#

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?

manic rover
#

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

wintry orchid
#

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.

manic rover
#

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

wintry orchid
#

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.

manic rover
#

Yep.

wintry orchid
#

Awesome! Without your help I would not have deduced this from the docs

manic rover
#

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

wintry orchid
#

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

manic rover
#

Thanks that is all good feedback

wintry orchid
#

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.

manic rover
#

It doesn't necessarily say you don't need a SetupIntent to do that though

wintry orchid
#

I saw that but my mind was stuck on setupIntent as THE way to add a paymentMethod to a customer.

manic rover
#

Got it

#

I'll relay the feedback back to the team and see if we can add in some clarifiers!

wintry orchid
#

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.

manic rover
#

Yeah it can definitely be a lot to sift through

#

We try to make it both succinct and comprehensive... hard to do both ๐Ÿ™‚

wintry orchid
#

Especially with all the functionality you have and localization. Documentation is very difficult.

manic rover
#

Yep it is a fair call out. We are working on it

#

Thanks for the feedback

wintry orchid
#

Appreciate your help. I'm off to test!