APIs
Create ACH payment to linked 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 | integer | The amount (in cents). |
| direction | string | The direction in which the funds flow. |
| description | string | Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty. |
| addenda Optional | string | Optional, additional payment description (maximum of 80 characters), not all institutions present that. |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | object | Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance). |
| verifyCounterpartyBalance Optional | boolean | Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds. |
| sameDay Optional | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | Optional. See Use a custom SEC Code. |
| clearingDaysOverride Optional | integer | Optional. See Dynamic Clearing Period |
Relationships
| Name | Type | Description |
|---|---|---|
| account | JSON:API Relationship | The Deposit Account originating the payment. |
| counterparty | JSON:API Relationship | The Counterparty the payment to be made to. |
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.
{
"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 with Plaid token
Originates an ACH payment to a counterparty which is verified by Plaid.
For more information on using Plaid, please read Unit's Plaid partnership guide
| Verb | POST |
| URL | https://api.s.unit.sh/payments |
| Required Scope | payments-write or payments-write-ach-debit or ach-payments-write |
| Data Type | achPayment |
| Timeout (Seconds) | 60 |
You can use scope payments-write-ach-debit only with ACH Debit payments.
Attributes
| Name | Type | Description |
|---|---|---|
| amount | integer | The amount (in cents) |
| direction | string | The direction in which the funds flow |
| description | string | Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty. |
| addenda Optional | string | Optional, additional payment description (maximum of 80 characters), not all institutions present that. |
| idempotencyKey Optional | string | Optional. See idempotency |
| counterpartyName Optional | string | Optional. Name of the person or company that owns the counterparty bank account. See note below for important details. |
| plaidProcessorToken | string | See Create Plaid processor token API |
| tags Optional | object | Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance). |
| verifyCounterpartyBalance Optional | boolean | Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds. |
| sameDay Optional | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | Optional. See Use a custom SEC Code. |
| clearingDaysOverride Optional | integer | Optional. See Dynamic Clearing Period |
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:
- Provide
counterpartyNamein the request - Include the counterparty name directly when creating the ACH payment - Use a pre-existing counterparty - Create a Counterparty first (which stores the name), then use Create ACH payment to linked 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
| Name | Type | Description |
|---|---|---|
| account | JSON:API Relationship | The Deposit Account originating the payment |
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
| Name | Type | Description |
|---|---|---|
| data | ACH Payment | The 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.
{
"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"
}
}
}
}
}
Create ACH payment to inline Counterparty
Originates an ACH payment to a counterparty which is specified inline (vs to a linked Counterparty Resource).
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.
| Verb | POST |
| URL | https://api.s.unit.sh/payments |
| Required Scope | payments-write or ach-payments-write |
| Data Type | achPayment |
| Timeout (Seconds) | 60 |
Attributes
| Name | Type | Description |
|---|---|---|
| amount | integer | The amount (in cents). |
| direction | string | The direction in which the funds flow. |
| counterparty | Counterparty | The party on the other side of the ACH payment. |
| description | string | Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty. |
| addenda Optional | string | Optional, additional payment description (maximum of 80 characters), not all institutions present that. |
| idempotencyKey Optional | string | Optional. See Idempotency. |
| tags Optional | object | Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance). |
| sameDay Optional | boolean | Optional, default is false. See Same Day ACH. |
| secCode Optional | string | Optional. See Use a custom SEC Code. |
| clearingDaysOverride Optional | integer | Optional. See Dynamic Clearing Period |
Relationships
| Name | Type | Description |
|---|---|---|
| account | JSON:API Relationship | The Deposit Account originating the payment. |
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.
{
"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.
| Verb | PATCH |
| URL | https://api.s.unit.sh/payments/:paymentId |
| Required Scope | payments-write |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| tags | object | See Updating Tags. |
| clearingDaysOverride | integer | Only supports ACH Payments with direction Debit in status PendingReview or Pending. See Dynamic Clearing Period |
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
| Name | Type | Description |
|---|---|---|
| data | AchPayment | The updated ACH payment resource. |
Cancel ACH Payment
Cancels a previously processed ACH payment. Only payments with status Pending or PendingReview can be canceled.
| Verb | POST |
| URL | https://api.s.unit.sh/payments/{paymentId}/cancel |
| Required Scope | payments-write |
| Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | ACH Payment | The 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.
| Verb | POST |
| URL | https://api.s.unit.sh/payments/{paymentId}/clear |
| Required Scope | payments-write |
| Timeout (Seconds) | 5 |
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | ACH Payment | The 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).
| Verb | POST |
| URL | https://api.s.unit.sh/payments/ach/expected-completion-date |
| Required Scope | payments |
| Data Type | achExpectedCompletionDate |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| direction | string | The direction of the ACH payment. One of Credit or Debit. |
| amount | integer | The payment amount (in cents). Must be ≥ 1. |
| sameDay Optional | boolean | Optional, default is false. Whether same-day ACH processing is requested. See Same Day ACH. |
| submissionAt Optional | ISO 8601 datetime | Optional, defaults to the current time. Hypothetical submission time used for the estimate. |
Relationships
| Name | Type | Description |
|---|---|---|
| account | JSON:API Relationship | The Deposit Account to estimate the date for. |
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
| Name | Type | Description |
|---|---|---|
| data | JSON:API resource | The estimated date resource. |
Response Attributes
| Name | Type | Description |
|---|---|---|
| expectedCompletionDate | RFC3339 Date string | Returned for Credit payments. The date the payment is expected to arrive at the receiving bank. |
| expectedSettlementDate | RFC3339 Date string | Returned for Debit payments. The date funds are expected to settle in the deposit account. |
| processingWindow | string | The processing window used for the estimate. One of standard or same_day. |
{
"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.
{
"data": {
"type": "achExpectedCompletionDate",
"attributes": {
"expectedSettlementDate": "2025-01-17",
"processingWindow": "standard"
}
}
}