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

# Integration

After the Subscription API has been set up, webhooks are ready to use. Webhooks will be fired from our end when any listed event is triggered. We will trigger a POST request to the URL provided on the Subscription API.

**Webhook Request**

When an event is created on our end we POST following details as part of the webhook to the URL mentioned on Subscription API.

**HEADER x-raas-webhook-signature** d2b730bba0de481fb079fff1478435231a9b410005ee599e67428930b7f340c3 x-raas-event : transaction\_completed POST PAYLOAD

| **Parameter**            | **Description**                                                                                                                                                                                     |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| x-raas-webhook-signature | We generate a signature using the secret mentioned on the Subscription API.                                                                                                                         |
| x-raas-event             | Event Name                                                                                                                                                                                          |
| id                       | Webhook unique identifier                                                                                                                                                                           |
| event\_name              | Event name. User as that of header x-raas-event                                                                                                                                                     |
| resource\_id             | Id of the resource for which the event was generated. If transaction\_completed is triggered the resource\_id will be transaction id. You can fetch the particular resource using the resource\_id. |
| user\_id                 | If user related resources are triggered as part of an event then user\_id will be sent as part of the payload.                                                                                      |
| subscription\_id         | Subscription Id for which this event was generated.                                                                                                                                                 |
| payload                  | In case of a cip tag status event, this contains a list of cip tags for which the status has been updated.                                                                                          |
| timestamp                | Timestamp when the webhook is posted.                                                                                                                                                               |

**Responding to Webhooks**

When you receive the webhook events, you can respond back with the following HTTP Status after the processing has been completed on your end.

| **HTTP Status**    | **Description**                                                                                                                                                                                                                                                                                     |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2xx HTTP           | This will acknowledge that the webhooks event was successfully captured and no further webhooks event will be generated from our end.                                                                                                                                                               |
| 409 Conflict       | If this HTTP code is returned from your end, we will trigger the webhooks on a fixed interval until a success response is received from your end.                                                                                                                                                   |
| Rest of HTTP Codes | Any other response during webhooks response including 3xx codes will be marked as failure. Consecutive Webhooks Failures will pause the subscriptions for which the webhooks failed. You will have to update the paused subscriptions if you want to receive further webhooks on that subscription. |

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://paas.docs.machnetinc.com/api-references/webhooks/integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
