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

Authorizationstringheaderrequired

Bearer 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
availablebooleanrequired
canStartbooleanrequired
canResumebooleanrequired
agreementobject | nullrequired
Show child attributes
versionstringrequired
urlstringrequired
plansobject[]required
Show child attributes
catalogVersionstringrequired
namestringrequired
billingIntervalstringrequired

Available options: MONTHLY, ANNUAL

trialDaysintegerrequired
priceDescriptionstringrequired
periodAmountstringrequired
currencystringrequired
seatsstring[]required
currentbooleanrequired
previewobject | nullrequired
Show child attributes
takesEffectstringrequired

Available options: START, NOW, NEXT_PERIOD

fromMonthstring | nullrequired
firstChargeobjectrequired
Show child attributes
onstringrequired
amountstringrequired
currencystringrequired
detailsobjectrequired
Show child attributes
legalNamestring | nullrequired
billingAddressstring | nullrequired
billingEmailsstring[]required
companyNamestringrequired
editablebooleanrequired
planobject | nullrequired
Show child attributes
namestringrequired
catalogVersionstringrequired
billingIntervalstringrequired

Available options: MONTHLY, ANNUAL

statusstringrequired

Available options: TRIALING, ACTIVE, PAST_DUE, PENDING_PAYMENT, CANCELLED

trialEndsAtstring | nullrequired
paidThroughMonthstring | nullrequired
cancelFromMonthstring | nullrequired
seatsobject[]required
Show child attributes
labelstringrequired
quantityintegerrequired
billedQuantityintegerrequired
descriptionstringrequired
nextChargeobject | nullrequired
Show child attributes
onstringrequired
amountstringrequired
currencystringrequired
scheduledChangeobject | nullrequired
Show child attributes
catalogVersionstringrequired
namestringrequired
billingIntervalstringrequired

Available options: MONTHLY, ANNUAL

fromMonthstringrequired
canChangebooleanrequired
cancelFromMonthIfCancelledstring | nullrequired
cardobject | nullrequired
Show child attributes
brandstringrequired
last4stringrequired
expMonthintegerrequired
expYearintegerrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits