Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripe.OAuth.token doesn't offer a way to override global api_key #645

Closed
jarcoal opened this issue Mar 22, 2020 · 3 comments · Fixed by #646
Closed

stripe.OAuth.token doesn't offer a way to override global api_key #645

jarcoal opened this issue Mar 22, 2020 · 3 comments · Fixed by #646
Assignees

Comments

@jarcoal
Copy link

jarcoal commented Mar 22, 2020

Unlike most of the stripe object methods, stripe.OAuth.token doesn't offer a way to pass in an api_key to override the global API key.

This capability is necessary to generate test access tokens from a production refresh token: https://stripe.com/docs/connect/testing#test-keys-for-livemode-applications

@remi-stripe remi-stripe self-assigned this Mar 22, 2020
@remi-stripe
Copy link
Contributor

@jarcoal Thanks for the report! We'll look into fixing this.

You should not have to make this call today in your integration though. When you connect an account to your platform in Live mode you automatically get access to Test mode on their account. Most integrations should be using the platform's API request and pass the connected account id in the Stripe-Account header instead as documented here. This should unblock you and remove the need to make that call.

@ob-stripe
Copy link
Contributor

Fixed in 2.44.0.

@jarcoal
Copy link
Author

jarcoal commented Mar 24, 2020

@remi-stripe @ob-stripe Thanks for the quick action here!

As for the Stripe-Account header, I didn't understand how to use that at first, but after some playing around with it today I see how it's easier than juggling access tokens. I'll move forward with that technique.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants