Read accepted usage and monthly invoice settlements
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage-settlements \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage-settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/usage-settlements"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/usage-settlements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"settlements": [
{}
],
"usage": [
{}
],
"settlement_mode": "draft_then_staff_review",
"automatic_collection": false,
"usage_limit": 500,
"settlement_limit": 200
}Billing
Accepted usage and monthly invoices
Read your workspace’s accepted usage classifications and monthly invoice settlements.
GET
/
v1
/
billing
/
usage-settlements
Read accepted usage and monthly invoice settlements
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage-settlements \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage-settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/usage-settlements"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/usage-settlements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"settlements": [
{}
],
"usage": [
{}
],
"settlement_mode": "draft_then_staff_review",
"automatic_collection": false,
"usage_limit": 500,
"settlement_limit": 200
}Requires authentication and returns only the caller’s workspace records. This endpoint does not generate, approve, or pay invoices.
usage contains up to 500 grouped records. Read environment, classification, quantity, currency, and amount_cents together. rated means the pricing snapshot was preserved at billing acceptance. Sandbox, free plans, consumer plans, approved pilots, and historical mint retries are excluded from business usage charges. Unresolved core pricing or environment evidence holds the month for staff review.
settlements contains up to 200 monthly invoice records, newest first. A DRAFT is not payable. Staff must review the accepted commercial agreement, tax, and billing country before issue. automatic_collection is always false for this workflow: issuing an invoice does not charge a saved payment method.
The UTC billing month uses acceptance time. Existing aggregate counters are not retroactively invoiced. Continue using the same mint idempotency key if a mint reports that its billing receipt could not be confirmed.
Amounts ending in _cents are integer cents. The separately retrieved invoice uses currency units. For example, amount_cents: 2500 corresponds to USD 25.00.Authorizations
API key for machine-to-machine authentication

