Skip to main content

Introduction

Rayda Webhooks let your application get notified about real-time changes to your data, instead of having to poll our APIs. When an event occurs (such as an order being created or an employee being updated), Rayda sends a POST request to a specified HTTPS endpoint that you manage. You can configure and manage your webhook endpoints from the Rayda Account Settings.

Webhook Setup

Webhook endpoints must support HTTPS and be capable of handling POST requests with the following header:
Content-Type: application/json

Payload Structure


KeyTypeDescription
successBooleanIndicates whether the event operation was successful or not
environmentStringThe current Rayda environment — either test or live.
eventStringA string representing the event type (e.g., employee.created, order.delivered).
dataObjectThe body of the event. The structure of this object varies depending on the event type.

Example Payload

{
  "success":true,
  "event":"order.created",
  "environment":"test",
  "data":{"id":"9f2318e8-c39b-4625-b5ec-067205ca90da","order_number":"RE-ONB-193D6-2025","status":"in_progress","total_amount":"1989","employee_count":1,"currency":"$","payment_method":"Credit","type":"onboarding","quantity":1,"country":"Nigeria","country_code":"NG","ordered_by":"Jonh Doe","order_date":"2025-06-12T12:21:45.000000Z","budget_count":"0%","pick_up_count":0,"delivered_count":0,"sub_orders":[{"id":"9f2318e8-e79c-4164-9e89-3f6f81ba5fb0","employee_id":"9f230f02-c245-4129-83bc-f24617cafca4","currency":"$","employee_first_name":"Edidiong","employee_last_name":"Inyang","employee_email":"[email protected]","address":"12A Sale Oxford Road, Delta Nigeria, Nigeria","job_title":null,"status":"order_placed","events":[{"id":"9f2318e8-eb13-48c4-abb5-56711991d05c","asset_order_id":"9f2318e8-e79c-4164-9e89-3f6f81ba5fb0","status":"order_placed","created_at":"2025-06-12T12:21:45.000000Z","updated_at":"2025-06-12T12:21:45.000000Z"}],"total_amount":"1800","assets":[{"id":"9d5c5874-cd81-4987-94b4-7b890185a04b","asset_spec_id":"9d5c5874-cd81-4987-94b4-7b890185a04b","asset_id":"9d5c57ed-c8d9-4d6d-bc87-56b328ee338d","name":"Dell Latitiude 13th  Gen Intel\u00ae Core\u2122 i5-1355U","description":"DELL LATTITUDE 13th  Gen Intel\u00ae Core\u2122 i5-1355U\r\n (12 MB cache, 10 cores, 12 threads, up to 5.0 GHz Turbo)\r\n Windows 11 Pro, 16 GB: LPDDR5, 4800 MT\/s \r\n(onboard) 512 GB, M.2, PCIe NVMe, SSD.","year":"2022","type":"Sale","make":"Dell","model":"Latitude","category":"Laptop","asset_type":{"id":"9e3016bd-080d-4f2b-8963-61a1cdda841c","name":"Laptop\/Workstation","onboarding_fee":"99","offboarding_fee":"99","storage_fee":"35","status":"Active","created_at":"2025-02-11T17:09:31.000000Z","updated_at":"2025-02-11T17:09:31.000000Z","deleted_at":null},"asset_code":null,"status":"order_placed","images":["https:\/\/s3.amazonaws.com\/rayda.co\/test\/9d5c57ed-c8d9-4d6d-bc87-56b328ee338d\/1730386573.jpg","https:\/\/s3.amazonaws.com\/rayda.co\/test\/9d5c57ed-c8d9-4d6d-bc87-56b328ee338d\/1730386574.webp"],"spec":{"condition":"New","RAM":"16GB","storage":"512GB SSD"},"asset_pricing":{"id":"9def916f-8871-4b11-b846-42f379c56dd0","amount":"1800","currency":{"code":"USD","name":"United States Dollar","symbol":"$"}}}]}]}
}

Supported Webhook Events

Below is the list of currently supported webhook event types:

Employee Events

  • employee.created - Triggered when a new employee is added.
  • employee.updated - Triggered when employee data is updated.
  • employee.deleted - Triggered when an employee record is deleted.

Department Events

  • department.created - Triggered when a new department is added.
  • department.updated - Triggered when department data is updated.
  • department.deleted - Triggered when an department record is deleted.

Order Events

  • order.created - Triggered when an order is placed.
  • order.updated - Triggered when an order is updated.
  • order.confirmed - Triggered when an order is confirmed.
  • order.setup - Triggered when an item in an order is setup completely.
  • order.packaged - Triggered when an item in an order is packaged and ready for shipment.
  • order.in-transit - Triggered when an item in an order is in transit.
  • order.delivered - Triggered when an item in an order is delivered.

Webhook Delivery & Retries

When Rayda sends a webhook to your endpoint, it expects a 200 OK HTTP response to mark the delivery as successful. If a 200 response is not received, the delivery will be retried up to 3 times using the following schedule:
  • First retry: 1 minute after the failed attempt
  • Second retry: 2 minutes after the first retry
  • Final retry: 5 minutes after the second retry
If the final attempt still fails, the webhook delivery will be marked as failed and will not be retried again. Make sure your webhook endpoint handles failures gracefully and returns a 200 OK as quickly as possible to prevent unnecessary retries.