You can receive webhook events from Ivy. These will notify you once a certain event has happened via a POST
Request to your webhook endpoint.
Overview
You can receive webhook events from Ivy. These will notify you once a particular event has happened via a POST
Request to your webhook endpoint. You can use these events to update your internal state or trigger other actions.
You can create new Webhook Subscriptions via the Ivy API or in the Dashboard to receive specific events for your integration or to set a new webhook endpoint.
Events
The following events are currently supported:
Event | Description |
---|---|
merchant_updated | Your merchant account has been updated. |
merchant_app_updated | Your merchant app has been updated. |
order_created | An order has been created. Use this to track the status of a payment. |
order_updated | An order has been updated. Use this to track the status of a payment. |
refund_succeeded | A refund initiated with /merchant/payment/refund succeeded. |
refund_failed | A refund initiated with /merchant/payment/refund failed. |
payout_report_requested | Only relevant when creating a payout report. The result of the payout report is sent once the report is fetching is finished. |
data_session_completed | Only relevant for the result of a single data session. The result of the completed data session is sent once the user completes the data session. |
Webhook Subscription
You can create a new Webhook subscription via the Ivy API. This will create a new webhook endpoint and subscribe to your specific events. You can also update the webhook endpoint of an existing subscription. The endpoint will be called with a POST
request, and the event as JSON body.
Create a new Webhook Subscription
Call the endpoint Create a Webhook Subscription with the following parameters to create a new webhook subscription:
Parameter | Type | Description |
---|---|---|
url | string | The URL of your webhook endpoint |
events | array | An array of events you want to subscribe to. See the list of events above. |
Update a Webhook Subscription
Call the endpoint Update a WebhookSubscription with the following parameters to update an existing webhook subscription:
Parameter | Type | Description |
---|---|---|
id | string | The id of the webhook subscription |
url | string | The URL of your webhook endpoint |
events | array | An array of events you want to subscribe to. See the list of events above. |
Delete a Webhook Subscription
Call the endpoint Delete a WebhookSubscription with the following parameters to delete an existing webhook subscription:
Parameter | Type | Description |
---|---|---|
id | string | The id of the webhook subscription |
Webhook Data Structure
A webhook payload is always structured as follows:
{
"id": "string", // The id of the specific webhook. Use this in the /webhook/trigger endpoint to re-send the webhook.
"type": "string", // The event type of the webhook, see above
"payload": {...}, // The payload to the corresponding event type
"date": "date" // The datetime timestamp of the webhook
}
Reference
For the specific payload for each event, please see the section Webhook-Event