skip to Main Content

I am trying to retrieve all historical transactions data of plaid account. I am using nodejs

I am using this api

https://sandbox.plaid.com/transactions/sync

And I am sending the cursor as "" for the first time does this guarantee me that it will start from the beginning and then i can move to the next request with the next_cursor?

Also I am getting the data in batches is it possible to have in delete array of response an transactionsID and later in other batches to have in added the same transactions id or this is not possible? Because that will complicate things.

Is the order guaranted of addded , updates and deletion in the same batch or updates can be in other batches

{
 cursor : "",
 count : 100
}

2

Answers


    1. Per the documentation, the correct way to get all updates is to omit the cursor (not send an empty string).

    2. If a "batch" is a page from a single /transactions/sync request, then yes, a transaction can be deleted in one page of the response and added in another page. The sample code in the Plaid docs shows how to handle this.

    Login or Signup to reply.
  1. Using the Plaid /transactions/sync API endpoint is a good approach to retrieve all historical transaction data for an account. When you use the API with cursor set as an empty string (""), you are effectively starting from the beginning of the transaction history. Plaid will return the initial batch of transactions and provide a next_cursor value, which you should use in subsequent requests to get the next batch of transactions. This process should be repeated until next_cursor is null, indicating there are no more transactions to fetch.

    To handle synchronization effectively, you should process the batches in the order they are received, and always use the next_cursor from the current response to fetch the next batch. This way, you maintain the integrity and sequence of the transaction data according to how Plaid provides it.

    Remember to handle edge cases, like re-synchronization if a batch fails or if there is a long delay between fetches, to ensure your local copy of the transactions remains accurate and up-to-date.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search