> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage payment batch

> View a list of payment batches associated with an account, retrieve details about a specific batch, update or delete a batch, and access alerts or pay

# Manage a payment batch

View a list of payment batches associated with an account, retrieve details about a specific batch, update or delete a batch, and access alerts or payments within a batch.

## List payment batches

<Note>
  **GET** `/v2/payment-batches`
</Note>

### Request

Use this endpoint to retrieve a paginated list of all payment batches associated with your account. You can filter results using query parameters.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches?accountId=F50091&sort=asc&offset=100&limit=200&ids=string&include=string&includeHidden=true&statuses=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
  ```

  ```bash Request structure theme={null}
    'https://api.equalsmoney.com/v2/payment-batches?accountId=F50091&sort=asc&offset=100&limit=200&ids=string&include=string&includeHidden=true&statuses=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
  ```
</CodeGroup>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to retrieve a list of payment batches for.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="sort" type="string">
  Sort order: ascending (`asc`) or descending (`desc`) By default, this is set to `desc`.

  Allowable values: `asc`, `desc`
</ParamField>

<ParamField body="offset" type="integer">
  The number of items to skip before returning results. For example, `offset=200`. By default, this is set to `0`.

  Allowable values: A valid integer
</ParamField>

<ParamField body="limit" type="integer">
  The maximum number of results to return. For example, `limit=25`. By default, this is set to `100`.

  Allowable values: `[ 1 .. 1000 ]`
</ParamField>

<ParamField body="ids" type="string">
  A list of payment batch IDs to filter by.

  Allowable values: A valid string
</ParamField>

<ParamField body="includeHidden" type="string">
  Includes hidden payment batches (true or false). By default, this is set to false.

  Allowable values: true, false
</ParamField>

<ParamField body="statuses" type="string">
  A list of statuses to filter by.

  Allowable values: `draft`, `validated`, `confirmed`, `started`, `completed`, `failed`, `cancelled`
</ParamField>

### Response

If your request is successful, you'll receive a 200 response.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "limit": 200,
    "offset": 100,
    "count": 67,
    "rows": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "accountId": "string",
        "name": "string",
        "createdBy": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "type": "person"
        },
        "product": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string"
        },
        "status": "draft",
        "visible": true,
        "visibleAt": "2019-08-24T14:15:22Z",
        "confirmedBy": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "type": "person"
        },
        "confirmedAt": "2019-08-24T14:15:22Z",
        "passedMfaCheckAt": "2019-08-24T14:15:22Z",
        "riskCheckedAt": "2019-08-24T14:15:22Z",
        "ordersSentAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "alerts": [
          {
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "Error",
            "code": "string",
            "message": "string"
          }
        ],
        "ordersSummary": {
          "numberOfOrders": 0,
          "uniqueCurrencyCodes": [
            "USD"
          ]
        },
        "input": {
          "format": "csv",
          "status": "accepted",
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
    "limit": number,
    "offset": number,
    "count": number,
    "rows": [
      {
        "id": "string",
        "accountId": "string",
        "name": "string",
        "createdBy": {
          "id": "string",
          "type": "string"
        },
        "product": {
          "id": "string",
          "name": "string"
        },
        "status": "string",
        "visible": boolean,
        "visibleAt": "string",
        "confirmedBy": {
          "id": "string",
          "type": "string"
        },
        "confirmedAt": "string",
        "passedMfaCheckAt": "string",
        "riskCheckedAt": "string",
        "ordersSentAt": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "alerts": [
          {
            "timestamp": "string",
            "type": "string",
            "code": "string",
            "message": "string"
          }
        ],
        "ordersSummary": {
          "numberOfOrders": number,
          "uniqueCurrencyCodes": [
            "string"
          ]
        },
        "input": {
          "format": "string",
          "status": "string",
          "createdAt": "string",
          "updatedAt": "string"
        }
      }
    ]
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, see API reference.

## Retrieve a specific payment batch

<Note>
  **GET** `/v2/payment-batches/{paymentBatchId}`
</Note>

### Request

Use this endpoint to retrieve details of a specific payment batch.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091&include=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091&include=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
  ```
