Skip to main content
POST
JavaScript

التفويضات

Authorization
string
header
مطلوب

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

معلمات المسار

credit_entitlement_id
string
مطلوب

Credit Entitlement ID

customer_id
string
مطلوب

Customer ID

الجسم

application/json

Request to create a ledger entry (credit or debit)

amount
string
مطلوب

Amount to credit or debit

entry_type
enum<string>
مطلوب

Entry type: credit or debit

الخيارات المتاحة:
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

الاستجابة

Ledger entry created successfully

Response for creating a ledger entry

amount
string
مطلوب
balance_after
string
مطلوب
balance_before
string
مطلوب
created_at
string<date-time>
مطلوب
credit_entitlement_id
string
مطلوب
customer_id
string
مطلوب
entry_type
enum<string>
مطلوب
الخيارات المتاحة:
credit,
debit
id
string
مطلوب
is_credit
boolean
مطلوب
overage_after
string
مطلوب
overage_before
string
مطلوب
grant_id
string | null
reason
string | null
آخر تعديل في ١ أبريل ٢٠٢٦