Transaction Batches
Any user with the available permissions can perform a request to manually settle a transaction batch. This is done by using the transactionbatches endpoint with an action of "settle".
Endpoint Actions
Get Transaction Batches
GET /v2/transactionbatches
Note: It may be useful to include sort=-created_ts
as a query string parameter so that the most recent Transaction Batch is first in the list.
Get Specific Transaction Batch
GET /v2/transactionbatches/{id}
Settle a Transaction Batch
POST /v2/transactionbatches/{id}/settle
Processing Status Ids
There are only 5 processing status ids that can be returned in the response when the action is "settle". They are listed in the table below.
Status Id | Description |
---|---|
1 | To Settle |
2 | Settled |
3 | Error |
4 | Re-process |
5 | Processing |
Filters
In contrary to using expands to get extra data, you can use filters to limit record results. Most fields listed in the fields section can be used to filter results.
Say, for example, that you only wanted to find the open batch. You could include that filter in the URL of the GET request like so:
/v2/transactionbatches?is_open=1
Additional filters include: processing_status_id
, and product_transaction_id
.
There is additional functionality that allows searching and filtering on timestamp fields. If you are looking for transaction from today, you can simply search on the created_ts field as follows:
/v2/transactionbatches?created_ts=today
And for yesterday you could do the following:
/v2/transactionbatches?created_ts=yesterday
If you need more flexibility on dates, you can set the timestamp filter to custom and supply a custom from and to date like so:
/v2/transactionbatches?created_ts=custom&created_ts_from=1511382234&created_ts_to=1511385997
You can do the same thing with batch_close_ts
like so:
/v2/transactionbatches?batch_close_ts=custom&batch_close_ts_from=1511382234&batch_close_ts_to=1511385997
When searching on timestamp fields, the list below contains all the predefined values that can be used:
- today
- yesterday
- this week
- last week
- last 30 days
- this month
- last month
- custom