plaid/plaid-python

Why plaid doesn't respect the account that was selected by the user

alirezaseifi opened this issue · 1 comments

Here is the code and I'd like to limit the accounts to credit: ['credit card'], only

so the following code works and it's limiting the accounts in Plaid link to only credit cards

accountSubtypes: {
credit: ['credit card'],
},

even thought when I try to get the access_token or get balance it returns all the accounts balances instead of the one that user selected and there's no way for us to know which account was selected by the user.

how do I limit the transactions or balance to only one account that User selected at plaid link?


{
"access_token": "access-sandbox-54ada025-8217-4295-a1b9-a1095defb21e",
"item_id": "74B7Q4x6kqFAel77JmB8HXqA8w4M9vugLgjQG",
"request_id": "nu1pbdlws41FGxx"
}
127.0.0.1 - - [24/Jul/2020 22:11:15] "POST /get_access_token HTTP/1.1" 200 -
{
"accounts": [
{
"account_id": "mmqdLmGQxyS67NkkWlDbSl39PEDey5CLXyZAD",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"subtype": "checking",
"type": "depository"
},
{
"account_id": "y4jL34XG1qFB5G33KmXpTJ6lLZz1XQCyw6RDQ",
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "1111",
"name": "Plaid Saving",
"official_name": "Plaid Silver Standard 0.1% Interest Saving",
"subtype": "savings",
"type": "depository"
},
{
"account_id": "9PxQVPaqXrcADkooKJnqHa9lKjy6owuRgxNEW",
"balances": {
"available": null,
"current": 1000,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "2222",
"name": "Plaid CD",
"official_name": "Plaid Bronze Standard 0.2% Interest CD",
"subtype": "cd",
"type": "depository"
},
{
"account_id": "vx4Z5xwEQXfKqmPPWbX7IPKaLGMmkDCW16QXj",
"balances": {
"available": null,
"current": 410,
"iso_currency_code": "USD",
"limit": 2000,
"unofficial_currency_code": null
},
"mask": "3333",
"name": "Plaid Credit Card",
"official_name": "Plaid Diamond 12.5% APR Interest Credit Card",
"subtype": "credit card",
"type": "credit"
},
{
"account_id": "RzrvVzaWn3fdDBAAXq6rfP6JrpjDVWCRApVG9",
"balances": {
"available": 43200,
"current": 43200,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "4444",
"name": "Plaid Money Market",
"official_name": "Plaid Platinum Standard 1.85% Interest Money Market",
"subtype": "money market",
"type": "depository"
},
{
"account_id": "6azjma3RDlTA4eQQgDP8HKB84L7PjAugeD7xl",
"balances": {
"available": null,
"current": 320.76,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "5555",
"name": "Plaid IRA",
"official_name": null,
"subtype": "ira",
"type": "investment"
},
{
"account_id": "X4av14eyJPF7wjMMoxdmT1xBoegzdNTdLKAx6",
"balances": {
"available": null,
"current": 23631.9805,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "6666",
"name": "Plaid 401k",
"official_name": null,
"subtype": "401k",
"type": "investment"
},
{
"account_id": "DgMARgLPX7Cb1DKKGJxPHoZN7beM3BsvJWqXe",
"balances": {
"available": null,
"current": 65262,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "7777",
"name": "Plaid Student Loan",
"official_name": null,
"subtype": "student",
"type": "loan"
},
{
"account_id": "Vdxv1djbJ4CPBLDDr8jnfq4BaEke3bIWEgMn1",
"balances": {
"available": null,
"current": 56302.06,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "8888",
"name": "Plaid Mortgage",
"official_name": null,
"subtype": "mortgage",
"type": "loan"
}
],
"item": {
"available_products": [
"assets",
"auth",
"balance",
"credit_details",
"identity",
"income",
"liabilities"
],
"billed_products": [
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_9",
"item_id": "74B7Q4x6kqFAel77JmB8HXqA8w4M9vugLgjQG",
"webhook": ""
},
"request_id": "BIfNW9aA8D2pWti"
}
127.0.0.1 - - [24/Jul/2020 22:11:25] "GET /balance HTTP/1.1" 200 -

looks like you can get it from js plaid link. thanks