API ReferenceBilling
Show this billing period's metered usage and the cost so far
Show this billing period's metered usage and the cost so far.
Requires the billing:read scope — See your plan, usage, invoices and spending limits.
better-auth.session_token<token>
BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.
In: cookie
Path Parameters
id*string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/users/me/projects/string/billing-consumption"{
"period": {
"start": "string",
"end": "string"
},
"usage": {
"total": 0,
"records": [
null
]
},
"credits": {
"balance": 0,
"hasCredits": true,
"creditAmount": 0,
"currency": "string"
},
"upcomingInvoice": {
"amountDue": 0,
"currency": "string",
"periodStart": "string",
"periodEnd": "string",
"subtotal": 0,
"total": 0
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}