Debt Lines

Debit a debt line ledger via the payin instrument

Changed on
post/debt-lines/{id}/debit/{ledger}

Request

Path parameters

idstring required

An object id with prefix

Example:user_0123456789ABCDEFGHIJKLMNOPq
ledger'collateral' | 'principal' | 'fees' required

ledger to debit

Headers

Idempotency-Keystring

A unique key per operation, could be V4 UUID or other high‑entropy random string. Keys can be up to 256 bytes. See Idempotent Requests.

Example:978771af-77de-4e24-ba39-f602502ceb78

Request body

amountinteger required

amount to debit from the originator via the payin instrument; at most the rail's direct debit limit (PAYIN_DEBIT_LIMITS)

descriptionstring required

description of the transaction

metadataobject

optional metadata to store on the ledger transaction

Example request

{
  "amount": 10000,
  "metadata": {
    "key": "value"
  }
}

Response

Successful operation

descriptionstring required

Non-empty text string

type'draw' | 'pledge' | 'pay' | 'due' | 'transfer' | 'fee' | 'adjustment' | 'reversal' | 'deposit' | 'withdraw' required
datestring date required

ISO 8601 date (YYYY-MM-DD). See Dates and Times.

status'pending' | 'settled' | 'canceled' required

The status of the transaction

settled_atstring date-time

Date and time on which the transaction was settled

internalobject

Internal system data for the transaction

idstring required

An object id with prefix

created_atstring date-time required

Creation date and time

created_bystring required

ID of the user that created this object

updated_atstring date-time required

Last update date and time

updated_bystring required

ID of the user that last updated this object

Example response

{
  "date": "2024-01-15",
  "ledger_entries": [
    {
      "account_id": "user_0123456789ABCDEFGHIJKLMNOPq",
      "date": "2024-01-15",
      "amount": -50.25,
      "id": "user_0123456789ABCDEFGHIJKLMNOPq",
      "created_at": "2024-01-15T10:30:00Z",
      "created_by": "user_0123456789ABCDEFGHIJKLMNOPq",
      "updated_at": "2024-01-15T10:30:00Z",
      "updated_by": "user_0123456789ABCDEFGHIJKLMNOPq"
    }
  ],
  "settled_at": "2024-01-15T10:30:00Z",
  "internal": {
    "key": "value"
  },
  "id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "created_at": "2024-01-15T10:30:00Z",
  "created_by": "user_0123456789ABCDEFGHIJKLMNOPq",
  "updated_at": "2024-01-15T10:30:00Z",
  "updated_by": "user_0123456789ABCDEFGHIJKLMNOPq"
}

Changes