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

# Climate compensations

> Create and list Neuro-Pay climate compensations

## Climate compensation contracts overview

To use climate compensations, you must configure both a template contract and a price contract in Neuro-Pay. This is done via **Company admin → Settings → Compensation Contracts**. These contracts define the terms and pricing for all compensation operations.

## Endpoints

| Method | Path                               | Purpose                                          |
| ------ | ---------------------------------- | ------------------------------------------------ |
| `POST` | `/co2-compensation/create`         | Create a compensation                            |
| `GET`  | `/co2-compensation/customer/{cid}` | List compensations for one customer profile      |
| `GET`  | `/co2-compensation/company-all`    | List compensations for the authenticated company |

## Create compensation

`POST /co2-compensation/create`

### Request body

```json theme={null}
{
  "customer_id": "co2_profile_cid",
  "qty": 120.5,
  "comment": "April footprint",
  "external_reference": "offset-2026-04",
  "profile_reference": "crm-123",
  "accumulation_period": "monthly"
}
```

### Fields

| Field                 | Type   | Required | Notes                                                                       |
| --------------------- | ------ | -------- | --------------------------------------------------------------------------- |
| `customer_id`         | string | yes      | Climate customer profile CID                                                |
| `qty`                 | number | yes      | Quantity of CO2 units to compensate                                         |
| `comment`             | string | no       | Optional note                                                               |
| `external_reference`  | string | no       | Your own reference value                                                    |
| `profile_reference`   | string | no       | Must belong to the referenced customer profile                              |
| `email`               | string | no       | Used as the owner email for direct accumulation flows                       |
| `accumulation_period` | string | no       | `default`, `direct`, `daily`, `weekly`, `monthly`, `quarterly`, or `yearly` |

### Response shape

```json theme={null}
{
  "cid": "compensation_cid",
  "profile_id": "co2_profile_cid",
  "qty": 120.5,
  "unit": "kgs",
  "amount": 15062,
  "currency_id": "SEK",
  "token_id": null,
  "owner_email": "climate@example.com",
  "external_reference": "offset-2026-04",
  "profile_reference": "crm-123",
  "comment": "April footprint",
  "accumulation_period": "monthly",
  "status": "created"
}
```

`amount` is returned in minor units.

## List compensations for a customer

`GET /co2-compensation/customer/{cid}`

Returns an array of compensation objects for the specified climate customer
profile CID.

## List compensations for the authenticated company

`GET /co2-compensation/company-all`

Returns all compensation objects for the authenticated company.
