#dinnediwakar

1 messages · Page 1 of 1 (latest)

lethal nightBOT
tawny hedge
#

hi! not sure I follow really, could you expand/elaborate on the specific problem you're facing?

harsh roost
#

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?

tawny hedge
#

what language is your backend using?

harsh roost
#

scala and java

tawny hedge
lethal nightBOT
atomic relic
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

harsh roost
#

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?

atomic relic
#

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)

harsh roost
#

thanks....by using this we never face stripe key multithreading issue right?

atomic relic
#

it's not directly related to multi-threading though

#

this means that you can set the API key per call rather than using one Key for all of the calls