---
title: "Cancel a payment batch · Payment Batches · COUNT Partner API"
description: "Cancels an unpaid batch and releases its bills. POST /partners/payment-batches/{uuid}/cancel"
canonical: "https://developers.getcount.com/reference/payment-batches/cancel-payment-batch"
source: "https://developers.getcount.com/reference/payment-batches/cancel-payment-batch"
---
[Payment Batches](https://developers.getcount.com/reference/payment-batches) / Cancel a payment batch

# Cancel a payment batch

POST NZ· GST `/partners/payment-batches/{uuid}/cancel`

Cancels an unpaid batch and releases its bills.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Fpayment-batches%2F%7Buuid%7D%2Fcancel)

[Supplier Bank Accounts API](https://developers.getcount.com/reference/vendor-bank-accounts) [Bills API](https://developers.getcount.com/reference/bills)

#### Path parameters

`uuid` uuid required

The payment batch UUID.

#### Responses

`200` The batch.

`400` The batch is already paid.

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per user of each app, or 10,000 per minute per app). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous POST Reject a payment batch](https://developers.getcount.com/reference/payment-batches/reject-payment-batch) [Next POST Generate the bank file](https://developers.getcount.com/reference/payment-batches/generate-payment-batch-bank-file)

POST `https://api.getcount.com/partners/payment-batches/{uuid}/cancel`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/payment-batches/3fa85f64-5717-4562-b3fc-2c963f66afa6/cancel';
const timestamp = Math.floor(Date.now() / 1000).toString();
const bodyString = '';

const bodyHash = '';
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/payment-batches/3fa85f64-5717-4562-b3fc-2c963f66afa6/cancel`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
});

console.log(await response.json());
```

Response · 200

```json
{
  "status": "success",
  "message": "Payment batch cancelled",
  "data": {
    "paymentBatch": {
      "id": "0193a1c2-7b4d-7e10-9a2f-5c6d7e8f9b01",
      "reference": "BATCH-261120-01",
      "status": "draft",
      "paymentDate": "2026-11-20",
      "fromAccount": {
        "id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a10",
        "name": "ASB Business"
      },
      "fromAccountNumber": "12-3456-7890123-00",
      "bank": "asb",
      "bankCountry": "NZ",
      "statementDetails": "Supplier run",
      "total": "1250.0000",
      "createdBy": {
        "id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a03",
        "firstName": "Ana",
        "lastName": "Reyes",
        "email": "ana@example.com"
      },
      "downloadedAt": null,
      "sentAt": null,
      "paidAt": null,
      "reconciledAt": null,
      "createdAt": "2026-01-15T10:30:00.000Z",
      "updatedAt": "2026-01-28T14:22:30.000Z",
      "lines": [
        {
          "id": "0193a1c2-7b4d-7e10-9a2f-5c6d7e8f9b02",
          "bill": {
            "id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a01",
            "billNumber": "INV-0042"
          },
          "vendor": {
            "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
            "name": "Harbourside Office Supplies Ltd"
          },
          "payeeBankAccount": {
            "nzBankAccount": "12-3456-7890123-001",
            "accountName": "Harbourside Office Supplies"
          },
          "particulars": "Acme Ltd",
          "code": "INV-0042",
          "reference": "ACME-001",
          "dueAmount": "1250.0000",
          "paymentAmount": "1250.0000",
          "reconciledAt": null
        }
      ],
      "approvers": [
        {
          "user": {
            "id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a02",
            "firstName": "Ben",
            "lastName": "Ito",
            "email": "ben@example.com"
          },
          "status": "pending",
          "assignedAt": "2026-01-28T14:22:30.000Z",
          "approvedAt": null,
          "rejectedAt": null,
          "rejectionReason": null
        }
      ]
    }
  }
}
```
