#hendr1x_api

1 messages ¡ Page 1 of 1 (latest)

bright snowBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1263487587486531615

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

granite oak
#

Hello

twin hazel
#

hello

granite oak
#

The request would error with a requires_authentication response

#

You can test this out with our test cards

twin hazel
#

So what would be the protocol for addressing that response?

granite oak
#

You would bring your customer back on-session and then confirm again so that they can complete 3DS

twin hazel
#

To confirm, setup a system that can create the payment intent without off_session?

#

I don't have to collect additional information...so provide the paying customer with a page that they can load

granite oak
#

Correct

#

You just need to confirm the PaymentIntent using the stored PaymentMethod and passing off_session: false

#

Then the PaymentIntent will move to requires_action

#

And you have the customer complete 3DS

twin hazel
#

Ok. Please bear with me....what I'm trying to do is a have an ecommerce checkout where the admin of the site can confirm the pricing before the card actually gets charged.

granite oak
#

You want manual capture for that

twin hazel
#

So whats the use case of paymentIntent? I already spent a couple dozen hours coding that up

granite oak
#

Take a look at the above doc -- you still use PaymentIntents, you just control whether to actually capture the authorized funds or release them.

#

So your admin can "approve" the transaction otherwise you can cancel it.

twin hazel
#

Sorry...I need more help. I think I was working through your "Built a two step confirmation experience" but your guide got changed on me.

#

Prior it didn't have confirmation_tokens....now it only shows node (I'm using php)

#

No big deal....

#

however what I'm suprised about now is that there is a confirm() step on paymentIntent

granite oak
#

Okay can you clarify what you are confused about specifically?

twin hazel
#

Yes, sorry for being vague.

#

So I think my question is, when creating a paymentIntent with off_session=true, the difference is the admin is allowed to confirm the paymentIntent out of session. Otherwise, if off_session=false, I have to confimr the paymentIntent during the visitors checkout process.

granite oak
#

Yeah more or less. off_session just indicates whether the customer is in your flow currently or not.

twin hazel
#

Sorry...so my system has a flag that allows different types of checkout flows.

#

Currently no matter what (when paymentIntent->create()) is run the customer is on_session()

#

I want to build it so I can support create + confirm during the checkout flow

#

and also so the admin can do it later (depending on site setup)

granite oak
#

If you are following the 2 step confirmation experience then your customer should still be present so this really shouldn't be an issue.

#

off_session is really meant for when you are making a recurring charge

#

Like you save their PaymentMethod and then charge it in the future based upon an agreement with your customer

twin hazel
#

Correct...no matter what my customer is present when I create payment_method + payment_intent

#

In some cases I want to get charge them during chekcuot...some after admin review

granite oak
#

That's fine

#

Then you can ignore off_session completely

twin hazel
#

I just want to handle confirmation / debit payment issues properly

#

Ok...so it seems like i just need to control when I run confirm()....the rest of the flow doesn't change regardless of if a charge happens during checkout or after admin review

#

So, just be clear....I have the ability to update a paymentIntent (by the admin) before confirming in the case an admin finds a price mistake correct?

granite oak
#

Yes in the two step experience that is correct

twin hazel
#

Perfect. And to be clear if I create the paymentIntent during checkout (off_session=false) that will handle all the confirmation requirements for the customer.

granite oak
#

If you are confirming client-side then yes

#

Really the best thing to do is to test this all out with our 3DS test cards

#

That will give you the best understanding of how this all works

twin hazel
#

Ok. Thank you for your help.

#

I really appreciate it

#

DO I need to close this thread somehow?

granite oak
#

Happy to help

#

The thread will close after a period of inactivity