Generated from the OpenAPI contract sha256:223ebdfc2cc1ca82…. How this works.

Credits

4 operations on the Logion v1 API.

Get credit balance

GET /v1/credits/balance

Operation id: get_credit_balance

Takes an Authorization header.

Responses

Status Meaning Schema
200 Successful response GetCreditBalanceResponse
401 Unauthorized ErrorResponse
422 Validation Error HTTPValidationError

Returns GetCreditBalanceResponse:

Field Type Required Notes
balance_cents integer yes
currency_code string no default "USD_CREDIT"

List credit ledger

GET /v1/credits/ledger

Operation id: list_credit_ledger

Takes an Authorization header.

Responses

Status Meaning Schema
200 Successful response
401 Unauthorized ErrorResponse
422 Validation Error HTTPValidationError

Returns ListCreditLedgerResponse[].

Create credit top-up

POST /v1/credits/top-ups

Operation id: create_credit_top_up

Takes an Authorization header.

Request body

Body CreateCreditTopUpRequest:

Field Type Required Notes
amount_cents integer yes
currency string no default "usd"

Responses

Status Meaning Schema
201 Credit top-up checkout created CreateCreditTopUpResponse
400 Unsupported currency ErrorResponse
401 Unauthorized ErrorResponse
404 User not found ErrorResponse
422 Invalid top-up amount ErrorResponse
503 Payment configuration unavailable ErrorResponse

Returns CreateCreditTopUpResponse:

Field Type Required Notes
amount_cents integer yes
charge_amount_minor integer yes
charge_currency string yes
checkout_url string, optional no
credit_cents_granted integer yes
status enum("pending", "paid", "failed", "expired", "cancelled", "disputed", "reversed") yes
stripe_checkout_session_id string, optional no
top_up_id string(uuid) yes

From the CLI

Get credit top-up

GET /v1/credits/top-ups/{top_up_id}

Operation id: get_credit_top_up

Takes an Authorization header.

Parameters

Name In Type Required
top_up_id path string(uuid) yes

Responses

Status Meaning Schema
200 Successful response GetCreditTopUpResponse
401 Unauthorized ErrorResponse
404 Top-up not found ErrorResponse
422 Validation Error HTTPValidationError

Returns GetCreditTopUpResponse:

Field Type Required Notes
amount_cents integer yes
charge_amount_minor integer yes
charge_currency string yes
checkout_url string, optional no
credit_cents_granted integer yes
status enum("pending", "paid", "failed", "expired", "cancelled", "disputed", "reversed") yes
stripe_checkout_session_id string, optional no
top_up_id string(uuid) yes

From the CLI