Customer Credits - Accounts

Debit an account

Changed on

Deduct credits from a customer account. Returns the resulting transaction record.

post/v1/customer-credits/accounts/{id}/debit

Request

Path parameters

idstring required

Request body

amountstring required

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

referencestring required

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

idempotency_keystring required

Idempotency key to prevent duplicate transactions

Example request

{
  "amount": "1000",
  "reference": "signup_bonus",
  "idempotency_key": "idem_abc123"
}

Response

Debit transaction created

idstring required

Transaction ID

store_idstring required

Store ID

referencestring required

Reference string

idempotency_keystring required

Idempotency key

reversal_ofstring nullable

ID of the transaction this reverses, if applicable

created_atstring required

Creation timestamp

Example response

{
  "id": "cct_abc123",
  "reference": "order_xyz",
  "reversal_of": "cct_abc123",
  "entries": [
    {
      "id": "cce_abc123",
      "transaction_id": "cct_abc123",
      "account_id": "cca_abc123",
      "amount": "1000"
    }
  ]
}

Changes

    • info

      api tag Customer Credits - Accounts added

    • info

      api tag Customer Credits - Accounts (Experimental) removed

    • breaking

      the response property became nullable for the status

    • breaking

      the ///// response's property type changed from object to string for status

    • breaking

      the ///// response's property type changed from object to string for status

    • breaking

      the response's property type changed from object to string for status