Skip to main content
POST
/
v1
/
customer-credits
/
accounts
/
{id}
/
debit
Debit an account
curl --request POST \
  --url https://api.creem.io/v1/customer-credits/accounts/{id}/debit \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "amount": "1000",
  "reference": "signup_bonus",
  "idempotency_key": "idem_abc123"
}
'
{
  "id": "cct_abc123",
  "store_id": "<string>",
  "reference": "order_xyz",
  "idempotency_key": "<string>",
  "entries": [
    {
      "id": "cce_abc123",
      "transaction_id": "cct_abc123",
      "account_id": "cca_abc123",
      "side": "debit",
      "amount": "1000",
      "created_at": "<string>"
    }
  ],
  "created_at": "<string>",
  "reversal_of": "cct_abc123"
}

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"

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

entries
object[]
required

Transaction entries

created_at
string
required

Creation timestamp

reversal_of
object

ID of the transaction this reverses, if applicable

Example:

"cct_abc123"