Registra uso medido
Reporta un evento de uso contra una suscripción para que los cargos medidos se agreguen a la próxima factura.
POST /subscription/usage para reportar el consumo medido contra una suscripción. La facturación por uso te permite cobrar un monto variable además de la tarifa fija del plan — por ejemplo una suscripción base más un cargo por solicitud o por gigabyte.
Cómo los cargos medidos llegan a una factura
- Defines un medidor (p. ej.
api_requests) con un modo de agregación, y lo tarificas en un plan. - A lo largo del período de facturación llamas a
POST /subscription/usagepor cada evento de uso. - En la renovación, Therius agrega los eventos de ese período según el modo de agregación del medidor, resta las unidades incluidas del plan, aplica el esquema de tarificación y suma el resultado a la factura como su propia línea.
occurredAt.
Envía un header Idempotency-Key opcional cuando tu trabajo de reporte pueda reintentar — una repetición con el mismo par (meterCode, Idempotency-Key) devuelve el evento original con duplicate: true en vez de registrar un segundo.
Autorizaciones
Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).
Encabezados
Optional. A replay with the same (meterCode, Idempotency-Key) pair returns the original event instead of recording a second one. Use it when your reporting job may retry.
Cuerpo
UUID of the subscription the usage is attributed to.
The code of a usage meter belonging to your merchant account, e.g. api_requests.
"api_requests"
Non-negative quantity for this event, in the meter's units.
500
Your merchant account identifier.
Optional RFC 3339 timestamp of when the usage occurred. Defaults to the time the request is received. Determines which billing period the event falls into.
Respuesta
Event recorded, or the original event on an idempotent replay.
UUID of the usage event.
The meter the event was recorded against.
The recorded quantity.
Timestamp the event was attributed to (the billing-period key).
true when this response is an idempotent replay of a previously recorded event.

