Transactions
Get Transaction
Get a transaction by transaction id and account id.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/accounts/:accountId/transactions/:transactionId |
| Required Scope | transactions |
| Timeout (Seconds) | 5 |
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/accounts/12345/transactions/12345' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns the transaction details. Amounts and balances are in cents.
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| id Required | string | Identifier of the transaction resource. |
| type Required | string | Type of the transaction resource. The value is always transaction. |
| attributes Required | JSON Object | JSON object representing the transaction data. |
| relationships Required | JSON:API Relationships | Describes relationships between the transaction resource and other resources. |
Attributes
| Name | Type | Description |
|---|---|---|
| createdAt Required | string | The date the transaction was created. Common to all transaction types. |
| direction Required | string | The direction in which the funds flow. Common to all transaction types. |
| amount Required | integer | The amount (cents) of the transaction. Common to all transaction types. |
| balance Required | integer | The account balance (cents) after the transaction. Common to all transaction types. |
| transactionType Required | string | The type of the transaction. |
| summary Required | string | A brief summary of the transaction. |
| tags Optional | object | See Tags. |
| counterparty Optional | object | The counterparty of the transaction. See Counterparty |
| userIds Required | array | List of user IDs associated with this transaction. |
| addenda Optional | string | ACH only. Additional payment description (maximum of 80 characters), not all institutions present that. |
| atmName Optional | string | ATM only. The name of the ATM. |
| atmLocation Optional | string | ATM only. The location (city, state, etc.) of the ATM. |
| merchant.name Optional | string | Purchase/Card only. The name of the merchant. |
| merchant.type Optional | integer | Purchase/Card only. The 4-digit ISO 18245 merchant category code (MCC). |
| merchant.location Optional | string | Purchase/Card only. The location (city, state, etc.) of the merchant. |
| merchant.id Optional | string | Purchase/Card only. The unique network merchant identifier. |
Relationships
| Name | Type | Description |
|---|---|---|
| account Required | JSON:API Relationship | The Deposit Account of the customer. |
| customer Required | Optional, JSON:API Relationship | The Customer the deposit account belongs to. |
| customers Required | Optional, Array of JSON:API Relationship | The list of Customers the deposit account belongs to. |
Example Response:
{
"data": {
"type": "transaction",
"id": "12345",
"attributes": {
"amount": 50000,
"direction": "Credit",
"transactionType": "ACH",
"createdAt": "2021-06-02T10:15:22.123Z",
"balance": 150000,
"summary": "ACH payment from John Doe",
"tags": {
"purpose": "invoice-payment"
},
"counterparty": {
"name": "John Doe",
"routingNumber": "812345678",
"accountNumber": "1000000002",
"accountType": "Checking"
},
"userIds": ["user_12345"]
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10004"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10000"
}
]
}
}
}
}
List Transactions
List transactions with optional filtering and pagination.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/transactions/ |
| Required Scope | transactions |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| filter[userId] | string | (empty) | Filter transactions by user ID. Required if customerId not provided. |
| filter[customerId] | string | (empty) | Filter transactions by customer ID. Required if userId not provided. |
| filter[accountId] | string | (empty) | Optional. Filter transactions by account ID. |
| filter[since] | string | (empty) | Optional. Start date for filtering (ISO 8601). |
| filter[until] | string | (empty) | Optional. End date for filtering (ISO 8601). |
| filter[query] | string | (empty) | Optional. Free-text search across transaction fields (summary, counterparty name, etc.). |
| filter[fromAmount] | integer | (empty) | Optional. Minimum transaction amount in cents (inclusive). Use with filter[toAmount] for range filtering. |
| filter[toAmount] | integer | (empty) | Optional. Maximum transaction amount in cents (inclusive). Use with filter[fromAmount] for range filtering. |
| filter[type] | string | (empty) | Optional. Filter by transaction type(s). Comma-separated list or repeated param. Multiple types allowed. Valid values: transaction type identifiers (e.g. originatedAchTransaction, bookTransaction, wireTransaction). |
| filter[direction] | string | (empty) | Optional. Filter by direction (Credit or Debit). Single value or repeated param for multiple directions. |
| sort | string | -createdAt | Optional. Sort order. Use createdAt for ascending or -createdAt for descending by creation date. |
| page[limit] | integer | 100 | Optional. Maximum number of resources to return. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. |
Note
At least one of filter[customerId] or filter[userId] must be provided.
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/transactions?filter[userId]=user_12345' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns a paginated list of transactions with their details. Amounts and balances are in cents.
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data Required | Array of transactions | Array of transaction resources. |
Example Response:
{
"data": [
{
"type": "transaction",
"id": "12345",
"attributes": {
"amount": 50000,
"direction": "Credit",
"transactionType": "ACH",
"createdAt": "2021-06-02T10:15:22.123Z",
"balance": 150000,
"userIds": ["user_12345"]
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10004"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10000"
}
]
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 10,
"offset": 0
}
}
}