---
title: "Purchase credits"
method: POST
path: "/v1/billing/credits/purchase"
tags: ["Billing"]
---

# Purchase credits

`POST /v1/billing/credits/purchase`

## Request

- Base URL: `https://api.inth.com`
- URL: `https://api.inth.com/v1/billing/credits/purchase`
- Auth: HTTP bearer

May charge the default method. Requires an approved current quote and catalogVersion. Retry uncertain outcomes with the same checkout UUID and payload; a different quantity/version needs a new UUID. Requires-action outcomes send the buyer to Dashboard without exposing payment secrets. Requires billing.write, a verified person and owner role. Subject to rollout-agent-access-writes (default off) and allow-public-agent-writes before account/provider effects. Return and person handoff URLs always use the canonical Dashboard origin; redirect URLs, payment details and provider tokens are not accepted.

## Request body

- BillingCreditPurchaseInput
  - `organizationId` string
  - `input` object, required
    - `checkoutAttemptId` string, uuid, required
    - `catalogVersion` integer, required
    - `credits` integer, required
  - `approvedQuote` object, required
    - `currency` string, required
    - `discount` object, nullable
      - `amount` integer, required
      - `label` string, nullable, required
    - `lineItems` object[], required
      - `amount` integer, required
      - `description` string, nullable, required
      - `label` string, required
    - `nextCycle` object, nullable, required
      - `startsAt` string, required
      - `total` integer, required
    - `subtotal` integer, required
    - `total` integer, required

## Response `200`

Purchase credits

- object
  - `success` true, required
  - `data` union, required
    - object
      - `status` 'completed', required
    - object
      - `status` 'failed', required
      - `code` 'checkout-attempt-conflict' | 'payment-action-required' | 'payment-declined' | 'payment-method-processing' | 'payment-method-invalid' | 'payment-provider-unavailable' | 'request-failed', required
      - `message` string, required
    - object
      - `status` 'already_active', required
    - object
      - `status` 'requires_action', required
      - `reason` 'payment_method' | 'payment_confirmation', required
      - `dashboardUrl` string, required
      - `checkoutAttemptId` string, uuid, required
    - object
      - `status` 'processing', required
      - `billingProviderInvoiceId` string, nullable, required
      - `dashboardUrl` string, required

## Other responses

- `400`: The request payload or parameters are invalid.
- `401`: Authentication is missing, invalid, or expired.
- `403`: The credential is valid but may not perform the operation. `INSUFFICIENT_SCOPE`: the credential was never granted the capability the operation needs. `details.requiredScope` names it, and the `WWW-Authenticate` header carries `Bearer error="insufficient_scope"`. An OAuth client fixes this by requesting the scope; an organization API key cannot gain it. `FORBIDDEN`: the capability is present but the membership behind the credential lacks the role, or the resource belongs to another organization.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the current resource state.
- `503`: The capability is temporarily paused by an operator. Retry later.

## Changes

- **2026-10-31** `a3f4100e14c9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/inth/apis/inth-api/changes/v1/billing/credits/purchase/post.md)

---

[API](https://skmtc.dev/inth/apis/inth-api.md) - [All operations](https://skmtc.dev/inth/apis/inth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/inth/apis/inth-api/revisions/8741280c3463?raw)
