Skip to main content

Overview

Create a Stop Payment using amount and checkNumber when you want to prevent a Check Payment from being Processed. New Check Payments of a certain customer will be screened against the Stop Payments list (of the same customer) and if matched the Check Payment will be MarkedForReturn with a Stop Payment reason.

Create Check Stop Payment

The stopPayment created webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/stop-payments
Required Scopepayments-write
Data TypecheckStopPayment
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerOptional. The amount (in cents) to look on payments to stop.
checkNumberstringThe check number to look on a check payment to stop.
tagsobjectOptional. See Tags.
idempotencyKeystringOptional, but strongly recommended . See Idempotency.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe account that payments will be stopped for.
Example Request:
curl -X POST 'https://api.s.unit.sh/stop-payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "checkStopPayment",
"attributes": {
"amount": 23,
"checkNumber": "006753",
"tags": {
"test": "test"
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10002"
}
}
}
}
}'

Response

Response is a JSON:API document.

201 Created

FieldTypeDescription
datacheckStopPaymentThe requested resource after the operation was completed.
Example Response:
{
"type": "checkStopPayment",
"id": "1",
"attributes": {
"createdAt": "2023-02-05T18:32:34.682Z",
"updatedAt": "2023-02-05T18:32:34.682Z",
"amount": 21,
"status": "Active",
"tags": {
"test": "test"
},
"checkNumber": "006753"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10005"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10005"
}
]
},
"stoppedPayments": {
"data": [
{
"type": "checkPayment",
"id": "12345"
}
]
}
}
}

Create ACH Stop Payment

The stopPayment created webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/stop-payments
Required Scopepayments-write
Data TypeachStopPayment
Timeout (Seconds)5

Attributes

NameTypeDescription
minAmountintegerOptional. The amount (in cents) above which a payment will be stopped. At least one originatorName or minAmount must be provided.
originatorNameArray of stringsOptional. The name of the originator of the payment to look for in payments to stop. At least one originatorName or minAmount must be provided. See guide for further details.
directionstringDebit only.
expirationRFC3339 Date stringOptional. Date only (e.g. "2001-08-15").
isMultiUseBooleanOptional. Available only for ACH Stop Payments. False by default.
descriptionStringUp to 255 characters
tagsobjectOptional. See Tags.
idempotencyKeystringOptional, but strongly recommended . See Idempotency.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe account that payments will be stopped for.
Example Request:
curl -X POST 'https://api.s.unit.sh/stop-payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achStopPayment",
"attributes": {
"minAmount": 5001,
"originatorName": [
"Pied Pier",
"Pied Pier Inc."
],
"direction": "Debit",
"description": "Stop subscription payments greater than $50 to the gym.",
"isMultiUse": true,
"expiration": "2025-07-01",
"tags": {
"test": "test"
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10002"
}
}
}
}
}'

Response

Response is a JSON:API document.

201 Created

FieldTypeDescription
dataachStopPaymentThe requested resource after the operation was completed.
Example Response:
{
"type": "achStopPayment",
"id": "1",
"attributes": {
"createdAt": "2024-02-05T18:32:34.682Z",
"minAmount": 5001,
"originatorName": [
"Pied Pieper",
"Pied Piper Inc."
],
"direction": "Debit",
"isMultiUse": true,
"expiration": "2025-02-05",
"description": "Stop payments greater than $50 to the gym.",
"status": "Active",
"tags": {
"test": "test"
}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10005"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10005"
}
]
}
}
}

Stop Payment Status

When you create a stop payment it will be created with an Active status. You may disable it and move its status to Disabled.

The possible status values are:

StatusDescription
ActiveThe Stop Payment is active and will stop incoming check payments that fits its criteria.
DisabledThe Stop Payment is disabled and it will not stop any check payments.

Get by Id

Get a stop payment by id.

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

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataCheck Stop PaymentcheckStopPayment resource.
curl -X GET 'https://api.s.unit.sh/stop-payments/100' \
-H "Authorization: Bearer ${TOKEN}"

List

List stop payment resources. Filtering, paging and sorting can be applied.

