Skip to main content
POST
/
v1
/
billing
/
calculate
curl --request POST \
  --url https://fees.sandbox.lerian.net/v1/billing/calculate \
  --header 'Content-Type: <content-type>' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '
{
  "ledgerId": "ldg_01HZ...",
  "period": "2026-03",
  "type": "volume"
}
'
{
  "results": [
    {
      "billingPackageId": "<string>",
      "billingPackageLabel": "<string>",
      "billingType": "volume",
      "period": "<string>",
      "totalAccounts": 123,
      "totalCharged": 123,
      "totalSkipped": 123,
      "totalNetAmount": "<string>",
      "transactionPayload": {}
    }
  ],
  "summary": {
    "totalResults": 123,
    "totalVolume": 123,
    "totalMaintenance": 123,
    "totalNetAmount": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt

Use this file to discover all available pages before exploring further.

Headers

X-Organization-Id
string
required

The unique identifier of the Organization associated with the request.

Example:

"019c96a0-0a98-7287-9a31-786e0809c769"

Authorization
string

The authorization token in the 'Bearer ' format.

Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Content-Type
string
required

The type of media of the resource. Must be application/json.

Example:

"application/json"

Body

application/json
ledgerId
string
required

Unique identifier of the Ledger to calculate billing for.

period
string
required

Billing period. Supported formats: YYYY-MM (monthly), YYYY-Www (weekly, e.g. 2026-W13), or YYYY-MM-DD (daily).

type
enum<string>

Filter by billing type. When omitted, both volume and maintenance packages are calculated.

Available options:
volume,
maintenance

Response

Billing calculation results with transaction payloads.

results
object[]

One result per active billing package processed.

summary
object

Consolidated totals across all results.