---
title: "Charge subscription usage"
method: POST
path: "/api/v1/subscriptions/{id}/usage/charge"
tags: ["Subscriptions"]
---

# Charge subscription usage

`POST /api/v1/subscriptions/{id}/usage/charge`

Immediately charges usage for a subscription via the billing integration. Calculates usage since the last charge and creates an invoice.

## Path parameters

- `id` string, required

## Headers

- `X-ACCOUNT-ID` string
- `X-ENVIRONMENT-ID` string

## Request body

- ChargeSubscriptionUsageRequestDto — Request to immediately charge usage for a subscription.
  - `untilDate` string, date-time — Cutoff date for usage calculation. If not provided, the current time is used.

## Response `200`

The charge result including period, invoice ID, and usage details.

- ChargeSubscriptionUsageResponseDto — Response object
  - `data` object, required — Result of charging subscription usage including the billing period and charged items.
    - `subscriptionId` string, required — The subscription ID for which usage was charged
    - `periodStart` string, date-time, required — Start of the usage billing period
    - `periodEnd` string, date-time, required — End of the usage billing period
    - `invoiceBillingId` string, nullable, required — The invoice ID in the billing integration
    - `usageCharged` object[], required — Usage items that were charged
      - `featureId` string, nullable, required — The feature ID for which usage was charged
      - `usageAmount` number, required — The number of units charged

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — Subscription not found.
- `429` — Too many requests.

---

[API](https://skmtc.net/stiggio/apis/stigg-api.md) · [All operations](https://skmtc.net/stiggio/apis/stigg-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stiggio/stigg-api/versions/ffc977f1c07e/schema)