</CodeGroup>

#### Path parameters

<ParamField body="paymentBatchId" type="string" required>
  The unique ID of the Payment Batch.

  Allowable values: An existing `paymentBatchId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to work with.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "accountId": "string",
    "name": "string",
    "createdBy": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "person"
    },
    "product": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "status": "draft",
    "visible": true,
    "visibleAt": "2019-08-24T14:15:22Z",
    "confirmedBy": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "person"
    },
    "confirmedAt": "2019-08-24T14:15:22Z",
    "passedMfaCheckAt": "2019-08-24T14:15:22Z",
    "riskCheckedAt": "2019-08-24T14:15:22Z",
    "ordersSentAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "alerts": [
      {
        "timestamp": "2019-08-24T14:15:22Z",
        "type": "Error",
        "code": "string",
        "message": "string"
      }
    ],
    "ordersSummary": {
      "numberOfOrders": 0,
      "uniqueCurrencyCodes": [
        "USD"
      ]
    },
    "input": {
      "format": "csv",
      "status": "accepted",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "accountId": "string",
    "name": "string",
    "createdBy": {
      "id": "string",
      "type": "string"
    },
    "product": {
      "id": "string",
      "name": "string"
    },
    "status": "string",
    "visible": boolean,
    "visibleAt": "string",
    "confirmedBy": {
      "id": "string",
      "type": "string"
    },
    "confirmedAt": "string",
    "passedMfaCheckAt": "string",
    "riskCheckedAt": "string",
    "ordersSentAt": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "alerts": [
      {
        "timestamp": "string",
        "type": "string",
        "code": "string",
        "message": "string"
      }
    ],
    "ordersSummary": {
      "numberOfOrders": number,
      "uniqueCurrencyCodes": [
        "string"
      ]
    },
    "input": {
      "format": "string",
      "status": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, see API reference.

## Update a payment batch

<Note>
  **PATCH** `/v2/payment-batches/{paymentBatchId}`
</Note>

### Request

Use this endpoint to update specific attributes of a payment batch, such as the name or visibility. This endpoint cannot be used after a batch has been confirmed.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -H 'requestid: string' \
    -d '{
      "name": "string",
      "visible": true
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -H 'requestid: string' \
    -d '{
      "name": "string",
      "visible": boolean
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="paymentBatchId" type="string" required>
  The unique ID of the payment batch.

  Allowable values: An existing `paymentBatchId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to work with.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="name" type="string">
  The name of the payment batch.
</ParamField>

