#wellthen-validate-before-payment

1 messages · Page 1 of 1 (latest)

hushed anchorBOT
rough grove
#

wellthen-validate-before-payment

#

Hey @quasi drift it depends a lot on your integration and which product(s) you use. We don't really have "inventory management"

#

what most businesses do like airlines and ticketmaster is that they "hold" the items for X minutes

quasi drift
#

I can't get an intent via webhooks which allow me to approve/deny the transaction?

rough grove
#

that could mean many different things but not really

#

again depends a lot on the exact product(s) you are using: Checkout, PaymentElement, Subscriptions, etc. If you provide more details I can help

quasi drift
#

i believe i'm using checkout

rough grove
#

then no that is not something we support today unfortunately

prisma socket
#

Sorry if I'm intruding, I don't know if you do this today but you can create an payment Intent by stripe.paymentIntents.create(paymentOptions), store your Payment Intent ID and after all your checks you can just confirm, with stripe.paymentIntents.confirm(paymentIntentID, options)

quasi drift
#

what'd you advise to use instead?

rough grove
#

There isn't really an easy way to do this. What you can do is use short lived Checkout Sessions for example and "hold" the ticket until that session expiration

quasi drift
#

so would you advise simply refunding the user if it's not possible to complete their transaction?

rough grove
#

it depends on a lot of factors, for example if you refund you lose our fee (we don't give it back) so that could be costly

#

Alternatively you could not use Checkout at all, build your own integration and before confirming the payment you can check with your server whether the inventory is still available or not

quasi drift
#

oh, i think i misunderstood what checkout is

rough grove
#

following that integration guide for example

quasi drift
#

i am integrating stripe over PHP

rough grove
#

that doesn't really say much, everything can be integrated in PHP, including Checkout

quasi drift
#

I assume this is checkout?

rough grove
#

well it's only a small part of the code but based on the parameters yes

quasi drift
#

right, i already do checks on my backend before the user clicks the pay button on whether the seats are available, but I can't do anything while they're at this screen

rough grove
#

correct you can't, that's what I explained earlier, if you use Checkout that is impossible, you do the check before redirecting them to that page

quasi drift
#

and there's no way to hold the funds after they finish that part?

rough grove
#

not sure what that means

quasi drift
#

user enters their details -> stripe waits for my server to respond on whether to approve the transaction

rough grove
#

then no. Sorry I've said a few times this is impossible

quasi drift
rough grove
#

yes

quasi drift
#

i assume that's more risky security wise

rough grove
#

no it's not more risky security wise. But it's more work to implement

#

I'd recommend going through our main doc I shared above to get a feel for it

quasi drift
#

I'd have to send requests with the credit card information to Stripe, right?

rough grove
#

not really no

#

we have UI elements for this, it's all secure

quasi drift
#

oh, seems to be done locally via JS

rough grove
#

correct

quasi drift
#

reading it now, based on what I've understood so far, I can have a button on my website which sends the data to Stripe. When users click the button, I can do a server side check before I send it to Stripe?

rough grove
#

yes

quasi drift
#

i believe there's a chance that the user will still get redirected (3DS, Klarna)?

#

or does it open a new window and wait for a success response for that?

rough grove
#

yes they can still be redirected, there's no way to prevent that really

#

there will always be a risk of race condition, anyone in your situation would build a way to "hold" tickets for a while and handle double payments and such after the fact

quasi drift
#

can you elaborate on holding tickets?

#

i find it kind of weird Stripe doesn't have fund holding, when I purchase something from the internet, the funds are usually "on hold" by my bank until the owner claims it

rough grove
#

I mean we do have that, it doesn't really change that much

#

you're still holding the funds, still a really poorexperience for the customer

quasi drift
#

correct, but i'm not seeing a way how I can avoid the issue

rough grove
#

I did explain how to avoid the issue

#

also "funds hold" doesn't work with most payment methods in the world

#

like sure it works with card, but not most

quasi drift
#

reserve the tickets before the customer makes a payment?

rough grove
#

if you ever bought airline tickets or tickets on ticketmaster, there's a waiting list, and a countdown like you have X minutes to pay

#

that's what most companies do at least to hold inventory

#

what you can also do is track all the Checkout Sessions and cancel everything once the whole inventory has been sold

quasi drift
#

with the fund holding option, does stripe still take the fees?

rough grove
#

it doesn't in that case

quasi drift
#

but the funds aren't reversed immediately i assume?

#

in the card payment method

rough grove
#

correct

quasi drift
#

yeah, that's not very nice especially when you spend a lot of cash on a bus ticket you can't use

#

thanks very much for your help

#

i'll do ticket holding