VerbGET
Urlhttps://api.s.unit.sh/stop-payments
Required Scopepayments
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Number 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[tags]Tags (JSON)(empty)Optional. Filter stop payments by Tags.
sortstringsort=-createdAtOptional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order.
filter[since]ISO Local Date string(empty)Optional. Filters before the specified date. e.g. 2021-06-01
filter[until]ISO Local Date string(empty)Optional. Filters after the specified date. e.g. 2021-07-01
filter[status][]stringActiveOptional. Filter by status (Active, Disabled). Usage example: filter[status][0]=Disabled
filter[fromAmount]Integer(empty)Optional. Filters the Check Stop 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 Stop Payments that have an amount that is lower or equal to the specified amount (in cents). e.g. 7000
filter[noAmount]boolean(empty)Optional. If set to true, returns only Stop Payments with no amount . If set to false only returns Stop Payments with amount
filter[fromMinAmount]IntegerOptional. Filters ACH stop Payments that have minAmount higher than the specified amount (cents).
filter[toMinAmount]IntegerOptional. Filters ACH stop Payments that have minAmount lower than the specified amount (cents).
filter[noMinAmount]boolean(empty)Optional. If set to true, returns only ACH Stop Payments with no minAmount . If set to false only returns Stop Payments with minAmount
filter[originatorName]StringOptional.
filter[noOriginatorName]BooleanOptional.
filter[checkNumber]String(empty)Optional. Filter Stop Payments by check number (trimming leading zeros).
filter[type]String(empty)Optional. Either checkStopPayment or achStopPayment
curl -X GET 'https://api.s.unit.sh/stop-payments?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataArray of Check Stop PaymentArray of check stop payments resources.
Example Response:
{
"data": [
{
"type": "checkStopPayment",
"id": "1",
"attributes": {
"createdAt": "2023-02-05T18:32:34.682Z",
"updatedAt": "2023-02-05T18:32:34.682Z",
"amount": 21,
"status": "Active",
"tags": {
"test": "test"
},
"checkNumber": "006753"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10005"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10005"
}
]
}
}
},
{
"type": "checkStopPayment",
"id": "4",
"attributes": {
"createdAt": "2023-02-19T17:16:53.115Z",
"updatedAt": "2023-02-19T17:16:53.115Z",
"amount": 23,
"status": "Active",
"tags": {
"test": "test"
},
"checkNumber": "006753"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10005"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10005"
}
]
}
}
}
],
"meta": {
"pagination": {
"total": 2,
"limit": 100,
"offset": 0
}
}
}

Update AchStopPayment

Update an AchStopPayment.

VerbPATCH
Urlhttps://api.s.unit.sh/stop-payments/:stopPaymentId
Data TypeachStopPayment
Timeout (Seconds)5

Attributes

NameTypeDescription
tagsobjectOptional. See Updating Tags.
expirationRFC3339 Date stringOptional. Date only (e.g. "2026-08-15").
curl -X PATCH 'https://api.s.unit.sh/stop-payments/42'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achStopPayment",
"attributes": {
"tags": {
"newTag": "New tag value"
},
"expiration": "2025-05-05"
}
}
}'

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataAchStopPaymentThe requested resource after the operation was completed.
Example Response:
{
"data": {
"type": "achStopPayment",
"id": "42",
"attributes": {
"createdAt": "2024-02-05T18:32:34.682Z",
"minAmount": 5001,
"originatorName": [
"Pied Pieper",
"Pied Piper Inc."
],
"direction": "Debit",
"isMultiUse": true,
"expiration": "2025-05-05",
"description": "Stop payments greater than $50 to the gym.",
"status": "Active",
"tags": {
"test": "test",
"newTag": "New tag value"
}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10005"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10005"
}
]
}
}
}
}

Disable Stop Payment

Disable a Stop Payment by id. When a Stop Payment is disabled, the checkStopPayment disabled webhook event is fired and future check payments wont be stopped by this stop payment.

VerbPOST
Urlhttps://api.s.unit.sh/stop-payments/{id}/disable
Required Scopepayments
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
dataCheck Stop PaymentcheckStopPayment resource.
curl -X POST 'https://api.s.unit.sh/stop-payments/12/disable' \
-H "Authorization: Bearer ${TOKEN}"