Skip to main content

APIs

Create ACH payment to linked 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

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.
addendaOptional
string
Optional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKeyOptional
string
Optional. See Idempotency.
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
verifyCounterpartyBalanceOptional
boolean
Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds.
sameDayOptional
boolean
Optional, default is false. See Same Day ACH.
secCodeOptional
string
Optional. See Use a custom SEC Code.
clearingDaysOverrideOptional
integer

Relationships

account
JSON:API Relationship
The Deposit Account originating the payment.
counterparty
JSON:API Relationship
The 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 with 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

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.
addendaOptional
string
Optional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKeyOptional
string
Optional. See idempotency
counterpartyNameOptional
string
Optional. Name of the person or company that owns the counterparty bank account. See note below for important details.
plaidProcessorToken
string
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
verifyCounterpartyBalanceOptional
boolean
Optional, default is false. Verify the counterparty balance, if balance verification fails the payment will be rejected with reason set to CounterpartyInsufficientFunds.
sameDayOptional
boolean
Optional, default is false. See Same Day ACH.
secCodeOptional
string
Optional. See Use a custom SEC Code.
clearingDaysOverrideOptional
integer
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 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

account
JSON:API Relationship
The 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

data
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.

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"
}
}
}
}
}

Create ACH payment to inline Counterparty

Originates an ACH payment to a counterparty which is specified inline (vs to a linked 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

amount
integer
The amount (in cents).
direction
string
The direction in which the funds flow.
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.
addendaOptional
string
Optional, additional payment description (maximum of 80 characters), not all institutions present that.
idempotencyKeyOptional
string
Optional. See Idempotency.
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).
sameDayOptional
boolean
Optional, default is false. See Same Day ACH.
secCodeOptional
string
Optional. See Use a custom SEC Code.
clearingDaysOverrideOptional
integer

Relationships

account
JSON:API Relationship
The 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

tags
object
clearingDaysOverride
integer
Only 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

data
The 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

data
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.

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

Response

Response is a JSON:API document.

200 OK

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