> For the complete documentation index, see [llms.txt](https://docs.payvalida.com/api-cashout/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payvalida.com/api-cashout/api-cashout-en/notification/notification.md).

# Notification

This is the service that Payvalida uses in order to send a notification about a withdrawed or an expirated operation

{% hint style="info" %}
In this stage, the commerce has to build a REST service. Payválida calls this service for the notification process. When the REST service is built, you have to send the URL to Payválida.
{% endhint %}

When you register a withdrawal,  it's created with a **PENDING (PENDIENTE)** state. The withdrawal can change state depending on certain scenarios:

1. The customer withdraws the operation -> Changes from **PENDING (PENDIENTE)** to **APPROVED (APROBADA)** and is notified with an ***APROBADA*** statu&#x73;***.***
2. The operation expires because it wasn't withdrawn before the expiration date -> Changes from **PENDING (PENDIENTE)** to **EXPIRED (VENCIDA)** and is notified with a ***VENCIDA*** status.

The system automatically notifies when the operation changes status.

The notification is sent by the HTTP **POST** method with a body content type json.

{% tabs %}
{% tab title="Request" %}

| Name         | Type    | Description                                                                                                                                              |
| ------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount       | float64 | Operation amount.                                                                                                                                        |
| document     | string  | ID associate to the operation.                                                                                                                           |
| operation    | string  | ID generated by the commerce.                                                                                                                            |
| currency     | string  | Operation currency                                                                                                                                       |
| status       | string  | Operation status                                                                                                                                         |
| checksum     | string  | Checksum encoded in SHA512(operation+document+amount+currency+status+NOTIFICATION\_HASH). **The amount for the checksum must be converted into an INT.** |
| {% endtab %} |         |                                                                                                                                                          |

{% tab title="Response" %}

| Name          | Type   | Description                                                                              |
| ------------- | ------ | ---------------------------------------------------------------------------------------- |
| code          | int    | The 0 value we take as a correct execution. Other values are taken as an error response. |
| text          | string | A brief description of the execution.                                                    |
| {% endtab %}  |        |                                                                                          |
| {% endtabs %} |        |                                                                                          |
