Billing periods
Billing periods use theYYYY-MM format (e.g., 2026-03). If no period is specified, the current month is used.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Track API usage and billing for your partner account
YYYY-MM format (e.g., 2026-03). If no period is specified, the current month is used.
curl "https://api.contro.me/v1/partner/usage/summary?period=2026-03" \
-H "x-contro-api-key: $CONTRO_API_KEY"
const summary = await contro.usage.getSummary({ period: "2026-03" });
for (const item of summary.items) {
console.log(`${item.type}: ${item.count} operations, $${item.total}`);
}
summary = contro.usage.get_summary(period="2026-03")
for item in summary.items:
print(f"{item.type}: {item.count} operations, ${item.total}")
const summary = await fetch(
`${BASE_URL}/partner/usage/summary?period=2026-03`,
{ headers }
).then((r) => r.json());
for (const item of summary.items) {
console.log(`${item.type}: ${item.count} operations, $${item.total}`);
}
{
"period": "2026-03",
"items": [
{ "type": "card_issuance", "total": 150.00, "count": 30 },
{ "type": "transaction", "total": 45.50, "count": 910 },
{ "type": "kyc", "total": 75.00, "count": 25 },
{ "type": "monthly_fee", "total": 50.00, "count": 1 }
]
}
| Field | Type | Description |
|---|---|---|
type | string | Usage type. One of card_issuance, transaction, monthly_fee, api_call, kyc |
total | number | Total cost for this type in USD. Example: 150.00 |
count | number | Number of operations in this period. Example: 30 |
curl "https://api.contro.me/v1/partner/usage/records?period=2026-03&type=card_issuance&limit=50" \
-H "x-contro-api-key: $CONTRO_API_KEY"
const records = await contro.usage.listRecords({
period: "2026-03",
type: "card_issuance",
limit: 50,
});
records = contro.usage.list_records(period="2026-03", type="card_issuance", limit=50)
const records = await fetch(
`${BASE_URL}/partner/usage/records?period=2026-03&type=card_issuance&limit=50`,
{ headers }
).then((r) => r.json());
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default 1). |
limit | integer | Items per page (1–100, default 20). Example: 50 |
period | string | Billing period in YYYY-MM format. Example: "2026-03". |
type | string | Filter by usage type. One of card_issuance, transaction, monthly_fee, api_call, kyc. |
from | string | ISO 8601 start timestamp (inclusive) on createdAt. |
to | string | ISO 8601 end timestamp (inclusive) on createdAt. |
{
"data": [
{
"id": "usage_abc123",
"type": "card_issuance",
"amount": 5.00,
"referenceId": "card_def456",
"billingPeriod": "2026-03",
"createdAt": "2026-03-15T10:30:00Z"
}
],
"hasMore": true,
"nextCursor": "cursor_xyz"
}
| Field | Type | Description |
|---|---|---|
id | string | Usage record ID. Example: "usage_abc123" |
type | string | Usage type. One of card_issuance, transaction, monthly_fee, api_call, kyc |
amount | number | Cost for this operation in USD. Example: 5.00 |
referenceId | string | ID of the related resource (card, transaction, or cardholder). Example: "card_def456" |
billingPeriod | string | Billing period in YYYY-MM format. Example: "2026-03" |
createdAt | string | ISO 8601 creation timestamp. Example: "2026-03-15T10:30:00Z" |