# Webhook for order events

{% hint style="danger" %}
For security reason, we highly recommend the backend system of our partners to [validate the signature](/reference/api-reference/verification.md#webhook-validation) of webhook whenever receiving a notification of order status change.
{% endhint %}

on- ramp order: FaTPay will inform Premium Partners via webhook notifications once **the transaction is finished on blockchain**.

NFT order: `FINISHED` `Settled`via webhook notifications.

## Webhook for order events

<mark style="color:green;">`POST`</mark> `Domain_of_partners_backend/webhook_URI`

Webhook notification will be sent by FaTPay to the partner when the order status is changed

#### Headers

| Name                                              | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| X-FP-Partner-Id<mark style="color:red;">\*</mark> | String  | <p>Partner ID assigned by FaTPay as Premium Partner <br>e.g. 2yQrS9A0xmM8xpfa</p>                                                                                                                                                                                                                                                                                                                                                                                                                       |
| X-FP-Nonce<mark style="color:red;">\*</mark>      | Integer | Random integer e.g. 868964                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| X-FP-Timestamp<mark style="color:red;">\*</mark>  | Integer | Unix timestamp in second e.g. 1661346861                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| X-FP-Signature<mark style="color:red;">\*</mark>  | String  | [Signature](/reference/api-reference/verification.md#signature-for-api-request) generated by FaTPay. Need to be validated by the partner. E.g. zbBQ+1nv/5up9riH1wbTSSMmkb26LQj3g1cNWsutOordOrtpk8agcA5D5bdYaGeVlHK0qZ2MlUV+ZfOK9cXMuficeIm5fnEjMEm7s1IZtSivMt5te7EFqe52dtVFafE4hUgwqH6QBZB0yZ1FSqHs2dOCI0e8RKJQBDitxtHkibStl1Jt5wulzzq96qWbbVnwoBqGDT52OtwwEcDqMI4SIAzUAdBhAuLqUig1U4Ne9ufT8B1aAohEk5fvn/Sbom21bEjLdgbt5PwH2wmmuBx4tq31IgcP4V+qEBILY2eMAFzkvxNXaX3PsLbj9NpgyIc3HQl0FtRq3gdN7FsSvyvcWA== |

#### Request Body

| Name                                    | Type   | Description                                                                  |
| --------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| order<mark style="color:red;">\*</mark> | Object | An [`Order`](/reference/api-reference/apis/list-all-orders.md#order) object. |

Currently, there is no response expected from the partners for webhook. The webhook notification would be sent only once since there is no retry mechanism. Please refer to \[[List all orders](/reference/api-reference/apis/list-all-orders.md)] to confirm the order status.


---

# 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://dev.fatpay.org/reference/api-reference/webhooks/webhook-for-order-events.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.
