GET
/
customers
/
{customer_id}
/
credits
/
ledger
curl --request GET \
  --url https://api.withorb.com/v1/customers/{customer_id}/credits/ledger \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "metadata": {},
      "id": "<string>",
      "ledger_sequence_number": 123,
      "entry_status": "committed",
      "customer": {
        "id": "<string>",
        "external_customer_id": "<string>"
      },
      "starting_balance": 123,
      "ending_balance": 123,
      "amount": 123,
      "currency": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "credit_block": {
        "id": "<string>",
        "expiry_date": "2023-11-07T05:31:56Z",
        "per_unit_cost_basis": "<string>"
      },
      "entry_type": "increment"
    }
  ],
  "pagination_metadata": {
    "has_more": true,
    "next_cursor": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Path Parameters

customer_id
string | null
required

Query Parameters

limit
integer
default:
20

The number of items to fetch. Defaults to 20.

Required range: 1 < x < 100
cursor
string | null

Cursor for pagination. This can be populated by the next_cursor value returned from the initial request.

currency
string | null

The ledger currency or custom pricing unit to use.

minimum_amount
string | null
entry_type
enum<string> | null
Available options:
increment,
decrement,
expiration_change,
credit_block_expiry,
void,
void_initiated,
amendment
entry_status
enum<string> | null
Available options:
committed,
pending
created_at[gte]
string | null
created_at[gt]
string | null
created_at[lt]
string | null
created_at[lte]
string | null

Response

200
application/json
OK
data
object[]
required

The Credit Ledger Entry resource models prepaid credits within Orb.

pagination_metadata
object
required