Passer au contenu principal
POST
JavaScript

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

credit_entitlement_id
string
requis

Credit Entitlement ID

customer_id
string
requis

Customer ID

Corps

application/json

Request to create a ledger entry (credit or debit)

amount
string
requis

Amount to credit or debit

entry_type
enum<string>
requis

Entry type: credit or debit

Options disponibles:
credit,
debit
expires_at
string<date-time> | null

Expiration for credited amount (only for credit type)

idempotency_key
string | null

Idempotency key to prevent duplicate entries

metadata
null | Metadata · object

Optional metadata (max 50 key-value pairs, key max 40 chars, value max 500 chars)

reason
string | null

Human-readable reason for the entry

Réponse

Ledger entry created successfully

Response for creating a ledger entry

amount
string
requis
balance_after
string
requis
balance_before
string
requis
created_at
string<date-time>
requis
credit_entitlement_id
string
requis
customer_id
string
requis
entry_type
enum<string>
requis
Options disponibles:
credit,
debit
id
string
requis
is_credit
boolean
requis
overage_after
string
requis
overage_before
string
requis
grant_id
string | null
reason
string | null
Dernière modification le 1 avril 2026