Billing history
Retrieves billing history for your Bytio account. You can use this endpoint to retrieve payment reciepts and monthly invoices.
curl --request GET \
--url https://api.bytio.com/v1/account/billinghistory \
--header 'X-API-KEY: <api-key>'
{
"status": "ok",
"pagination": {
"total_pages": 1,
"current_page": 1,
"total_count": 123,
"per_page": 123
},
"billing_histories": [
{
"type": "invoice",
"created_on": "2023-11-07T05:31:56Z",
"name": "December 2025",
"usage_charges_cents": 123,
"standing_charges_cents": 123,
"tax_cents": 123,
"total_cents": 123,
"invoice_url": "<string>",
"reciept_url": "<string>",
"payment_type": "manual_top_up",
"status": "succeeded",
"payment_method": {
"type": "paypal",
"email": "adam.smith@email.com",
"brand": "visa",
"expires_month": 11,
"expires_year": 2036,
"last4": 4005,
"wallet": "<string>"
}
}
]
}
Authorizations
Query Parameters
The type of billing history entries to retrieve.
all
to retrieve all billing history entries.
invoice
to retrieve only monthly invoices.
payment
to retrieve only payments (account balance top ups).
all
, invoice
, payment
The page of results to return.
1 < x < 1000
The number of billing history entries to return per-page between 1 and 100. The default is 10.
1 < x < 100
Response
ok
The type of billing history entry:
invoice
for monthly invoices.
payment
for payment reciepts (for account balance top ups).
invoice
, payment
The UTC date and time the of the billing history entry, in ISO 8601 format.
Only present when type=invoice
. Returns the human-readable name of the invoice, typically the month and year the invoice relates to.
Only present when type=invoice
. The amount, in cents, of the invoice that relates to usage (i.e. bandwidth) charges. Note that fractional cents are returned here but the platform rounds up to 2 decimal places for billing purposes.
Only present when type=invoice
. The amount, in cents, of the invoice that relates to standing (i.e. time-based) charges such as IP reservations). Note that fractional cents are returned here but the platform rounds up to 2 decimal places for billing purposes.
Only present when type=invoice
. The total amount, in cents, of tax charged on the invoice (if applicable in your jurisdiction). Note that fractional cents are returned here but the platform rounds up to 2 decimal places for billing purposes.
Iftype=invoice
total_cents
returns the total amount, in cents, of the invoice.
Iftype=payment
total_cents
returns the total amount, in cents, of the payment.
Note that fractional cents are returned here but the platform rounds up to 2 decimal places for billing purposes.
Only present when type=invoice
. A link to download the invoice in PDF format.
Only present when type=payment
. A link to download the reciept in PDF format.
Only present when type=payment
. The type of payment:
manual_top_up
for top up payments made via the Dashboard.
manual_top_up
Only present when type=payment
. The outcome of the payment:
succeeded
the payment was successful.
failed
the payment failed.
succeeded
, failed
The type of payment method.
card
the stored payment method is a card (see brand
for the brand of card).
paypal
the stored payment method is PayPal.
card
, paypal
If type=paypal
then email
returned the email address associated with the PalPal account.
Present when type=card
and returns the brand of the payment card. Key is absent otherwise.
Present when type=card
and returns the expiry month of the payment card (1
being January, 12
being December). Key is absent otherwise.
Present when type=card
and returns the 4-digit expiry year of the payment card. Key is absent otherwise.
Present when type=card
and returns the 4-digits of the payment card. Key is absent otherwise.
Present when type=card
and returns the name of the wallet the payment card was set up via - i.e. Apple Pay, Google Pay. Key is absent otherwise.
curl --request GET \
--url https://api.bytio.com/v1/account/billinghistory \
--header 'X-API-KEY: <api-key>'
{
"status": "ok",
"pagination": {
"total_pages": 1,
"current_page": 1,
"total_count": 123,
"per_page": 123
},
"billing_histories": [
{
"type": "invoice",
"created_on": "2023-11-07T05:31:56Z",
"name": "December 2025",
"usage_charges_cents": 123,
"standing_charges_cents": 123,
"tax_cents": 123,
"total_cents": 123,
"invoice_url": "<string>",
"reciept_url": "<string>",
"payment_type": "manual_top_up",
"status": "succeeded",
"payment_method": {
"type": "paypal",
"email": "adam.smith@email.com",
"brand": "visa",
"expires_month": 11,
"expires_year": 2036,
"last4": 4005,
"wallet": "<string>"
}
}
]
}