# Invoice statuses

Invoices have several `status` and `status_context` options.

| status       | status\_context    | Description                                                                                                                                                      |
| ------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `new`        | `null`             | An invoice has been created and Cryptopay is waiting for a transaction                                                                                           |
| `completed`  | `null`             | The transaction has been processed successfully and the invoice amount credited to your account                                                                  |
| `unresolved` | `underpaid`        | The invoice has been underpaid and must be resolved. Can be updated to `completed` or `refunded`                                                                 |
| `unresolved` | `overpaid`         | The invoice has been overpaid and must be resolved. Can be updated to `completed` or `refunded`                                                                  |
| `unresolved` | `paid_late`        | The invoice has been paid after the 10 minutes has passed and must be resolved. Can be updated to `completed` or `refunded`                                      |
| `unresolved` | `illicit_resource` | The received cryptocurrency transaction has been evaluated as High-Risk, therefore the payment has been put on hold. Can be updated to `completed` or `refunded` |
| `refunded`   | `null`             | The full cryptocurrency transaction amount has been added to the merchant's cryptocurrency balance or sent back to the customer                                  |
| `cancelled`  | `null`             | The invoice hasn't been paid or the broadcasted transaction hasn't been confirmed on the network within 14 days                                                  |

There are 3 other statuses besides `new` and `completed`.

### Cancelled

The `cancelled` status is assigned to a payment if the transaction has not been confirmed on the blockchain network within 14 days from the moment the customer sent the funds to the invoice address. This may occur if the user has made a [double spend](https://en.bitcoin.it/wiki/Irreversible_Transactions#:~:text=Double%2Dspending%20is%20the%20result,the%20number%20of%20confirmations%20rises.) of funds and the network has not validated the payment. The second possible scenario, in which the invoice status will be updated from `new` to `cancelled`, is when the invoice has not been paid within 14 days. In both these cases, we will send a [callback](https://developers.cryptopay.me/guides/api-basics/callbacks) with the updated status.&#x20;

### Unresolved

In cases where a customer underpays, overpays or pays an invoice after 10 minutes, the invoice will change its status from `new` to `unresolved`. For all these scenarios, the relevant context will be given: `underpaid`, `overpaid` or `paid_late`.

### Refunded

The `unresolved` status can be updated to `completed` or `refunded`, depending on how the merchant decides to receive such payment - to accept the funds received and complete the payment, or return the funds back to the sender. The `unresolved` status with the `illicit_resource` context is assigned to the payment when it has received a high risk level. In case you get a High-Risk payment it is required you contact us at <risk@cryptopay.me>. Our Transaction Monitoring team will review this transaction to make a decision on whether we will be able to reduce the risk level and process this payment, and add the funds to your account balance or we will have to send the funds back to the sender. Please refer to the [Risks](/guides/risks.md) section to get more details on what High-Risk transactions are and why we take it very seriously. Once the money has been sent back, the payment status will be changed to `refunded`. If the payment has not been returned to the sender but has been credited to the merchant's balance, the payment status will be changed to `refunded`.

## Invoice statuses diagram

<figure><img src="https://files.cryptopay.me/b2b/git_book_files/07_Invoice_Invoice_Statuses.png" alt=""><figcaption></figcaption></figure>

You can also see [all the steps](/guides/invoices/payment-sequence.md) from the moment the invoice is created to the moment the payment is credited to the merchant account balance at Cryptopay.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.cryptopay.me/guides/invoices/invoice-statuses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
