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 Stop Payment#
The stopPayment created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/stop-payments |
Required Scope | payments-write |
Data Type | stopPayment |
Timeout (Seconds) | 5 |
#
AttributesName | Type | Description |
---|---|---|
amount | integer | The amount (in cents) to look on payments to stop. |
checkNumber | string | The check number to look on a check payment to stop. |
tags | object | Optional. See Tags. |
idempotencyKey | string | Optional, but strongly recommended . See Idempotency. |
#
RelationshipsName | Type | Description |
---|---|---|
account | JSON:API Relationship | The account that payments will be stopped for. |
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": "stopPayment", "attributes": { "amount": 23, "checkNumber": "006753", "tags": { "test": "test" } }, "relationships": { "account": { "data": { "type": "depositAccount", "id": "10002" } } } }}'
#
ResponseResponse is a JSON:API document.
#
201 CreatedField | Type | Description |
---|---|---|
data | StopPayment | The requested resource after the operation was completed. |
{ "type": "stopPayment", "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" } ] } }}
#
Stop Payment StatusWhen 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:
Status | Description |
---|---|
Active | The Stop Payment is active and will stop incoming check payments that fits its criteria. |
Disabled | The Stop Payment is disabled and it will not stop any check payments. |
Get by Id#
Get a stop payment by id.
Verb | GET |
Url | https://api.s.unit.sh/stop-payments/{id} |
Required Scope | payments |
Timeout (Seconds) | 5 |
#
ResponseResponse is a JSON:API document.
#
200 OKField | Type | Description |
---|---|---|
data | Stop Payment | StopPayment 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.
Verb | GET |
Url | https://api.s.unit.sh/stop-payments |
Required Scope | payments |
Timeout (Seconds) | 5 |
#
Query ParametersName | Type | Default | Description |
---|---|---|---|
page[limit] | integer | 100 | Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
page[offset] | integer | 0 | 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[tags] | Tags (JSON) | (empty) | Optional. Filter stop payments by Tags. |
sort | string | sort=-createdAt | Optional. 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][] | string | Active | Optional. Filter by status (Active , Disabled ). Usage example: filter[status][0]=Disabled |
filter[fromAmount] | Integer | (empty) | Optional. Filters the 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[checkNumber] | String | (empty) | Optional. Filter Stop Payments by check number (trimming leading zeros). |
curl -X GET 'https://api.s.unit.sh/stop-payments?page[limit]=20&page[offset]=10' \-H "Authorization: Bearer ${TOKEN}"
#
ResponseResponse is a JSON:API document.
#
200 OKField | Type | Description |
---|---|---|
data | Array of Stop Payment | Array of stop payment resources. |
{ "data": [ { "type": "stopPayment", "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": "stopPayment", "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 } }}
Disable Stop Payment#
Disable a Stop Payment by id. When a Stop Payment is disabled, the stopPayment disabled webhook event is fired and future check payments wont be stopped by this stop payment.
Verb | POST |
Url | https://api.s.unit.sh/stop-payments/{id}/disable |
Required Scope | payments |
Timeout (Seconds) | 5 |
#
ResponseResponse is a JSON:API document.
#
200 OKField | Type | Description |
---|---|---|
data | Stop Payment | StopPayment resource. |
curl -X POST 'https://api.s.unit.sh/stop-payments/12/disable' \-H "Authorization: Bearer ${TOKEN}"