Get the credit balance
The organization's prepaid EHU balance, the price per EHU for a bundle (after any offer agreed for the organization), the smallest bundle that can be bought, the suggested bundle sizes, and the last 50 movements on the balance, newest first.
Credit is used before the card: a statement draws on it after the
free allowance. Bought credit never expires; credit given by EvoHub
(a campaign or a goodwill grant) may, at expires_at.
can_purchase is false while there is no saved card. Bundles are
bought in the console.
Requires the billing:usage:read scope.
Authorization
Responses
200
The credit balance.
dataCreditSummaryShow CreditSummary properties
balance_ehunumberusd_per_ehunumberThe bundle price per EHU.minimum_ehunumberThe smallest bundle that can be bought.presetsarray of numberSuggested bundle sizes, in EHU.entriesarray of CreditEntryThe last 50 movements, newest first.Show CreditEntry properties
idintegerorg_idstringkindstringpurchase: a bundle bought.grant: credit given by EvoHub.consumption: a statement drew on the balance (negative).adjustment: a correction.ehunumberPositive adds to the balance, negative spends it.usd_paidnumberWhat was paid, for a purchase.reasonstringgranted_bystringWho at EvoHub gave a grant. Left out for anything automatic.stripe_refstringThe payment a purchase was made with.receipt_urlstring (uri)invoice_urlstring (uri)invoice_pdf_urlstring (uri)period_startstring (date-time)The statement that consumed it, for a consumption.expires_atstring (date-time)When given credit stops counting. Bought credit never expires.created_atstring (date-time)
can_purchasebooleanfalsewhile no card is saved.
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
The balance could not be loaded (CREDIT_UNAVAILABLE). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X GET 'https://evohub.io/api/v1/billing/credit' \
-H 'Authorization: Bearer <TOKEN>'
