Skip to content

Unified credit ledger — operation spend + credit purchases

GET
/v1/transactions
curl --request GET \
--url 'https://example.com/v1/transactions?limit=50&offset=0' \
--header 'Authorization: Bearer <token>'

One chronological credit ledger so the balance reconciles from a single list: operation SPEND (request_logs, negative deltas) UNIONed with credit PURCHASES (credit_transactions, positive deltas). Owner-scoped exactly like /v1/usage — B2B by client_id, tenant-billed (consumer/Shopify) by tenant_id (filtering a consumer by the empty client_id would leak every consumer’s rows).

limit
Limit
integer
default: 50 >= 1 <= 200
offset
Offset
integer
0
kind
Any of:
string

Filter to ‘spend’ (operations) or ‘purchases’. Omit for the full ledger.

X-Shopify-Hmac-Sha256
Any of:
string

Successful Response

Media type application/json
TransactionsResponse

GET /v1/transactions — the unified, paginated credit ledger.

object
items
required
Items
Array<object>
TransactionRow

One credit-ledger entry — an operation (spend) or a purchase (grant).

A single signed credits_delta makes the balance reconcile from one list: negative = credits consumed (net of any refund), positive = credits bought.

object
id
required
Id
string
kind
required
Kind

‘operation’ | ‘subscription’ | ‘pack’.

string
label
required
Label

Operation endpoint (humanized client-side) or the purchase description.

string
credits_delta
required
Credits Delta

Signed credit change: negative = spend (net of refund), positive = purchase.

integer
status
required
Status

Operation status (SUCCESS/REFUNDED/PENDING/FAILED) or ‘PURCHASED’.

string
created_at
Any of:
string
total
required
Total
integer
limit
required
Limit
integer
offset
required
Offset
integer
Example generated
{
"items": [
{
"id": "example",
"kind": "example",
"label": "example",
"credits_delta": 1,
"status": "example",
"created_at": "example"
}
],
"total": 1,
"limit": 1,
"offset": 1
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}