Skip to main content

APIs

Get Payment by Id​

Get a payment by id.

VerbGET
URLhttps://api.s.unit.sh/payments/{id}
Required Scopepayments
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
includestring(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​

NameTypeDescription
dataOne of the following types (ACH Payment, Book Payment, Realtime Payment or Wire Payment)Payment resource.
includedArray of DepositAccount or Customer or TransactionArray 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.

VerbGET
URLhttps://api.s.unit.sh/payments
Required Scopepayments
Timeout (Seconds)120

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[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
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, 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​

NameTypeDescription
dataArray of Payments (ACH Payment, Book Payment, Realtime Payment or Wire Payment)Array of payment resources.
includedArray of DepositAccount or Customer or TransactionArray of resources requested by the include query parameter.
metaJSON object that contains pagination dataPagination 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.

VerbPOST
URLhttps://api.s.unit.sh/payments
Required Scopepayments-write-counterparty or payments-write or ach-payments-write
Data TypeachPayment
Timeout (Seconds)60

Attributes​

NameTypeDescription
amount RequiredintegerThe amount (in cents).
direction RequiredstringThe direction in which the funds flow.
description RequiredstringPayment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.
addendastringOptional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKey OptionalstringSee Idempotency.
tags OptionalobjectSee Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
verifyCounterpartyBalancebooleanOptional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds.
sameDaybooleanOptional, default is false. See Same Day ACH.
secCode OptionalstringSee Use a custom SEC Code.
clearingDaysOverride OptionalintegerSee Dynamic Clearing Period

Relationships​

NameTypeDescription
account RequiredJSON:API RelationshipThe Deposit Account originating the payment.
counterparty RequiredJSON:API RelationshipThe Counterparty the payment to be made to.
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achPayment",
"attributes": {
"amount": 10000,
"direction": "Credit",
"description": "Funding"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "4567"
}
}
}
}
}'

Response​

Response is a JSON:API document.

Example Response:
{
"data": {
"type": "achPayment",
"id": "50",
"attributes": {
"createdAt": "2020-01-13T16:01:19.346Z",
"status": "Pending",
"reason": null,
"counterparty": {
"routingNumber": "812345678",
"accountNumber": "12345569",
"accountType": "Checking",
"name": "Jane Doe"
},
"description": "Funding",
"direction": "Credit",
"amount": 10000,
"tags": {
"purpose": "internal"
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "555"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "99823"
}
},
"counterparty": {
"data": {
"type": "counterparty",
"id": "4567"
}
}
}
}
}

Create ACH payment (Plaid token)​

Originates an ACH payment to a counterparty which is verified by Plaid.

Suggestion

For more information on using Plaid, please read Unit's Plaid partnership guide

VerbPOST
URLhttps://api.s.unit.sh/payments
Required Scopepayments-write or payments-write-ach-debit or ach-payments-write
Data TypeachPayment
Timeout (Seconds)60
Note

You can use scope payments-write-ach-debit only with ACH Debit payments.

Attributes​

NameTypeDescription
amount RequiredintegerThe amount (in cents)
direction RequiredstringThe direction in which the funds flow
description RequiredstringPayment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.
addendastringOptional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKey OptionalstringSee idempotency
counterpartyName OptionalstringName of the person or company that owns the counterparty bank account. See note below for important details.
plaidProcessorToken RequiredstringSee Create Plaid processor token API
tags OptionalobjectSee Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
verifyCounterpartyBalancebooleanOptional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds.
sameDaybooleanOptional, default is false. See Same Day ACH.
secCode OptionalstringSee Use a custom SEC Code.
clearingDaysOverride OptionalintegerSee Dynamic Clearing Period
Counterparty Name and Plaid Identity

When creating an ACH payment with a Plaid processor token, the counterparty name is required for the ACH payment. If counterpartyName is not provided in the request, Unit will call Plaid's Identity API to retrieve the account owner's name.

To avoid the Identity API call, you can either:

  1. Provide counterpartyName in the request - Include the counterparty name directly when creating the ACH payment
  2. Use a pre-existing counterparty - Create a Counterparty first (which stores the name), then use Create ACH payment (existing Counterparty) instead

This is relevant if your Plaid integration does not have the Identity product enabled, as the Identity API call will fail in that case.

Relationships​

NameTypeDescription
account RequiredJSON:API RelationshipThe Deposit Account originating the payment
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achPayment",
"attributes": {
"amount": 10000,
"direction": "Debit",
"plaidProcessorToken": "processor-5a62q307-ww0a-6737-f6db-pole26004556",
"description": "Funding"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
}
}
}
}'

Response​

Response is a JSON:API document.

201 Created​

NameTypeDescription
dataACH PaymentThe target resource after the operation was completed.

408 Request Timeout​

The request to Plaid has timed-out, probably because of a technical issue with the counterparty bank. You might want to retry the request without the verifyCounterpartyBalance flag.

Example Response:
{
"data": {
"type": "achPayment",
"id": "50",
"attributes": {
"createdAt": "2020-01-13T16:01:19.346Z",
"status": "Pending",
"reason": null,
"counterparty": {
"routingNumber": "812345673",
"accountNumber": "12345569",
"accountType": "Checking",
"name": "Jane Doe"
},
"description": "Funding",
"direction": "Debit",
"amount": 10000,
"tags": {
"purpose": "internal"
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "555"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "99823"
}
}
}
}
}

Create ACH payment​

Originates an ACH payment to a counterparty which is specified inline (vs to an existing Counterparty Resource).

Note

Originating ACH debits requires capturing the authorization of the account owner and therefore originating ACH debits to inline counterparties is not allowed by default. If your use case requires this capability, please contact Unit.

VerbPOST
URLhttps://api.s.unit.sh/payments
Required Scopepayments-write or ach-payments-write
Data TypeachPayment
Timeout (Seconds)60

