Chuyển đến nội dung chính
POST
JavaScript

Ủy quyền

Authorization
string
header
bắt buộc

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

Tham số đường dẫn

credit_entitlement_id
string
bắt buộc

Credit Entitlement ID

customer_id
string
bắt buộc

Customer ID

Nội dung

application/json

Request to create a ledger entry (credit or debit)

amount
string
bắt buộc

Amount to credit or debit

entry_type
enum<string>
bắt buộc

Entry type: credit or debit

Tùy chọn có sẵn:
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

Phản hồi

Ledger entry created successfully

Response for creating a ledger entry

amount
string
bắt buộc
balance_after
string
bắt buộc
balance_before
string
bắt buộc
created_at
string<date-time>
bắt buộc
credit_entitlement_id
string
bắt buộc
customer_id
string
bắt buộc
entry_type
enum<string>
bắt buộc
Tùy chọn có sẵn:
credit,
debit
id
string
bắt buộc
is_credit
boolean
bắt buộc
overage_after
string
bắt buộc
overage_before
string
bắt buộc
grant_id
string | null
reason
string | null
Lần sửa đổi cuối 1 tháng 4, 2026