最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plaid - Transactions on an account not adding up to current balance - Stack Overflow

programmeradmin2浏览0评论

I am experimenting with the Plaid Transactions Get API in the Sandbox environment, and I am struggling to understand something.

When I call /transactions/get API on the Plaid Checking (depository) account in the Sandbox environment, I do so like using this call:

curl -X POST  \
-H 'Content-Type: application/json' \
-d '{
  "client_id": “my_client_id",
  "secret": “my_secret_key",
  "access_token": “my_access_token",
  "start_date": "2018-01-01",
  "end_date": "2025-02-08",
  "options": {
    "account_ids": [“account_id_of_checking_account_in_sandbox_environment"], 
    "count": 500,
    "offset": 0
  }

I get back a JSON object showing available balance = 100 USD, current balance = 110 USD.

Importantly, the JSON object returns only 18 transactions as part of this transactions/get call. When I add up the amounts of these 18 transactions, I get -1,147.62 USD.

Could someone explain this discrepancy to me? Should all the transactions not add up to the current balance? I read on the Plaid API website that some transactions which are pending could be reflected in the balance, but they may still not show up in the transaction history. The Plaid API website mentioned this as one of the reasons why the balance may be different from the overall sum of all transactions. But is that reason enough to explain the discrepancy between 110 USD and -1,147.62 USD.

Any help shall be appreciated.

I am experimenting with the Plaid Transactions Get API in the Sandbox environment, and I am struggling to understand something.

When I call /transactions/get API on the Plaid Checking (depository) account in the Sandbox environment, I do so like using this call:

curl -X POST https://sandbox.plaid.com/transactions/get \
-H 'Content-Type: application/json' \
-d '{
  "client_id": “my_client_id",
  "secret": “my_secret_key",
  "access_token": “my_access_token",
  "start_date": "2018-01-01",
  "end_date": "2025-02-08",
  "options": {
    "account_ids": [“account_id_of_checking_account_in_sandbox_environment"], 
    "count": 500,
    "offset": 0
  }

I get back a JSON object showing available balance = 100 USD, current balance = 110 USD.

Importantly, the JSON object returns only 18 transactions as part of this transactions/get call. When I add up the amounts of these 18 transactions, I get -1,147.62 USD.

Could someone explain this discrepancy to me? Should all the transactions not add up to the current balance? I read on the Plaid API website that some transactions which are pending could be reflected in the balance, but they may still not show up in the transaction history. The Plaid API website mentioned this as one of the reasons why the balance may be different from the overall sum of all transactions. But is that reason enough to explain the discrepancy between 110 USD and -1,147.62 USD.

Any help shall be appreciated.

Share Improve this question asked 2 days ago Amulya YadavAmulya Yadav 1
Add a comment  | 

1 Answer 1

Reset to default 0

https://plaid.com/docs/sandbox/#differences-between-sandbox-and-production

Sandbox "does not persist state across products or sessions. For example, triggering a transfer using a Transfer endpoint will not cause that transaction to show up when calling /transactions/sync or change the balance of the account when calling /accounts/balance/get."

This also applies to the relationship between test transactions and test balances in the account -- the balance in Sandbox is hard-coded as 110 regardless of the transaction history.

发布评论

评论列表(0)

  1. 暂无评论