Skip to content

Commit

Permalink
Merge pull request #41 from plaid/bjp-exchange-stripe
Browse files Browse the repository at this point in the history
Support Stripe + Plaid link exchange
  • Loading branch information
Bpless committed Dec 11, 2015
2 parents 3c96522 + 90393a9 commit 5b2a497
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import json

from plaid import Client

Client.config({
client = Client.config({
'url': 'https://tartan.plaid.com',
'suppress_http_errors': True,
})
Expand Down
13 changes: 9 additions & 4 deletions plaid/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,20 +323,25 @@ def connect_update_step(self, url, *args, **kwargs):

@store_access_token
@inject_url('exchange_token')
def exchange_token(self, url, public_token):
def exchange_token(self, url, public_token, account_id=None):
'''
Only applicable to apps using the Link front-end SDK
Exchange a Link public_token for an API access_token
`public_token` str public_token returned by Link client
`public_token` str public_token returned by Link client
`account_id` str Plaid account ID
used to create a bank account token
'''
return post_request(
url,
data={
data=dict({
'client_id': self.client_id,
'secret': self.secret,
'public_token': public_token,
},
}, **(
{} if account_id is None
else {'account_id': account_id}
)),
suppress_errors=self.suppress_http_errors
)

Expand Down

0 comments on commit 5b2a497

Please sign in to comment.