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

# Payment notification

Payment callback (Payment notification) will be sent to merchant's ***callbackUrl***

Callback data is sent in **POST** method.

Notification scheme:

| Name              | Value                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `orderId`         | Invoice number                                                                                                                                                                                                                                                                                                                                                                   |
| `created`         | Invoice creation time.                                                                                                                                                                                                                                                                                                                                                           |
| `status`          | Transaction status                                                                                                                                                                                                                                                                                                                                                               |
| `amount`          | Invoice amount                                                                                                                                                                                                                                                                                                                                                                   |
| `currency`        | Invoice payment currency                                                                                                                                                                                                                                                                                                                                                         |
| `payAmount`       | The amount of cryptocurrency paid by the buyer.                                                                                                                                                                                                                                                                                                                                  |
| `payCurrency`     | The cryptocurrency in which the payment was made; for example, BTC, LTC, ETH.                                                                                                                                                                                                                                                                                                    |
| `underpaidAmount` | The amount of cryptocurrency (payCurrency) underpaid by the buyer; for example, if payAmount => 1 , payCurrency => ETH, and the buyer paid 0.1 ETH, then underpaidAmount => 0.9. Changes in underpaidAmount will not cause additional callbacks, but when order information is retrieved via GET/v2/merchant/Merchant/transactions, the latter value will be shown.              |
| `overpaidAmount`  | The amount of cryptocurrency (defined by pay\_currency) overpaid by the buyer; for example, if payAmount => 0.123, payCurrency => ETH, and the buyer paid 0.15 ETH, overpaidAmount => 0.027. Changes in overpaidAmount will not cause additional callbacks, but when order information is retrieved using GET/v2/merchant/Merchant/transactions, the latter value will be shown. |
| `token`           | Token (or generated by payment system) to confirm payment callback.                                                                                                                                                                                                                                                                                                              |

Retry time (called on response other than 200)&#x20;

* Sending every 1 minute if the number of retries <= 40&#x20;
* Callback will be cancelled if the number of retries >= 41&#x20;

After sending the payment notification, the system(backend) waits for a response for 20 seconds. The payment notification will be canceled and terminated if any of the following conditions occur:

* The payment notification is sent 40 times.&#x20;
* After the payment notification is sent, a response status of 301, 302 (redirect) is received. Usually this happens if you use "http" in the URL and it is redirected to "https".&#x20;
* A 401 (unauthorized) response status is received after sending a payment notification.&#x20;
* This usually happens if your site is password protected (basic access authentication).&#x20;
* Make sure your site is in the public domain.&#x20;
* A payment notification is sent to the TOR network. The payment notification is sent to a private network, such as localhost.
