# Batches

Batches contain **one or more Payments** to be made to users from an Organisation's PAY [Account](https://6dot50.gitbook.io/6dot50-apis/accounts).&#x20;

### Batch Status Codes

Every Batch has a Status. Based on a Batch's status, certain operations can be performed against the Batch:

| Batch Status Code | Description                                                                                                                                                                                                                                                  | Allowed Operations                                                                                                                                                                                                                                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DRAFT             | When a new Batch is created, it is created in a DRAFT status.                                                                                                                                                                                                | <p>Update Batch details using <a href="batches/put-batches-id"><code>PUT batches/{id}</code></a><br><br>Add Payments using <a href="batches/post-batches-id-payments"><code>POST batches/{id}/payments</code></a><br><br>Remove Payments using <a href="payments/delete-payments-id"><code>DELETE payments/{id}</code></a></p> |
| OPEN              | <p>When a Batch is submitted for processing, it changes to an OPEN state.<br><br>A Batch will remain OPEN as long as there are payments pending to non-6DOT50 members.</p>                                                                                   | Read current Batch status using [`GET /batches/{id}`](https://6dot50.gitbook.io/6dot50-apis/pay-api/batches/get-batches-id)                                                                                                                                                                                                    |
| CLOSED            | <p>A Batch will have a CLOSED status when all payments in the Batch have been processed.<br><br>A Batch becomes immutable once it is closed.</p>                                                                                                             | Read Batch details (history) using [`GET /batches/{id}`](https://6dot50.gitbook.io/6dot50-apis/pay-api/batches/get-batches-id).                                                                                                                                                                                                |
| CANCELLED         | <p>A Batch will only have a CANCELLED status if it was cancelled using the <a href="batches/post-batches-id-cancel"><code>POST /batches/{id}/cancel</code></a> operation.<br><br>A Batch becomes immutable once it is cancelled and cannot be re-opened.</p> | Read Batch details (history) using [`GET /batches/{id}`](https://6dot50.gitbook.io/6dot50-apis/pay-api/batches/get-batches-id).                                                                                                                                                                                                |

{% hint style="info" %}
Creating a Batch does not immediately initiate any payments to users. Payments will only be made if the Batch is submitted for processing using [`POST /batches/{id}/submit`](https://6dot50.gitbook.io/6dot50-apis/pay-api/batches/post-batches-id-submit).
{% endhint %}
