# How to implement webhooks?

{% hint style="info" %}
**Note:** The Webhooks are only functional for Plum Pro APIs but not with Storefront Integration, Plum Pro Dashboard & Xoxo Link Integrations
{% endhint %}

**Step 1:** To receive the updated ('delivered' or 'canceled') reward delivery status, you will have to set up your callback URL for the listener to push the status to the required platforms.

<figure><img src="https://1597622271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOeXh7erUO5h_LVpN85%2Fuploads%2F8qfLvEKWiCB0YQgtwzcI%2FScreenshot%202023-01-05%20at%204.02.36%20PM.png?alt=media&#x26;token=db4ff45c-4013-48fa-b429-de363fc9ebaa" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Important** <br>

**Note 1:** These statuses are asynchronous, and to ensure that they aren't blocked, **it's vital to whitelist Xoxoday's callback URL IP: 52.76.120.90**. Doing so will help facilitate uninterrupted callback notifications from this IP.

**Note 2:** Our systems will send an attempt to post to a registered webhook URL thrice, after which the webhook URL will be ‘disabled’. However, this can be ‘enabled’ through our dashboard again.
{% endhint %}

## Payload

```
{
'id': orderID<Number(20)>,
'data': {
  'orderId': <Number(11)>,
  'poNumber': <String(100)>, 
  'orderDate': <String(19)>, 
  'deliveryStatus': <String(9)[delivered|Canceled]>
 },
  'createdAt': <String(19)> 
}

Legend: <DataType(size)>
```

## Parameters

<table><thead><tr><th width="202">Parameter Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>ID</strong></td><td>Integer(20)</td><td>Unique Webhook ID to identify that the webhook is thrown</td></tr><tr><td><strong>Order ID</strong></td><td>Integer(11)</td><td>Unique Xoxo Order ID whenever an order is placed via the Plum API</td></tr><tr><td><strong>PO number</strong></td><td>String(100)</td><td>PoNumber if provided by the client while placing an order</td></tr><tr><td><strong>OrderDate</strong></td><td>String(19)</td><td>Date when an order is placed</td></tr><tr><td><strong>Delivery Status</strong></td><td>String(9)</td><td>Order delivery status. Can be delivered or canceled</td></tr><tr><td><strong>CreatedAt</strong></td><td>String(19)</td><td>When callback was invoked</td></tr></tbody></table>
