Subscriptions

Report usage of a metered add-on

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.

post/api/v1/subscriptions/{id}/usage-records

Request

  • Base URL
    https://merchant.zahlo.eu
  • Auth
    API key in header x-api-key

Path parameters

idstring required

The resource identifier returned by the merchant API.

Headers

Idempotency-Keystring

Retry-safe key for create operations.

Request body

priceIdstring

A metered add-on of the subscription; required when it has several.

quantityinteger required

Response

Successful response

idstring required
object'usage_record' required
livemodeboolean
createdAtstring date-time
subscriptionIdstring required
priceIdstring required
quantityinteger required
occurredAtstring date-time required
billedboolean

Changes

No recorded changes to this operation across all 1 revision of this API.