Attributes​

NameTypeDescription
amount RequiredintegerThe amount (in cents).
direction RequiredstringThe direction in which the funds flow.
counterparty RequiredCounterpartyThe party on the other side of the ACH payment.
description RequiredstringPayment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.
addendastringOptional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKey OptionalstringSee Idempotency.
tags OptionalobjectSee Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
sameDaybooleanOptional, default is false. See Same Day ACH.
secCode OptionalstringSee Use a custom SEC Code.
clearingDaysOverride OptionalintegerSee Dynamic Clearing Period

Relationships​

NameTypeDescription
account RequiredJSON:API RelationshipThe Deposit Account originating the payment.
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achPayment",
"attributes": {
"amount": 10000,
"direction": "Credit",
"counterparty": {
"routingNumber": "812345673",
"accountNumber": "12345569",
"accountType": "Checking",
"name": "Jane Doe"
},
"description": "Funding"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
}
}
}
}'

Response​

Response is a JSON:API document.

Example Response:
{
"data": {
"type": "achPayment",
"id": "50",
"attributes": {
"createdAt": "2020-01-13T16:01:19.346Z",
"status": "Pending",
"reason": null,
"counterparty": {
"routingNumber": "812345673",
"accountNumber": "12345569",
"accountType": "Checking",
"name": "Jane Doe"
},
"description": "Funding",
"direction": "Credit",
"amount": 10000,
"tags": {
"purpose": "internal"
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "555"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "99823"
}
}
}
}
}

Update ACH Payment​

Update an ACH Payment.

VerbPATCH
URLhttps://api.s.unit.sh/payments/:paymentId
Required Scopepayments-write
Timeout (Seconds)5

Attributes​

NameTypeDescription
tags RequiredobjectSee Updating Tags.
clearingDaysOverride RequiredintegerOnly supports ACH Payments with direction Debit in status PendingReview or Pending. See Dynamic Clearing Period
Update an ACH payment:
curl -X PATCH 'https://api.s.unit.sh/payments/:paymentId'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achPayment",
"attributes": {
"tags": {
"by": null,
"uuid": "83033b64-38f8-4dbc-91a1-313ff0156d02"
},
"clearingDaysOverride": 3
}
}
}'

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataAchPaymentThe updated ACH payment resource.

Cancel ACH Payment​

Cancels a previously processed ACH payment. Only payments with status Pending or PendingReview can be canceled.

VerbPOST
URLhttps://api.s.unit.sh/payments/{paymentId}/cancel
Required Scopepayments-write
Timeout (Seconds)5

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataACH PaymentThe canceled payment.
curl -X POST 'https://api.s.unit.sh/payments/61212/cancel' \
-H "Authorization: Bearer ${TOKEN}"

Clear ACH Debit Payment​

Clears an ACH debit payment while in clearing status. Overrides the original clearing period, making funds available immediately. Requires the Dynamic Clearing Period feature to be enabled.

VerbPOST
URLhttps://api.s.unit.sh/payments/{paymentId}/clear
Required Scopepayments-write
Timeout (Seconds)5

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataACH PaymentThe cleared payment.
curl -X POST 'https://api.s.unit.sh/payments/61212/clear' \
-H "Authorization: Bearer ${TOKEN}"

Get Expected ACH Completion Date​

Returns the expected completion or settlement date for an ACH payment before creating it. Use this endpoint to display estimated timelines to end users without initiating a payment.

  • For Credit payments, the response contains expectedCompletionDate — the date the payment is expected to arrive at the receiving bank.
  • For Debit payments, the response contains expectedSettlementDate — the date funds are expected to settle (completion date plus the account's clearing days).

The estimate factors in bank cutoff times, same-day vs. standard processing windows, banking day rules (weekends and federal holidays), and clearing days from the account's ACH terms (debits only).

VerbPOST
URLhttps://api.s.unit.sh/payments/ach/expected-completion-date
Required Scopepayments
Data TypeachExpectedCompletionDate
Timeout (Seconds)5

Attributes​

NameTypeDescription
direction RequiredstringThe direction of the ACH payment. One of Credit or Debit.
amount RequiredintegerThe payment amount (in cents). Must be ≥ 1.
sameDaybooleanOptional, default is false. Whether same-day ACH processing is requested. See Same Day ACH.
submissionAtISO 8601 datetimeOptional, defaults to the current time. Hypothetical submission time used for the estimate.

Relationships​

NameTypeDescription
account RequiredJSON:API RelationshipThe Deposit Account to estimate the date for.
Example Request:
curl -X POST 'https://api.s.unit.sh/payments/ach/expected-completion-date'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achExpectedCompletionDate",
"attributes": {
"direction": "Credit",
"amount": 10000,
"sameDay": false
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "555"
}
}
}
}
}'

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataJSON:API resourceThe estimated date resource.

Response Attributes​

NameTypeDescription
expectedCompletionDateRFC3339 Date stringReturned for Credit payments. The date the payment is expected to arrive at the receiving bank.
expectedSettlementDateRFC3339 Date stringReturned for Debit payments. The date funds are expected to settle in the deposit account.
processingWindowstringThe processing window used for the estimate. One of standard or same_day.
Example Credit Response:
{
"data": {
"type": "achExpectedCompletionDate",
"attributes": {
"expectedCompletionDate": "2025-01-15",
"processingWindow": "standard"
}
}
}

For debit payments, the response includes expectedSettlementDate instead of expectedCompletionDate. The settlement date accounts for the clearing days configured on the account's ACH terms.

Example Debit Response:
{
"data": {
"type": "achExpectedCompletionDate",
"attributes": {
"expectedSettlementDate": "2025-01-17",
"processingWindow": "standard"
}
}
}