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

Allow bank account id to be provided to tokens.create #769

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

nubs
Copy link
Contributor

@nubs nubs commented Jan 16, 2020

tokens.create allows for cloning payment methods from one account to another through stripe connect. When cloning a source, you do not provide the full payment method information but just the string id for the source in the appropriate key (card for credit cards and bank_account for bank accounts).

This was done correctly for credit cards but was not done for bank accounts. We are getting around this currently by using as any to ignore the typescript errors and allow passing a string as the bank_account.

tokens.create allows for [cloning payment methods][1] from one account to another through stripe connect. When cloning a source, you do not provide the full payment method information but just the string id for the source in the appropriate key (card for credit cards and bank_account for bank accounts).

This was done correctly for credit cards but was not done for bank accounts. We are getting around this currently by using `as any` to ignore the typescript errors and allow passing a string as the bank_account.

[1]: https://stripe.com/docs/connect/cloning-saved-payment-methods
@remi-stripe
Copy link
Contributor

@nubs Thank you for the PR! Assigning to @richardm-stripe to investigate a fix since we automatically generate those types internally

@richardm-stripe
Copy link
Contributor

Thanks for the report @nubs!

@richardm-stripe richardm-stripe merged commit b28846b into stripe:master Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants