Get the team's credits
/billing/credit-grant
Every live credit grant the team holds, and their total. Credits add up: each offer the team got gives its own grant. Also the last grants that ended.
Query Parameters
Response Body
The team's credits. They add up: a team holds one live grant per offer it got. Draws take from the grant that ends first, then the oldest.
The last 5 grants that ended, newest first.
19 properties
Credits given, in cents.
replaced only on grants from before credits added up.
expiredused_uprevokedenterprisereplaced
Pro is turned on, paid by the credits, when they switch on.
Credits left, in cents. 0 once ended.
startupsTruto for Startups2 properties
The most these credits pay of Pro. Null for no cap.
What is left of pro_cap_cents. Null for no cap, and once ended.
The card dialog asks whether Pro continues on the card after the credits end (pro_continue_consent).
This grant pays Pro now.
locked until the team saves a card.
lockedactiveended
The live grants (not ended), the one that ends first first. Empty when there are none.
19 properties
Credits given, in cents.
replaced only on grants from before credits added up.
expiredused_uprevokedenterprisereplaced
Pro is turned on, paid by the credits, when they switch on.
Credits left, in cents. 0 once ended.
startupsTruto for Startups2 properties
The most these credits pay of Pro. Null for no cap.
What is left of pro_cap_cents. Null for no cap, and once ended.
The card dialog asks whether Pro continues on the card after the credits end (pro_continue_consent).
This grant pays Pro now.
locked until the team saves a card.
lockedactiveended
Credits pay Pro now.
While true, DELETE /billing/add-on/pro is a 409.
When Pro can be turned off, the 1st of the month the credits end in. The credits pay that month; the card pays from the month after.
What the live grants gave, together.
Credits left across every live grant.
Errors
| Status | Description |
|---|---|
403 | Forbidden if the caller is not an admin of the team |
curl -X GET 'https://api.truto.one/billing/credit-grant' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/billing/credit-grant', {
method: 'GET',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/billing/credit-grant"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.get(url, headers=headers, params=params)
print(response.json())