---
title: Cancel batch
slug: crossriver-apis/payments/ach/apis/cancel-ach-client-batches
description: Cancel any incomplete payments and stop further processing of any remaining payments in a batch using POST /ach/v1/client-batches/{id}/cancel.
icon: {"apiMethod":"POST"}
createdAt: 2026-09-29T15:33:36.781Z
---

## Relevant webhooks

For this endpoint be sure you have [registered](https://public.qa.archbee.co/crossriver-apis/webhooks/cos-webhooks) for this webhook:&#x20;

- Ach.Batch.Canceled

## API reference

Cancel an ACH client batch by its ID. Cancels any incomplete transactions and stops further processing of any remaining transactions in the batch. If you need to cancel many transactions in a client batch, it's most efficient to cancel a client batch before all the transactions have imported rather than try to cancel a large number of transactions individually.

:::ApiMethodV2
```json
{
  "name": "Endpoint: /ach/v1/client-batches/{id}/cancel",
  "method": "POST",
  "url": "https://sandbox.crbcos.com/ach/v1/client-batches/{id}/cancel",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "WUX7AaxzkOpsgPo65ZZjE",
        "language": "curl",
        "code": "curl --location 'https://sandbox.crbcos.com/ach/v1/client-batches/63f87c2b-38e9-438f-a3c8-b07401212511/cancel' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer <token>' \\\n--data '\n'",
        "customLabel": ""
      },
      {
        "id": "P41ALNau3BkepDO6xriR1",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'POST',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/ach/v1/client-batches/63f87c2b-38e9-438f-a3c8-b07401212511/cancel',\n  'headers': {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <token>'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData =  \"\\n\";\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "BRFrvglZJDShv2RBnxsUN",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"sandbox.crbcos.com\")\npayload = \"\\n\"\nheaders = {\n  'Content-Type': 'application/json',\n  'Authorization': 'Bearer <token>'\n}\nconn.request(\"POST\", \"/ach/v1/client-batches/63f87c2b-38e9-438f-a3c8-b07401212511/cancel\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      },
      {
        "id": "mxQVrvny0M0XwlRytSyoT",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/ach/v1/client-batches/63f87c2b-38e9-438f-a3c8-b07401212511/cancel\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer <token>\"\nrequest.body = \"\\n\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "RiliGkMNvLA6EhPw2algR",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://sandbox.crbcos.com/ach/v1/client-batches/63f87c2b-38e9-438f-a3c8-b07401212511/cancel\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`\n`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"Authorization\", \"Bearer <token>\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "WUX7AaxzkOpsgPo65ZZjE"
  },
  "results": {
    "languages": [
      {
        "id": "XglH3ZPSjyiib2Z5j9bub",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"id\": \"63f87c2b-38e9-438f-a3c8-b07401212511\",\n  \"accountNumber\": \"2151546989\",\n  \"referenceId\": \"A248NEY051X2\",\n  \"paymentType\": \"Origination\",\n  \"direction\": \"Outbound\",\n  \"status\": \"Canceled\",\n  \"source\": \"Api\",\n  \"postingType\": \"Aggregate\",\n  \"postingCode\": \"OK\",\n  \"posting\": \"Canceled\",\n  \"originator\": {\n    \"routingNumber\": \"021214891\",\n    \"accountNumber\": \"2151546989\",\n    \"accountType\": \"Checking\",\n    \"name\": \"Cross River Bank\",\n    \"identification\": \"021214891\"\n  },\n  \"receiver\": {\n    \"routingNumber\": \"021200339\",\n    \"accountNumber\": \"6546543213\",\n    \"accountType\": \"Checking\",\n    \"name\": \"Glenn Quagmire\",\n    \"identification\": \"XYZ123\"\n  },\n  \"secCode\": \"WEB\",\n  \"description\": \"JulyFees\",\n  \"transactionType\": \"Pull\",\n  \"amount\": 19,\n  \"serviceType\": \"SameDay\",\n  \"extendedDetails\": {\n    \"paymentType\": \"S\"\n  },\n  \"effectiveDate\": \"230905\",\n  \"traceNumber\": \"021214891385537\",\n  \"wasReturned\": false,\n  \"wasCorrected\": false,\n  \"holdDays\": 0,\n  \"original\": {\n    \"paymentId\": \"63f87c2b-38e9-438f-a3c8-b07401212511\"\n  },\n  \"createdAt\": \"2023-09-05T13:32:44.637-04:00\",\n  \"canceledAt\": \"2023-09-05T13:33:14.7192084-04:00\",\n  \"partnerId\": \"1e5d3f04-ae24-4af6-9e30-aecf012b99dd\",\n  \"productId\": \"cc62e17f-5912-483e-9e42-aed30112fbb6\",\n  \"lastModifiedAt\": \"2023-09-05T13:33:14.7192084-04:00\",\n  \"purpose\": \"sample payment\",\n  \"clientIdentifier\": \"9a6c6c07-6c6d-4cff-91f6-901b90c4d2f9\"\n}"
      }
    ],
    "selectedLanguageId": "XglH3ZPSjyiib2Z5j9bub"
  },
  "request": {
    "pathParameters": [
      {
        "name": "id",
        "kind": "required",
        "type": "string",
        "description": "The unique ID of the batch payment, received in the batch origination response as the id attribute. This ID is in GUID format.",
        "children": []
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "Unique ID for the client batch request. This ID is in the GUID format."
    },
    {
      "name": "referenceId",
      "kind": "optional",
      "type": "string",
      "description": "Unique CR reference ID for the payment. The reference ID always begins with the first letter of the rail. For ACH the reference ID starts with 'A'.",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "Status of the transaction:\n- Processing\n- Imported\n- Canceling",
      "children": []
    },
    {
      "name": "accountNumber",
      "kind": "optional",
      "type": "string",
      "description": "The Cross River  account number from which the batch payments originate. Depending on the account type, the number of digits will vary. The first digit indicates the kind of account.",
      "children": []
    },
    {
      "name": "paymentCount",
      "kind": "optional",
      "type": "integer",
      "description": "The number of unique payments in the batch (up to 5000)",
      "children": []
    },
    {
      "name": "debitTotal",
      "kind": "optional",
      "type": "integer",
      "description": "The total amount to be credited to the originator account",
      "children": []
    },
    {
      "name": "creditTotal",
      "kind": "optional",
      "type": "integer",
      "description": "The total amount to be debited from the originator account",
      "children": []
    },
    {
      "name": "importCount",
      "kind": "optional",
      "type": "integer",
      "description": "Indicates how many payments have been processed at the time of the response",
      "children": []
    },
    {
      "name": "clientIdentifier",
      "kind": "optional",
      "type": "string",
      "description": "Use this attribute to add your own unique identifying string to a payment call or COS record. This attribute is useful for idempotency purposes.",
      "children": []
    },
    {
      "name": "productId",
      "kind": "optional",
      "type": "string",
      "description": "ID in GUID format of your specific product type on which the account is based. Provided by CR. In this case, the CR account involved in the batch payment.",
      "children": []
    },
    {
      "name": "partnerId",
      "kind": "optional",
      "type": "string",
      "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
      "children": []
    },
    {
      "name": "createdAt",
      "kind": "optional",
      "type": "string",
      "description": "When the client batch was created after the request was received",
      "children": []
    },
    {
      "name": "importedAt",
      "kind": "optional",
      "type": "string",
      "description": "The time when the import count matches the total number of payments in the batch",
      "children": []
    },
    {
      "name": "lastModifiedAt",
      "kind": "optional",
      "type": "string",
      "description": "Internal Cross River value. Date and time the database entry was last modified. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "paymentIdentifiers",
      "kind": "optional",
      "type": "array",
      "description": "Unique identifier for each payment in the batch, in GUID format",
      "children": []
    }
  ],
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "endpoint-achv1client-batchesidcancel",
  "legacyHash": "ZQV3f3wS-iOEurDOFpWuU"
}
```
:::

****
