#Dev Acharya - Update PI w Auth PM

1 messages · Page 1 of 1 (latest)

bitter pendant
coarse atlas
#

So the scenario is as such:

You are at a bar, you place your first order. When you place your first order, we authorize the payment method given by the user with the amount of their first order

You now place your second order. I want to be able to update the same payment intent that we had created initially with a higher amount (order 1 + order 2) and determine if the user's payment method has the capacity to pay the new amount (order 1 + order 2)

bitter pendant
#

So in this case you have not confirmed the payment Intent (i.e. started charge process)?

coarse atlas
#

No, we would have only 'captured' amount of order 1

bitter pendant
#

In that case you should be able to make an Update request for your PI that adjusts the amount

coarse atlas
#

so I have created the a payment intent as mentioned within the article

#

and yes I am able to update the payment Intent amount

#

but

#

It shows it as incomplete

#

now my next question is

#

When I go to capture this pi

#

Are there any chances of the paymentMethod declining?

bitter pendant
#

I suspect the card authorization may decline, since merchants being able to "arbitrarily" increase charges after a customer has authorized their card for a one-off transaction may be problematic. Let me look into other approaches.

coarse atlas
#

That would be a real great help

#

There were some work arounds that we had figured out but it was causing credit card statements to show too many authorization statements and ended up causing card limits to reach

#

For example, we would make a pi with an amount $10 to be authorized. Then another pi with an amount $25 (assuming a user ordered $15 item). This behavior on the credit card side showed an amount of $35 to be pending rather than just showing $25

bitter pendant
#

Just to clarify, you aren't using Stripe Terminal are you?

coarse atlas
#

No there is no hardware of any kind involved in this

#

This is all done via stripe api

#

excluding the terminal api of course

bitter pendant
#

Okay so in that case there is, unfortunately, no work around. Increasing the PI amount will always require re-auth of the payment method. The best suggestion I can make would be to shift the creation/confirmation of the Payment Element to later in your application's workflow

coarse atlas
#

re-auth of the payment method in terms of user having to put in their card information again?

#

I guess I am just trying to understand what does 're-auth of the payment method' entail in terms of flow

bitter pendant
#

Yeah I looked farther into it and you can forget that part, it was a mis-statement on my end.

#

You can create the payment intent and update the amount but once the card is authorized the amount is set. The Hold & Capture approach only works for capturing less than the PI amount.

coarse atlas
#

Gotcha I see...is there any possibility of me getting a transcript of our chat?

bitter pendant
#

That's not something Discord supports presently. If you come back here and want to revisit this discussion after the thread has been archived you can ask a moderator to re-open it, so you don't lose context.

coarse atlas
#

No worries, I have copied over everything to notepad, but I will keep in mind of having the option of pulling up this info upon request

#

Thank you for your support

bitter pendant
#

Yeah, I searched some Discord docs about that. It sounds like a lot of people would appreciate that feature

coarse atlas
#

I agree lol because other payment processors allow you to auth cards for a certain amount which sort of just checks the card to see if that amount can be handled

bitter pendant
#

Well in this case it's not that part that's the problem. It's that you auth it at a certain amount and then are trying to increase it after the auth (unless I'm wildly mistaken, which has happened)

coarse atlas
#

no you are correct on your understanding

#

so is this possible?

#

given a payment Method

#

would I be able to associate an amount against it to verify if that payment method can handle the transaction of that amount

bitter pendant
#

In that case I think you would be better served by using a SetupIntent to create the payment method for future usage and then later using a Payment Intent to charge it

coarse atlas
#

that's what we were doing before we had to rework our approach because we were seeing cards decline and users had already placed their orders and had already received their product

#

So we had to come up with something that would guarantee us that the amount we are to charge this person can actually be fulfilled during transaction of the pi (or capture of the pi)

shadow birch
#

Yea, you want to make sure that once you have product ready to go out the door that you get a payment auth for a specific amount before fulfilling

#

So if there might be more than 7 days between order placement and fulfillment, you can collect the details with a setup intent, then create & auth the payment intent prior to final step of shipping

coarse atlas
#

Unfortunately that sort of doesn't work...I guess to give you all a bit more of a background into our platform, we provide restaurants with contactless ordering. This mean you can place an order for your food from your seat without the need of a waiter taking down your order.
Now the issue comes within our 'Tab' feature, where users are able to start a tab given their card info and we automatically charge their card after some behavioral metrics have been hit which goes to suggest that either they might have left the premises or may be done with their meal for their visit

#

But with that said, I understand from our conversation that stripe currently does not provide any means of updating a pi to authorize an amount larger than the first authorized amount. So we will end up figuring something else out

shadow birch
#

Broadly, no -- in this case you'd want to communicate with your customer that you'll initiate an auth for a larger amount, say $100, then only capture the amount for what is ordered at the end.

#

If they approach that limit during the meal, you can create another PI for a larger amount in parallel, say for $200, and cancel the first one once the second is authorized

#

It would be up to you and the way the business works to decide whether to let customers order beyond the preauthorized amount

coarse atlas
#

Right so we were planning on doing something very similar to what you have suggested here

#

We were planning on auth a pi for X amount, let the user order for up to and including X amount. If user tried to order something more that goes above X amount, then we would create another pi with maybe X/2 amount and try to charge the difference to the second pi and capture the first pi

#

Please do share your opinions or any issues that you might be seeing in the solution I mentioned above from like stripe's capability perspective

shadow birch
#

No real issue, it makes sense as a flow. Just make sure to communicate to your customer clearly what amounts to expect as pre-auths on their card.

coarse atlas
#

yes absolutely

#

Thank ya'll for all the support and help, very much appreciate it

shadow birch
#

Our pleasure! Good luck with the work 🙂