---
title: "Consume credits asynchronously"
method: POST
path: "/api/v1/credits/consumption/async"
tags: ["Credit consumption"]
---

# Consume credits asynchronously

`POST /api/v1/credits/consumption/async`

Consumes credits directly from customer wallets asynchronously. Consumptions are reconciled asynchronously into the credit balances.

## Headers

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

## Request body

- ConsumeCreditsAsyncRequestDto — Request body for consuming credits directly from wallets asynchronously
  - `consumptions` object[], required — The credit consumptions to report (up to 1000)
    - `customerId` string, required — The customer to consume credits from (required)
    - `currencyId` string, required — The credit currency to consume from (required)
    - `amount` number, required — The amount of credits to consume
    - `resourceId` string — Optional resource the consumption is attributed to
    - `idempotencyKey` string, required — A unique key used to deduplicate the consumption (required)
    - `dimensions` object — Optional dimensions describing the consumption
    - `createdAt` string, date-time — Optional timestamp the consumption is attributed to

## Response `202`

Confirmation that the credit consumptions were accepted for processing.

- ConsumeCreditsAsyncResponseResponseDto — Response object
  - `data` object, required — Confirmation that the credit consumptions were accepted for processing

## Other responses

- `400` — bad request.
- `401` — User is not authenticated.
- `403` — User is not allowed to access this resource.
- `404` — CreditConsumption 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/revisions/3e2c8cfcd035/schema)
