APIs
Get Payment by Id
Get a payment by id.
| Verb | GET |
| URL | https://api.s.unit.sh/payments/{id} |
| Required Scope | payments |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| include | string | (empty) | Optional. A comma-separated list of related resources to include in the response. Related resources include: customer, account, transaction. See Getting Related Resources |
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | One of the following types (ACH Payment, Book Payment, Realtime Payment or Wire Payment) | Payment resource. |
| included | Array of DepositAccount or Customer or Transaction | Array of resources requested by the include query parameter. |
curl -X GET 'https://api.s.unit.sh/payments/100' \
-H "Authorization: Bearer ${TOKEN}"
List Payments
List payments resources. Filtering, paging and sorting can be applied.
| Verb | GET |
| URL | https://api.s.unit.sh/payments |
| Required Scope | payments |
| Timeout (Seconds) | 120 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
| filter[accountId] | string | (empty) | Optional. Filters the results by the specified account id. |
| filter[customerId] | string | (empty) | Optional. Filters the results by the specified customer id. |
| filter[counterpartyAccountId] | string | (empty) | Optional. Filters the Payments by the account id of the specified counterparty. |
| filter[tags] | Tags (JSON) | (empty) | Optional. Filter Payments by Tags. |
| filter[status][] | string | (empty) | Optional. Filter Payments by status. Valid values include Pending, PendingReview, Rejected, Clearing, Sent, Canceled, and Returned. Usage example: filter[status][0]=Pending&filter[status][1]=PendingReview |
| filter[type][] | string | (empty) | Optional. Filter Payments by type. Valid values: Ach, Book, Wire, Realtime, International. Usage example: filter[type][0]=Ach |
| filter[direction][] | string | (empty) | Optional. Filter Payments by direction (Debit, Credit). Usage example: filter[direction][0]=Debit |
| filter[since] | RFC3339 Date string | (empty) | Optional. Filters the Payments that occurred after the specified date. e.g. 2020-01-13T16:01:19.346Z |
| filter[until] | RFC3339 Date string | (empty) | Optional. Filters the Payments that occurred before the specified date. e.g. 2020-01-02T20:06:23.486Z |
| filter[fromAmount] | Integer | (empty) | Optional. Filters the Payments 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 Payments that have an amount that is lower or equal to the specified amount (in cents). e.g. 7000 |
| filter[recurringPaymentId] | string | (empty) | Optional. Filters the results by the specified recurring payment id. |
| filter[feature][] | string | (empty) | Optional. Filter Payments by Payment feature (SameDay, RecurringPayment). Usage example: filter[feature][0]=SameDay |
| sort | string | sort=-createdAt | Optional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order. |
| include | string | (empty) | Optional. A comma-separated list of related resources to include in the response. Related resources include: customer, account, transaction. See Getting Related Resources |
curl -X GET 'https://api.s.unit.sh/payments?page[limit]=20&page[offset]=10&filter[type][]=Ach&filter[status][]=Pending&filter[status][]=PendingReview' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | Array of Payments (ACH Payment, Book Payment, Realtime Payment or Wire Payment) | Array of payment resources. |
| included | Array of DepositAccount or Customer or Transaction | Array of resources requested by the include query parameter. |
| meta | JSON object that contains pagination data | Pagination data includes offset, limit and total (estimated total items). |
Example Response:
{
"data": [
{
"type": "achPayment",
"id": "50",
"attributes": {
"createdAt": "2020-01-13T16:01:19.346Z",
"status": "Pending",
"counterparty": {
"routingNumber": "812345678",
"accountNumber": "12345569",
"accountType": "Checking",
"name": "Jane Doe"
},
"description": "Funding",
"direction": "Credit",
"amount": 10000
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "555"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "99823"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "4567"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "4003"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 100,
"offset": 0
}
}
}
Note
Creating many payments at once? Use Bulk Payments to submit them in a single request. Unit handles batching, retries, and rate limiting so you do not have to manage thousands of individual creates.
Create ACH payment (existing Counterparty)
Originates an ACH payment to a Counterparty. The counterparty should be created separately through Create Counterparty.
| Verb | POST |
| URL | https://api.s.unit.sh/payments |
| Required Scope | payments-write-counterparty or payments-write or ach-payments-write |
| Data Type | achPayment |
| Timeout (Seconds) | 60 |
Attributes
| Name | Type | Description |
|---|---|---|
| amount Required | integer | The amount (in cents). |
| direction Required | string | The direction in which the funds flow. |
| description Required | string | Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty. |
| addenda | string | Optional, additional payment description (maximum of 80 characters), not all institutions present that. |
| idempotencyKey Optional | string | See Idempotency. |
| tags Optional | object | See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance). |
| verifyCounterpartyBalance | boolean | Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds. |
| sameDay | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | See Use a custom SEC Code. |
| clearingDaysOverride Optional | integer | See Dynamic Clearing Period |