---
title: "Create a Credit"
method: POST
path: "/admin/credits"
tags: ["Admin"]
---

# Create a Credit

`POST /admin/credits`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/admin/credits`
- Auth: HTTP bearer

Post a credit grant or debit to the team ledger.

## Request body

- object
  - `amount` number, required
  - `type` 'DEBIT' | 'CREDIT', required
  - `team_id` string, uuid, nullable, required
  - `notes` string, nullable, required
  - `reason` string, nullable, required
  - `order_id` string, uuid
  - `credit_type` 'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL'
  - `expires_at` string, date-time, nullable
  - `idempotency_key` string

## Response `201`

Credit created successfully

- LedgerCredit
  - `id` string, uuid, required
  - `amount` number, required
  - `type` 'DEBIT' | 'CREDIT', required
  - `reason` string, nullable, required
  - `notes` string, nullable, required
  - `entity` string, nullable, required
  - `entity_id` string, nullable, required
  - `user_id` string, uuid, required
  - `team_id` string, uuid, nullable, required
  - `created_by` string, uuid, nullable, required
  - `created_at` union, required
    - string, nullable
    - string
    - unknown
  - `updated_at` union, required
    - string, nullable
    - string
    - unknown
  - `deleted_at` union, required
    - string, nullable
    - string
    - unknown
  - `credit_type` 'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL' | 'BONUS', nullable, required
  - `expires_at` union, required
    - string, nullable
    - string
    - unknown
  - `transaction_id` string, uuid, required
  - `legs` object[], required
    - `credit_type` 'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL' | 'BONUS', nullable, required
    - `direction` 'DEBIT' | 'CREDIT', required
    - `amount` number, required
  - `status` 'PENDING' | 'POSTED' | 'ARCHIVED', required
  - `external_source` string, nullable, required
  - `order_id` string, uuid, nullable, required

## Other responses

- `400`: The credit request failed validation
- `401`: The access token is missing or invalid, or the team has no owner
- `403`: Only staff (admins, support agents and writers) can post credits
- `404`: The order or the posted credit was not found
- `409`: The idempotency key was already used for a different request
- `422`: The team balance is insufficient for a debit
- `503`: The ledger is temporarily frozen (code LEDGER_FROZEN)

## Changes

- **2026-10-20** `2154581d845e`: 3 breaking, 2 warning, 1 info
  - the response's body type changed from `object` to no type for status `400`
  - removed the required property `message` from the response with the `400` status
  - removed the required property `name` from the response with the `400` status
  - removed the optional property `code` from the response with the `400` status
  - …2 more

[Operation history](https://skmtc.dev/presscart/apis/presscart-prod-api/changes/admin/credits/post.md)

---

[API](https://skmtc.dev/presscart/apis/presscart-prod-api.md) · [All operations](https://skmtc.dev/presscart/apis/presscart-prod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/presscart/apis/presscart-prod-api/revisions/2154581d845e?raw)
