> For the complete documentation index, see [llms.txt](https://6dot50.gitbook.io/6dot50-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://6dot50.gitbook.io/6dot50-apis/pay-api/payments/delete-payments-id.md).

# DELETE /payments/{id}

This operation allows for the deletion of a single payment which is in DRAFT status.

{% hint style="danger" %}
When you delete a Payment, it will be **permanently deleted** from the batch it is associated to. Using a `GET /payments/{id}` (after deleting the Payment) will return as a 404 Not Found.
{% endhint %}

### Request

Ensure the bearer token is included in the Header of the DELETE operation:

<table><thead><tr><th width="197.33333333333331">Header</th><th width="120">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code></td><td>Yes</td><td>Bearer token from <a href="/6dot50-apis/redemptions-api/authentication/post-authentication-gettoken.md">/authentication/getToken</a></td></tr></tbody></table>

<table><thead><tr><th width="199.33333333333331">Parameter</th><th width="118">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>Yes</td><td>The unique payment ID to delete.</td></tr></tbody></table>

### Response

A 404 Not Found HTTP response will be returned if the `paymentId` does not exist.

If the Payment exists, and the Payment could be deleted: an HTTP 200 response will be returned with the following body:

```
{
  "id": "",
  "batchId": "",
  "msisdn": "27797411850",
  "amount": 250,
  "firstname": "string",
  "lastname": "string",
  "statusCode": "DELETED",
  "isMember": boolean,
  "createdAt": ""
}
```

If the Payment is not in DRAFT status, then a 400 Bad Request will be returned.

{% code title="Sample Response" %}

```
{
  "id": "d07295e6-98ef-46b1-9911-01b8a3426de6",
  "batchId": "7c2c1a0a-f462-42c3-b13c-30da2e4ad216",
  "msisdn": "27821231234",
  "amount": 250,
  "firstname": "Test",
  "lastname": "User 1",
  "statusCode": "DELETED",
  "isMember": true,
  "createdAt": "2022-11-16T14:08:52.127"
}
```

{% endcode %}
