Skip to main content

Transactions APIs

Get by Id

Get a transaction by transaction id and account id.

VerbGET
URLhttps://api.s.unit.sh/accounts/:accountId/transactions/{transactionId}
Required Scopetransactions
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
filter[customerId]string(none)Optional. Filters the result by the specified customer id.
includestring(empty)Optional. A comma-separated list of related resources to include in the response. Related resources include: customer, account. See Getting Related Resources

Response

Response is a JSON:API document.

200 OK

data
A Transaction resource.
included
Array of resources requested by the include query parameter.
curl -X GET 'https://api.s.unit.sh/accounts/:accountId/transactions/:transactionId' \
-H "Authorization: Bearer ${TOKEN}"

List

List transaction resources. Filtering and sorting can be applied. Paging is available only when filtering by customer id or account id.

VerbGET
URLhttps://api.s.unit.sh/transactions
Required Scopetransactions
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[accountId]string(empty)Optional. Filters the results by the specified account id.
filter[accountIds][]string(empty)Optional. Filters the results by the specified account ids. Usage example: filter[accountIds][0]=10000&filter[accountIds][1]=10001
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[query]string(empty)Optional. search term according to the Full-Text Search Rules.
filter[tags]Tags (JSON)(empty)Optional. Filter Transactions by Tags.
filter[since]RFC3339 Date string(empty)Optional. Filters the Transactions that occurred after the specified date. e.g. 2020-01-13T16:01:19.346Z
filter[until]RFC3339 Date string(empty)Optional. Filters the Transactions that occurred before the specified date. e.g. 2020-01-02T20:06:23.486Z
filter[cardId]string(empty)Optional. Filters the results by the specified card id.
filter[type][]string(empty)Optional. Filter Transactions by Transaction type. Possible values include: OriginatedAch, ReceivedAch, ReturnedAch, DishonoredAch, Book, Purchase, Atm, Fee, Reversal, CardTransaction, BatchRelease, Wire, ReturnedWire, Dispute, Adjustment, Interest, Reward, CheckDeposit, ReturnedCheckDeposit, PaymentCanceled, CustomerRepayment. Usage example: filter[type][0]=OriginatedAch&filter[type][1]=ReceivedAch
filter[fromAmount]Integer(empty)Optional. Filters the Transactions that have an amount that is higher or equal to the specified amount (in cents). e.g. 5000
filter[toAmount]Integer(empty)Optional. Filters the Transactions that have an amount that is lower or equal to the specified amount (in cents). e.g. 7000
filter[direction][]string(empty)Optional. Filter Transactions by direction (Debit, Credit). Usage example: filter[direction][0]=Debit
filter[excludeFees]boolean(empty)Optional. Filter Fee type Transactions.
filter[accountType]string(empty)Optional. Filter Transactions by account type (deposit, credit).
sortstringsort=createdAtOptional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order.
includestring(empty)Optional. A comma-separated list of related resources to include in the response. Related resources include: customer, account. See Getting Related Resources
curl -X GET 'https://api.s.unit.sh/transactions?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

data
Array of Transactions
Array of transaction resources.
included
Array of resources requested by the include query parameter.
metaOptional
JSON object that contains pagination data
Optional. Will be defined only when filtered by customer or account id. Pagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "originatedAchTransaction",
"id": "337",
"attributes": {
"createdAt": "2020-09-06T07:51:02.570Z",
"direction": "Credit",
"amount": 10000,
"balance": 10000,
"summary": "Counterparty: Unit Inc | Description: Funding",
"description": "Funding",
"counterparty": {
"name": "Unit Inc",
"routingNumber": "812345678",
"accountNumber": "1",
"accountType": "Checking"
}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "3"
}
}
}
},
{
"type": "feeTransaction",
"id": "338",
"attributes": {
"createdAt": "2020-09-06T07:51:03.094Z",
"direction": "Debit",
"amount": 10,
"balance": 9990,
"summary": "Fee - Funding"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "3"
}
},
"relatedTransaction": {
"data": {
"type": "transaction",
"id": "337"
}
}
}
}
],
"meta": {
"pagination": {
"total": 2,
"limit": 100,
"offset": 0
}
}
}

Update Tags

Update Tags Transaction

VerbPATCH
URLhttps://api.s.unit.sh/accounts/:accountId/transactions/:transactionId
Required Scopetransactions-write
Timeout (Seconds)5

Attributes

tagsOptional
object
Optional. See Updating Tags.

Response

Response is a JSON:API document.

200 OK

data
A Transaction resource.
Example Request:
{
"data": {
"type": "transaction",
"attributes": {
"tags": {
"trackUserId": "1234"
}
}
}
}

Update Book Transaction

Update Book Transaction

VerbPATCH
URLhttps://api.s.unit.sh/transactions/:transactionId
Required Scopetransactions-write
Timeout (Seconds)5

Attributes

summaryOptional
string
Optional. Summary of the transaction.
tagsOptional
object
Optional. See Updating Tags.

Relationships

account
JSON:API Relationship
The originating or the receiving account.

Response

Response is a JSON:API document.

200 OK

data
A Transaction resource.
Example Request:
{
"data": {
"type": "bookTransaction",
"attributes": {
"summary": "Counterparty: Unit Inc | Description: Funding",
"tags": {
"trackUserId": "1234"
}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
}
}
}
}

Update Chargeback Transaction

Update Chargeback Transaction

VerbPATCH
URLhttps://api.s.unit.sh/transactions/:transactionId
Required Scopetransactions-write
Timeout (Seconds)5

Attributes

summaryOptional
string
Optional. Summary of the transaction.
tagsOptional
object
Optional. See Updating Tags.

Relationships

account
JSON:API Relationship
The originating or the receiving account.

Response

Response is a JSON:API document.

200 OK

data
A Transaction resource.
Example Request:
{
"data": {
"type": "chargebackTransaction",
"attributes": {
"summary": "Description: Funding",
"tags": {
"trackUserId": "1234"
}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
}
}
}
}