#Noria-cancel-paymentintent

1 messages · Page 1 of 1 (latest)

polar otter
#

hello, yes you can cancel PaymentIntents.

as for race conditions, can you describe the scenario?

I think you mean cancelling a PaymentIntent that the customer is paying?

sweet rune
#

For the last question, yes.

I'm selling one-time-buy products, and in case someone bought it faster, no one else should be charged if attempting to pay for it.

#

let me know if I need to explain further

polar otter
#

you're not temporarily "locking" stock for when a customer has it in their cart, right?

you're only "consuming" the stock for whoever pays first, right?

sweet rune
#

Yup!

#

I am thinking that cancelling all of the paymentintents that have that sold-out product in their "cart" will take a bit of time, time that someone else could use to also pay for the already sold-out product.

#

therefore creating a race-condition

#

does that make sense?