#dinnediwakar
1 messages · Page 1 of 1 (latest)
hi! not sure I follow really, could you expand/elaborate on the specific problem you're facing?
like on a same project we are creating a customer using X keys but the same time any one else on same project using Y key for any other customer then Stripe.keys take keys which is taken globally new..same issue i am getting in our project
how we can handle keys multi-threading issue?
what language is your backend using?
scala and java
then you can use setApiKey on each request instead of setting it globally : https://github.com/stripe/stripe-java?tab=readme-ov-file#per-request-configuration
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
like this? RequestOptions requestOptions = RequestOptions.builder()
.setApiKey("sk_test_...")
.setIdempotencyKey("a1b2c3...")
.setStripeAccount("acct_...")
.build();
client.customers().list(requestOptions);
client.customers().retrieve("cus_123456789", requestOptions);
why we use IdempotencyKey and StripeAccount here?..Is it compulsory to use these?
why we use IdempotencyKey and StripeAccount here?..Is it compulsory to use these?
IdempotencyKey is not necessary, and StripeAccount is only used in the case where Connect is involved (e.g. retrieving a customer from your Connect Account)
thanks....by using this we never face stripe key multithreading issue right?