> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Statement sent to payroll

> The payload Qobra sends with the send_to_payroll trigger: the statement reporting records of the statement sent to payroll.

Qobra sends this call each time a statement is sent to payroll, when the webhook subscribes to the `send_to_payroll` trigger. When several statements are sent to payroll at once, Qobra sends one call per statement. For the headers, the envelope and the delivery rules, see the [webhooks overview](https://docs.qobra.co/integration_documentation/webhook/webhook.md).

## Payload

`data` is the list of the statement reporting records of the statement. A statement has:

* one record per plan the user is paid on in the period;
* one record for the manual adjustments of the statement;
* one record for the draw of the statement.

Each record uses the format of the statement reporting records of the public API.

## Record fields

| Field | Type | Description |
| - | - | - |
| `id` | string | ID of the record |
| `source_id` | string | `<statement ID>-<plan ID>` for a plan record. The record of the manual adjustments ends with `-000000000000000000000000`, the record of the draw with `-000000000000000000000001`. |
| `user` | object | The user paid by the statement. See [User](#user). |
| `date` | string | Period of the statement, as `YYYY-MM-DD` |
| `plan` | string | Name of the plan |
| `statement_status` | string | Status of the statement |
| `payment` | number | Amount paid for the plan in the period |
| `target` | number | Target |
| `achievement` | number | Achievement |
| `target_achievement` | number | Achievement divided by the target |
| `on_target_earning` | number | On-target earnings |

Your statement reporting can hold more fields: the metrics your admins flag and map to the statement report, and one field per group dimension. Each one appears under its API key.

Every amount field comes with a `<key>_currency` field holding its ISO 4217 currency code, for example `payment` and `payment_currency`. Amounts are not rounded.

### User

| Field | Type | Description |
| - | - | - |
| `id` | string | ID of the user |
| `email` | string | Email of the user |
| `name` | string | Name of the user |
| `status` | string | `active`, `pending`, `inactive` or `archived` |
| `role` | string | Name of the user's role |
| `currency` | string | Payment currency of the user |
| `calculation_currency` | string | Calculation currency of the user |
| `<user-attribute-api-key>` | any | Value of each user attribute, under its API key. An amount attribute comes with `<user-attribute-api-key>_currency`. |

## Example

```json theme={null}
{
  "event": "send_to_payroll",
  "data": [
    {
      "id": "6729f3b4a1b2c3d4e5f60801",
      "source_id": "6729e8a1a1b2c3d4e5f60700-6600a1b2c3d4e5f6a7b8c9d0",
      "user": {
        "id": "6501a2b3c4d5e6f708192a3b",
        "email": "john.smith@example.com",
        "name": "John Smith",
        "status": "active",
        "role": "Sales rep",
        "currency": "EUR",
        "calculation_currency": "EUR",
        "payroll_id": "EMP-1042"
      },
      "date": "2026-10-01",
      "plan": "AE 2026 Plan",
      "payment": 4820.5,
      "payment_currency": "EUR",
      "target": 120000,
      "target_currency": "EUR",
      "achievement": 134400,
      "achievement_currency": "EUR",
      "on_target_earning": 5000,
      "on_target_earning_currency": "EUR"
    },
    {
      "id": "6729f3b4a1b2c3d4e5f60802",
      "source_id": "6729e8a1a1b2c3d4e5f60700-000000000000000000000000",
      "user": { "...": "same user" },
      "date": "2026-10-01",
      "payment": 250,
      "payment_currency": "EUR"
    }
  ]
}
```

To read statement reporting data from the API, for example to rebuild a payroll export, use [Fetch statements reporting](https://docs.qobra.co/api_reference/v2/endpoints/data/fetch_statements.md).
