---
title: "Report usage of a metered add-on"
method: POST
path: "/api/v1/subscriptions/{id}/usage-records"
tags: ["Subscriptions"]
---

# Report usage of a metered add-on

`POST /api/v1/subscriptions/{id}/usage-records`

## Request

- Base URL: `https://merchant.zahlo.eu`
- URL: `https://merchant.zahlo.eu/api/v1/subscriptions/{id}/usage-records`
- Auth: API key in header `x-api-key`

Usage is billed in arrears: the charge that starts the next period adds the usage of the period it occurred in. amount_exceeds_subscription_limit when unbilled usage would take that charge over the per-charge cap; 409 state_conflict on a cancelled subscription or one ending at the period end.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- UsageRecordCreateRequest
  - `priceId` string: A metered add-on of the subscription; required when it has several.
  - `quantity` integer, required

## Response `200`

Successful response

- UsageRecord
  - `id` string, required
  - `object` 'usage_record', required
  - `livemode` boolean
  - `createdAt` string, date-time
  - `subscriptionId` string, required
  - `priceId` string, required
  - `quantity` integer, required
  - `occurredAt` string, date-time, required
  - `billed` boolean

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Request conflicts with existing state

---

[API](https://skmtc.dev/zahlo/apis/zahlo-merchant-api.md) - [All operations](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/revisions/8fcbef981e0d?raw)
