Skip to main content
POST
Debit an account

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Path Parameters

id
string
required

Body

application/json
amount
string
required

Amount to credit or debit (string to support large numbers)

Example:

"1000"

reference
string
required

Your reference ID to link this transaction to an event in your system (e.g. order ID, campaign ID)

Example:

"signup_bonus"

idempotency_key
string
required

Idempotency key to prevent duplicate transactions

Example:

"idem_abc123"

moderation_id
string

ID of the Moderation API result (id from POST /v1/moderation/prompt) that authorizes this spend. Required when debiting a generation account (AI generation credits), optional on other accounts, and validated and linked whenever sent. The result must belong to this store, have decision allow, be inside its 24-hour window (at most 24 hours old and not dated in the future) and not already be linked to another transaction: each id can be used once. To debit again for the same prompt, screen it again and send the new id. An idempotent replay returns the original transaction and ignores a different moderation_id.

Maximum string length: 64
Example:

"3f1c2b9e-8d4a-4c7e-9b1a-2e5f6d7c8a90"

Response

Debit transaction created

id
string
required

Transaction ID

Example:

"cct_abc123"

store_id
string
required

Store ID

reference
string
required

Reference string

Example:

"order_xyz"

idempotency_key
string
required

Idempotency key

moderation_id
string | null
required

ID of the Moderation API result linked to this transaction, if one was sent with it

Example:

"3f1c2b9e-8d4a-4c7e-9b1a-2e5f6d7c8a90"

entries
object[]
required

Transaction entries

created_at
string
required

Creation timestamp

reversal_of
string | null

ID of the transaction this reverses, if applicable

Example:

"cct_abc123"