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

# Record Usage

> Record metered usage against a subscription.

## Overview

Record usage for a metered subscription. The `idempotency_key` is required so
a retried report cannot bill a customer twice. Derive it from the thing being
reported, such as the subscription and the window, rather than generating a
random one.


## OpenAPI

````yaml POST /v1/subscriptions/{subscriptionId}/usage
openapi: 3.1.0
info:
  title: Reclack API
  version: 1.0.0
  description: >-
    Recurring and one-time stablecoin payments, taken straight from your
    customers' wallets.


    Reclack is non-custodial. Payments move from a customer's wallet to a
    settlement address you control, and Reclack never holds funds and never asks
    anyone for a seed phrase or a private key.


    ## Authentication


    Send your API key in the `Api-Key` header:


    ```

    Api-Key: rk_live_your_key_here

    ```


    `X-API-Key` is accepted too. The key prefix decides the environment:
    `rk_sandbox_` for test chains, `rk_live_` for production.


    ## Responses


    Objects and lists come back under `data`. Errors come back under `error`
    with a `type`, an optional `code` and a message written for a person.
servers:
  - url: https://api.reclack.com
    description: Sandbox and live, chosen by your key
security:
  - apiKeyAuth: []
tags:
  - name: Products
  - name: Prices
  - name: Customers
  - name: Subscriptions
  - name: Usage
  - name: Invoices
  - name: Checkouts
  - name: Payment links
  - name: Transactions
  - name: Webhooks
  - name: API keys
  - name: Settlement
paths:
  /v1/subscriptions/{subscriptionId}/usage:
    post:
      tags:
        - Usage
      summary: Record usage
      description: Record metered usage against a subscription.
      operationId: usage-record
      parameters:
        - name: subscriptionId
          in: path
          required: true
          schema:
            type: string
          description: The subscription being metered.
          example: sub_4Kd9
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                  description: Whole units of whatever you meter.
                  example: 48210
                idempotency_key:
                  type: string
                  description: Makes a retry safe.
                  example: sub_4Kd9:2026-10-18T22:00
                recorded_at:
                  type: string
                  format: date-time
                  description: When the usage happened. Defaults to now.
                metadata:
                  type: object
                  additionalProperties: true
                  description: Your own context, such as the meter name.
              required:
                - quantity
                - idempotency_key
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UsageRecord'
        '400':
          description: The request is missing something or contradicts itself
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No key, a revoked key, or a key that does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key is valid but is not allowed to do this
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            A record with that idempotency key already exists. The original
            stands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UsageRecord:
      type: object
      properties:
        id:
          type: string
          example: usg_9Kd2Zm
        subscription_id:
          type: string
          example: sub_4Kd9
        quantity:
          type: integer
          example: 48210
        idempotency_key:
          type: string
          example: sub_4Kd9:2026-10-18T22:00
        recorded_at:
          type: string
          format: date-time
          example: '2026-10-18T22:07:41Z'
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          example: '2026-10-18T22:07:41Z'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: >-
                One of invalid_request_error, authentication_error,
                permission_error or api_error.
              example: invalid_request_error
            code:
              type: string
              description: A stable, machine readable reason.
              example: price_not_found
            message:
              type: string
              description: A sentence written for a person.
              example: No price was found for that id
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: >-
        Your Reclack API key. The prefix decides the environment: rk_sandbox_
        for test chains, rk_live_ for production.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.