#ares9389

1 messages ยท Page 1 of 1 (latest)

vale leafBOT
wooden bough
#

๐Ÿ‘‹ happy to help

inner jolt
#

๐Ÿ˜„

wooden bough
#

I'm not sure what are you trying to avoid here?

inner jolt
#

duplicate checkouts, if for instance the network was bad and the request wasn't fulfilled it would be automatically retried an hour later than 2 hours after that for a couple of times as far as I know.

I don't want the customer to be charged twice if he starts a new checkout session and the one before becomes valid

wooden bough
#

I'm not sure I follow to be honest

inner jolt
#

is it only meant for stripe.customers.create ?

#

best practices https://stripe.com/docs/payments/payment-intents#best-practices

You should also provide an idempotency key when creating the PaymentIntent to avoid erroneously creating duplicate PaymentIntents for the same purchase. This key is typically based on the ID that you associate with the cart or customer session in your application.

wooden bough
#

it's meant for any request that you initiate

#

if you're using Checkout Sessions, you shouldn't worry about idempotency

inner jolt