# Cancel a payment

## Overview

[Video: Cancel a payment](https://www.youtube.com/watch?v=2zmvG5Vy5HY)

This flow describes how to cancel a [payment](https://docs.ohc.network/concepts/billing/payment-reconciliation.md) in Care, or mark it entered in error.

After you confirm, the payment no longer counts towards the totals of its [account](https://docs.ohc.network/concepts/billing/account.md), and Care calculates the totals again at once.

## Pre-requisites

* You are a member of the facility.
* The status of the payment is not Cancelled or Entered in Error.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Destroy Payment Reconciliation | Lets you cancel a payment or mark it entered in error. You need it through a role in any organization of the facility of the payment. Facility Admin has it by default. |
| Can Write Payment Reconciliation | Lets you cancel a payment within a set period after it is recorded, if your deployment sets a period. By default the period is 0 minutes, so you need Can Destroy Payment Reconciliation. Facility Admin, Staff, Doctor, Nurse and Pharmacist have it by default. |
| Can Read Payment Reconciliation | Lets you open the payment. Care also needs it when you confirm the cancellation. Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist have it by default. |

Care shows the cancel buttons without a permission check. If you do not have Can Destroy Payment Reconciliation, Care shows "User does not have permission to cancel payment reconciliation" when you confirm. Within a period set by your deployment, Can Write Payment Reconciliation is enough.

## Steps

### 1. Open the payment

Open the page of the payment that you want to cancel. See [View a payment](https://docs.ohc.network/flows/billing/payment-reconciliation/view-payment.md).

![The heading block of the Payment page of an advance cash payment, with the Payment ID and the badges Active, Complete, Cash and Advance](/assets/images/cancel-payment-1-c9afd6b8088b5b10cde5036ac0b24f41.webp)

### 2. Choose the action

Select one of these actions:

| Action | What it records |
| - | - |
| **Mark as Cancelled** | The status of the payment changes to Cancelled. Press `c` to select it. |
| **Mark as entered in error** | The status of the payment changes to Entered in Error. This status means that someone recorded the payment by mistake. Press `e` to select it. |

![The Mark as Cancelled button in the Actions list of the Payment page, above Mark as entered in error](/assets/images/cancel-payment-2-34904786dc4e98b916f3d611a5f5e98d.webp)

### 3. Confirm the action

For **Mark as Cancelled**, type "Cancel Payment" in the dialog "Confirm Cancel Payment".

For **Mark as entered in error**, type "Mark as Error" in the dialog "Confirm Mark as Entered in Error".

Warning: You cannot undo this action.

Select **Proceed**.

Note: **Proceed** is available only when the text that you type matches exactly.

![The Confirm Cancel Payment dialog with Cancel Payment typed in the confirmation box, a warning that the action cannot be undone, and the Cancel and Proceed buttons](/assets/images/cancel-payment-3-e488d51a54636520e3cd8df30d02d3ac.webp)

## Expected Outcome

* Care shows "Payment status updated".
* The payment shows the status Cancelled or Entered in Error.
* The payment no longer counts towards the totals of the account. Care calculates the totals again at once.
* The page no longer shows **Mark as Cancelled** and **Mark as entered in error**.
* If the payment was against an invoice, the invoice keeps its status. A Balanced invoice stays Balanced.
* The receipt of the payment shows a red "Cancelled" or "Entered in Error" watermark.

## Related

Concepts:

* [Payment Reconciliation](https://docs.ohc.network/concepts/billing/payment-reconciliation.md)
* [Account](https://docs.ohc.network/concepts/billing/account.md)

Flows:

* [View a payment](https://docs.ohc.network/flows/billing/payment-reconciliation/view-payment.md)
* [Print a payment receipt](https://docs.ohc.network/flows/billing/payment-reconciliation/print-payment-receipt.md)
* [Transfer an amount to another account](https://docs.ohc.network/flows/billing/payment-reconciliation/transfer-payment.md)
