> For the complete documentation index, see [llms.txt](https://ofn-user-guide.gitbook.io/ofn-api-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ofn-user-guide.gitbook.io/ofn-api-handbook/webhooks/event-types.md).

# Event types

### order\_cycle.opened

This event occurs at the opening time for each order cycle. It fires for each user that is an **owner** of an enterprise that is either **coordinator** or **distributor** for the order cycle.

Example:

```json
{
  "id": "374e0a40-f1d4-410c-9dc3-965baddde66b",
  "at": "2023-02-07 17:12:45 +1100",
  "event": "order_cycle.opened",
  "data": {
    "id": 3813,
    "name": "Another test order cycle",
    "orders_open_at": "2023-02-07T17:10:00.000+11:00",
    "orders_close_at": "2023-02-08T12:00:00.000+11:00",
    "coordinator_id": 2515,
    "coordinator_name": "David's Dev Shop"
  }
}
```

### Post webhook on Payment status change

This event occurs every time there is a payment status change on an order which the user manages or owns, and was introduced to comply with regulations in Spain. The payload includes order details, seller details and line items.&#x20;

This webhook can be used in conjunction with a filter on 'event' to only include completed payments (e.g. event = payment.completed) to create instant producer notification workflows for example.

Example payload:

```json
{
  "id": "e252a5eb-9046-4ba4-b428-a6371feee891",
  "event": "payment.completed",
  "at": "2026-03-26 07:42:32 +0000",
  "data": {
    "payment": {
      "updated_at": "2026-03-26T07:42:32.912+00:00",
      "amount": 0,
      "state": "completed"
    },
    "enterprise": {
      "abn": "65797115831",
      "acn": "",
      "name": "TEST Enterprise",
      "address": {
        "address1": "1 testing street",
        "address2": "",
        "city": "TestCity",
        "zipcode": "1234"
      }
    },
    "order": {
      "number": "R555555555",
      "total": "0.0",
      "currency": "AUD",
      "line_items": [
        {
          "quantity": 1,
          "price": "20.0",
          "tax_category_name": "VAT",
          "product_name": "Test product",
          "name_to_display": null,
          "unit_to_display": "1kg"
        }
      ]
    }
  }
}
```
