#sanjeewa
1 messages ยท Page 1 of 1 (latest)
Hi there, are these requests created by Stripe SDK?
Yes . How I process this according to the stripe doc. I have included checkout.js that comes with paymement page. when the page load it called initialize() function that create payment intent . finally handleSubmit() function that trigger const { error } = await stripe.confirmPayment({
then I can see these events have been created ex: payment_intent.created payment_intent.succeeded & charge.succeeded
The Stripe SDK would create ideompotency keys if you code doesn't specify ideompotency keys.
It's recommended to set your own ideompotency keys, so that your app can safely retrying requests without accidentally performing the same operation twice. (ref: https://stripe.com/docs/api/idempotent_requests#idempotent_requests)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes I understand this. The thing is I want to clear , Is that enough to send ideompotency-key when creating paymentIntent only like below ?
$idempotency_key = (string) Str::uuid().v4();
Is above correct ?
It looks good to me.
Thank you
Also do I need to send the ideompotency-key witin this function when submit the payment form?
At the client-side? no you don't need.
Thank you ๐