Webhooks

Receive event notifications with webhooks

Listen for events so your integration can automatically trigger reactions and receive updates on the payment status of an order.

NOTYD uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when your customer is redirected to the NOTYD Hosted Payment page to finalize a payment, or when order management updates are initiated from the Seller Portal.

Start using webhooks with your NOTYD integration in just three steps:

  1. Create a webhook endpoint on your server.
  2. Use Order request to create an order_request and provide the the URL of your webhook endpoint for webhook_urls , finalize the payment to create an order. NOTYD will call your webhook when the order is accepted, rejected or timed out.

NOTYD webhook

The NOTYD webhook is triggerd when an order_status_changed event occurs. An order status changes when the order status is updated from/to:

  • accepted
  • rejected
  • cancelled
  • failed
  • captured
  • partially_captured
  • refunded
  • partially_refunded

Sample payload (JSON)

Copy
Copied
{
   "event_type": "order_status_changed",
   "created": "2021-12-28T14:05:31.936Z",
   "payload": {
      "order_id”: "837c4454-092d-4670-8378-01ce6c990cdc",
      "webshop_id”: "ffaf4252-8207-4b74-9668-933274b1bc5f",
   }
}

After your system is aware that order with order_id = "837c4454-092d-4670-8378-01ce6c990cdc" has changed, the new order status can be retrieved by requesting the order details /v1/api/orders/{order_id}/.