Client billing portal
Get Client Billing
Reads the caller's billing plan, offered prices, next charge and masked card.
GEThttps://api.toku.com/platform/get-client-billing
Not available to API keys.
curl --request GET \
--url 'https://api.toku.com/platform/get-client-billing' \
--header 'Authorization: Bearer <token>'200 response
{
"available": true,
"canStart": true,
"canResume": true,
"agreement": {
"version": "string",
"url": "string"
},
"plans": [
{
"catalogVersion": "string",
"name": "string",
"billingInterval": "MONTHLY",
"trialDays": 0,
"priceDescription": "string",
"periodAmount": "string",
"currency": "string",
"seats": [
"string"
],
"current": true,
"preview": {
"takesEffect": "START",
"fromMonth": "string",
"firstCharge": {
"on": "string",
"amount": "string",
"currency": "string"
}
}
}
],
"details": {
"legalName": "string",
"billingAddress": "string",
"billingEmails": [
"string"
],
"companyName": "string",
"editable": true
},
"plan": {
"name": "string",
"catalogVersion": "string",
"billingInterval": "MONTHLY",
"status": "TRIALING",
"trialEndsAt": "string",
"paidThroughMonth": "string",
"cancelFromMonth": "string",
"seats": [
{
"label": "string",
"quantity": 0,
"billedQuantity": 0,
"description": "string"
}
],
"nextCharge": {
"on": "string",
"amount": "string",
"currency": "string"
},
"scheduledChange": {
"catalogVersion": "string",
"name": "string",
"billingInterval": "MONTHLY",
"fromMonth": "string"
},
"canChange": true,
"cancelFromMonthIfCancelled": "string"
},
"card": {
"brand": "string",
"last4": "string",
"expMonth": 0,
"expYear": 0
}
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.
Response
200Successful response
availablebooleanrequiredcanStartbooleanrequiredcanResumebooleanrequiredagreementobject | nullrequiredShow child attributes
versionstringrequiredurlstringrequiredplansobject[]requiredShow child attributes
catalogVersionstringrequirednamestringrequiredbillingIntervalstringrequiredAvailable options: MONTHLY, ANNUAL
trialDaysintegerrequiredpriceDescriptionstringrequiredperiodAmountstringrequiredcurrencystringrequiredseatsstring[]requiredcurrentbooleanrequiredpreviewobject | nullrequiredShow child attributes
takesEffectstringrequiredAvailable options: START, NOW, NEXT_PERIOD
fromMonthstring | nullrequiredfirstChargeobjectrequiredShow child attributes
onstringrequiredamountstringrequiredcurrencystringrequireddetailsobjectrequiredShow child attributes
legalNamestring | nullrequiredbillingAddressstring | nullrequiredbillingEmailsstring[]requiredcompanyNamestringrequirededitablebooleanrequiredplanobject | nullrequiredShow child attributes
namestringrequiredcatalogVersionstringrequiredbillingIntervalstringrequiredAvailable options: MONTHLY, ANNUAL
statusstringrequiredAvailable options: TRIALING, ACTIVE, PAST_DUE, PENDING_PAYMENT, CANCELLED
trialEndsAtstring | nullrequiredpaidThroughMonthstring | nullrequiredcancelFromMonthstring | nullrequiredseatsobject[]requiredShow child attributes
labelstringrequiredquantityintegerrequiredbilledQuantityintegerrequireddescriptionstringrequirednextChargeobject | nullrequiredShow child attributes
onstringrequiredamountstringrequiredcurrencystringrequiredscheduledChangeobject | nullrequiredShow child attributes
catalogVersionstringrequirednamestringrequiredbillingIntervalstringrequiredAvailable options: MONTHLY, ANNUAL
fromMonthstringrequiredcanChangebooleanrequiredcancelFromMonthIfCancelledstring | nullrequiredcardobject | nullrequiredShow child attributes
brandstringrequiredlast4stringrequiredexpMonthintegerrequiredexpYearintegerrequired400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits