#sushbhat
1 messages · Page 1 of 1 (latest)
Hi could you elaborate a bit more? Which race condition specifically?
Lets say we get 2 build payment intents at same time for 2 different stripe accounts, if we change the Stripe.key at env level it could effect one request if its also in progress same time
Not sure why you need 2 accounts here, but creating a PaymentIntent shouldn't take that much time.
What could be in progress?
its a business usecase due to which we are supposed to have 2 accounts.. yes I mean in general it should be fine but there is some latency right for the request to reach stripe create payment intent and getback a response and any other API level processing additionally we do.. so there could a rare corner case where this race condition could occur
I would say you want to wait until the PaymentIntent creation API returns a response before switching over another key. But safer maybe you want to have 2 threads/process runs with 2 keys separately
is there anyway to send key at request level?
Yes
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we are using PaymentIntentCreateParams.builder() is it possible to pass in that?
I found this https://stripe.com/docs/connect/authentication
The link above is for Connect. If you don't use Connect I would recommend ignore it since you will be confused
request options isn't supported for normal payment intent?