HOME / COMMUNITY Switch to knowledge base

Bank_Search API is returning incorrect balances

My API calls to the Bank_Search API are returning incorrect balances for the transactions. I am using JSON responses, but the issue appears the same when I check with XML using the API tester.

It looks like the negative of the CurrentBalance value from the metadata is used as a base, and then the transactions are added in the order they appear.

On one of my accounts, for example, the current balance is $35738.55. The first transaction from a balance of zero was a deposit of $1.00 to verify the account credentials. If I do a search I see this:

  "MetaData": {
    "RecordsetCount": 1,
    "ReturnCount": 1,
    "BankName": "(hidden)",
    "BankType": "MERCHANT",
    "AccountNo": "",
    "SortCode": "",
    "Currency": "USD",
    "CurrentBalance": 35738.55
  },
  "Transactions": {
    "Transaction": [
      {
        "TransactionDate": "2017-11-03T00:00:00",
        "Reference": "Test payment",
        "Notes": "",
        "Amount": 1.0,
        "Balance": -35737.55
      }
    ]
  }

The balance of -35737.55 is 1.00-35738.55, when it should be $1.00

If I specify dates or multiple results, it is apparent that the API endpoint is adding the transactions in the sequence listed, so if I reverse the order, then the balances are accumulated in the reverse.

If I query a date that has a $30000 withdrawal, then I get a balance of -65738.55 rather than the correct balance for that date.

Last year, the API was giving the correct results, so this is definitely a change (for the worse), but because I haven’t tried to use the API in the meantime, I don’t know when it was changed.

Hi @anthonywilliams

I’m not aware of any changes here, but I have asked a member of our development team to investigate.

I just wanted to say that this is still broken.

Hi @anthonywilliams

It’s still with our development team at the moment. As soon as we have an update, we will be sure to update you here.

This topic was automatically closed after 2 days. New replies are no longer allowed.