<ParamField body="visible" type="boolean">
  Indicates whether the payment batch is visible to other API users.
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing the updated details.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "accountId": "string",
    "name": "string",
    "createdBy": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "person"
    },
    "product": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string"
    },
    "status": "draft",
    "visible": true,
    "visibleAt": "2019-08-24T14:15:22Z",
    "confirmedBy": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "person"
    },
    "confirmedAt": "2019-08-24T14:15:22Z",
    "passedMfaCheckAt": "2019-08-24T14:15:22Z",
    "riskCheckedAt": "2019-08-24T14:15:22Z",
    "ordersSentAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "alerts": [
      {
        "timestamp": "2019-08-24T14:15:22Z",
        "type": "Error",
        "code": "string",
        "message": "string"
      }
    ],
    "ordersSummary": {
      "numberOfOrders": 0,
      "uniqueCurrencyCodes": [
        "USD"
      ]
    },
    "input": {
      "format": "csv",
      "status": "accepted",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "accountId": "string",
    "name": "string",
    "createdBy": {
      "id": "string",
      "type": "string"
    },
    "product": {
      "id": "string",
      "name": "string"
    },
    "status": "string",
    "visible": boolean,
    "visibleAt": "string",
    "confirmedBy": {
      "id": "string",
      "type": "string"
    },
    "confirmedAt": "string",
    "passedMfaCheckAt": "string",
    "riskCheckedAt": "string",
    "ordersSentAt": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "alerts": [
      {
        "timestamp": "string",
        "type": "string",
        "code": "string",
        "message": "string"
      }
    ],
    "ordersSummary": {
      "numberOfOrders": number,
      "uniqueCurrencyCodes": [
        "string"
      ]
    },
    "input": {
      "format": "string",
      "status": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, see API reference.

## Delete a payment batch

<Note>
  **DELETE** `/v2/payment-batches/{paymentBatchId}`
</Note>

### Request

Use this request to permanently delete a payment batch. A batch can not be deleted after the batch has been confirmed.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```

  ```bash Request structure theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}?accountId=F50091' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```
</CodeGroup>

#### Path parameters

<ParamField body="paymentBatchId" type="string" required>
  The unique ID of the payment batch.

  Allowable values: An existing `paymentBatchId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to work with.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

### Response

If your request is successful, you'll receive a `204` No Content response.

For more detailed information about this request and its response, see API reference.

## List payment batch alerts

<Note>
  **GET** `/v2/payment-batches/{paymentBatchId}/alerts`
</Note>

### Request

Use this endpoint to retrieve paginated list of all payment batch alerts associated with your account. You can filter results using query parameters.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/alerts?accountId=F50091&sort=asc&offset=100&limit=200&from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z&alertType=Error&alertCode=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/alerts?accountId=F50091&sort=asc&offset=100&limit=200&from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z&alertType=Error&alertCode=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```
</CodeGroup>

#### Path parameters

<ParamField body="paymentBatchId" type="string" required>
  The unique ID of the payment batch.

  Allowable values: An existing `paymentBatchId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to retrieve a list of payment batches for.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="sort" type="string">
  Sort order: ascending (`asc`) or descending (`desc`) By default, this is set to `desc`.

  Allowable values: `asc`, `desc`
</ParamField>

<ParamField body="offset" type="integer">
  The number of items to skip before returning results. For example, `offset=200`. By default, this is set to `0`.

  Allowable values: A valid integer
</ParamField>

<ParamField body="limit" type="integer">
  The maximum number of results to return. For example, `limit=25`. By default, this is set to `100`.

  Allowable values: `[ 1 .. 1000 ]`
</ParamField>

<ParamField body="from" type="string">
  Time from.
</ParamField>

<ParamField body="to" type="string">
  Time to.
</ParamField>

<ParamField body="alertType" type="string">
  The alert type.

  Allowable values: `Error` `Warning`
</ParamField>

<ParamField body="alertCode" type="string">
  The alert name.

  Allowable values: `Error` `Warning`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing the following details.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "limit": 200,
    "offset": 100,
    "count": 67,
    "rows": [
      {
        "timestamp": "2019-08-24T14:15:22Z",
        "type": "Error",
        "code": "string",
        "inputIndex": 0,
        "message": "string"
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
    "limit": number,
    "offset": number,
    "count": number,
    "rows": [
      {
        "timestamp": "string",
        "type": "string",
        "code": "string",
        "inputIndex": number,
        "message": "string"
      }
    ]
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, see API reference.

## List payments in payment batch

<Note>
  **GET** `/v2/payment-batches/{paymentBatchId}/payments`
</Note>

### Request

Use this endpoint to retrieve paginated list of all payments for a given payment batch.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/payments?accountId=F50091&sort=asc&offset=100&limit=200&search=string&statuses=string&include=string&orderIds=string&budgetIds=string&currencies=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/payment-batches/{paymentBatchId}/payments?accountId=F50091&sort=asc&offset=100&limit=200&search=string&statuses=string&include=string&orderIds=string&budgetIds=string&currencies=string' \
    -H 'Authorization: YOUR_API_KEY_HERE' \
    -H 'requestid: string' \
  ```
</CodeGroup>

#### Path parameters

<ParamField body="paymentBatchId" type="string" required>
  The unique ID of the Payment Batch.

  Allowable values: An existing `paymentBatchId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to retrieve a list of payment batches for.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="sort" type="string">
  Sort order: ascending (`asc`) or descending (`desc`) By default, this is set to `desc`.

  Allowable values: `asc`, `desc`
</ParamField>

<ParamField body="offset" type="integer">
  The number of items to skip before returning results. For example, `offset=200`. By default, this is set to `0`.

  Allowable values: A valid integer
</ParamField>

<ParamField body="limit" type="integer">
  The maximum number of results to return. For example, `limit=25`. By default, this is set to `100`.

  Allowable values: `[ 1 .. 1000 ]`
</ParamField>

<ParamField body="statuses" type="string">
  A list of statuses to filter by.

  Allowable values: `draft`, `validated`, `confirmed`, `started`, `completed`, `failed`, `cancelled`
</ParamField>

<ParamField body="orderIds" type="string">
  The order IDs.

  Allowable values: An existing `orderId` (≤ 36 characters)
</ParamField>

<ParamField body="budgetIds" type="string">
  The budget IDs.

  Allowable values: An existing `budgetId` (≤ 36 characters)
</ParamField>

<ParamField body="currencies" type="string" />

### Response

If your request is successful, you'll receive a `200` response containing the following details.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "limit": 200,
    "offset": 100,
    "count": 67,
    "rows": [
      {
        "id": "string",
        "paymentBatchId": "1bce4e75-abe0-4ebf-b151-fbdb0b7d5ed9",
        "orderId": "string",
        "status": "created",
        "amount": "string",
        "fundingBudgetId": "6ee672f6-226f-4a72-8592-0f8dc5284ab1",
        "purposeCode": "string",
        "purpose": "string",
        "reference": "string",
        "currencyCode": "USD",
        "riskCheckedAt": "2019-08-24T14:15:22Z",
        "fees": "string",
        "charges": "SHA",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "inputIndex": 0,
        "recipient": {
          "id": "string",
          "defaultReference": "string",
          "type": "individual",
          "name": "string",
          "displayName": "string",
          "subscribedEmails": [
            {
              "name": "string",
              "email": "user@example.com"
            }
          ],
          "accountIdentifier": "string",
          "bankIdentifier": "string",
          "intermediaryBankIdentifier": "string",
          "paymentNetwork": "SWIFT",
          "address": {
            "addressType": "ADDR",
            "streetName": "string",
            "buildingNumber": "string",
            "buildingName": "string",
            "postcode": "string",
            "city": "string",
            "region": "string",
            "countryCode": "GB"
          },
          "bankAddress": {
            "countryCode": "GB"
          }
        },
        "alerts": [
          {
            "inputIndex": 0,
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "Error",
            "code": "string",
            "message": "string"
          }
        ]
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
  {
    "limit": number,
    "offset": number,
    "count": number,
    "rows": [
      {
        "id": "string",
        "paymentBatchId": "string",
        "orderId": "string",
        "status": "string",
        "amount": "string",
        "fundingBudgetId": "string",
        "purposeCode": "string",
        "purpose": "string",
        "reference": "string",
        "currencyCode": "string",
        "riskCheckedAt": "string",
        "fees": "string",
        "charges": "string",
        "createdAt": "string",
        "updatedAt": "string",
        "inputIndex": number,
        "recipient": {
          "id": "string",
          "defaultReference": "string",
          "type": "string",
          "name": "string",
          "displayName": "string",
          "subscribedEmails": [
            {
              "name": "string",
              "email": "string"
            }
          ],
          "accountIdentifier": "string",
          "bankIdentifier": "string",
          "intermediaryBankIdentifier": "string",
          "paymentNetwork": "string",
          "address": {
            "addressType": "string",
            "streetName": "string",
            "buildingNumber": "string",
            "buildingName": "string",
            "postcode": "string",
            "city": "string",
            "region": "string",
            "countryCode": "string"
          },
          "bankAddress": {
            "countryCode": "string"
          }
        },
        "alerts": [
          {
            "inputIndex": number,
            "timestamp": "string",
            "type": "string",
            "code": "string",
            "message": "string"
          }
        ]
      }
    ]
  }
  ```
</CodeGroup>
