Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

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

Path Parameters

credit_entitlement_id
string
required

Credit Entitlement ID

customer_id
string
required

Customer ID

Body

application/json

Request to create a ledger entry (credit or debit)

amount
string
required

Amount to credit or debit

entry_type
enum<string>
required

Entry type: credit or debit

Available options:
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

Response

Ledger entry created successfully

Response for creating a ledger entry

amount
string
required
balance_after
string
required
balance_before
string
required
created_at
string<date-time>
required
credit_entitlement_id
string
required
customer_id
string
required
entry_type
enum<string>
required
Available options:
credit,
debit
id
string
required
is_credit
boolean
required
overage_after
string
required
overage_before
string
required
grant_id
string | null
reason
string | null
Last modified on March 25, 2026