Billing
Get billing information from the Fiskil API.
AI Actions
The Billing endpoint provides billing transaction history for energy accounts.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/billing | Get billing data for an end user |
The Billing Model
| Attribute | Type | Description |
|---|---|---|
account_id | string | ID of the energy account |
transaction_id | string | Unique billing transaction ID |
type | string | Transaction type (USAGE, PAYMENT, ADJUSTMENT) |
amount | number | Transaction amount |
currency | string | Currency code |
date | string | Transaction date |
description | string | Description of the transaction |
Example Response
{
"account_id": "energy_acc_123",
"transaction_id": "bill_txn_456",
"type": "USAGE",
"amount": -185.50,
"currency": "AUD",
"date": "2023-01-15",
"description": "Electricity usage charges - December 2022"
}Get Billing Data
Retrieve billing information for an end user's energy accounts.
GET https://api.fiskil.com/v1/billingQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
end_user_id | string | Yes | The ID of the end user |
account_id | string | No | Filter by specific account ID |
from_date | string | No | Start date (YYYY-MM-DD) |
to_date | string | No | End date (YYYY-MM-DD) |
page[size] | integer | No | Number of results (max 1000) |
page[after] | string | No | Cursor for pagination |
Example Request
curl --request GET \
--url 'https://api.fiskil.com/v1/billing?end_user_id=482c0e2b-5866-46b1-b795-220b7bba45b5' \
--header 'Authorization: Bearer {access_token}' \
--header 'accept: application/json; charset=UTF-8'const response = await fetch(
'https://api.fiskil.com/v1/billing?end_user_id=482c0e2b-5866-46b1-b795-220b7bba45b5',
{
method: 'GET',
headers: {
'Authorization': 'Bearer {access_token}',
'accept': 'application/json; charset=UTF-8'
}
}
);
const billing = await response.json();import requests
response = requests.get(
'https://api.fiskil.com/v1/billing',
params={'end_user_id': '482c0e2b-5866-46b1-b795-220b7bba45b5'},
headers={
'Authorization': 'Bearer {access_token}',
'accept': 'application/json; charset=UTF-8'
}
)
billing = response.json()Example Response
{
"data": [
{
"account_id": "energy_acc_123",
"transaction_id": "bill_txn_456",
"type": "USAGE",
"amount": -185.50,
"currency": "AUD",
"date": "2023-01-15",
"description": "Electricity usage charges - December 2022"
},
{
"account_id": "energy_acc_123",
"transaction_id": "bill_txn_457",
"type": "PAYMENT",
"amount": 200.00,
"currency": "AUD",
"date": "2023-01-20",
"description": "Payment received - Thank you"
}
],
"links": {
"next": "https://api.fiskil.com/v1/billing?end_user_id=482c0e2b-5866-46b1-b795-220b7bba45b5&page[after]=abc123"
}
}Transaction Types
| Type | Description |
|---|---|
USAGE | Energy usage charges |
PAYMENT | Payment received |
ADJUSTMENT | Billing adjustment or credit |
FEE | Fees and charges |
CONCESSION | Concession discount applied |
Related Endpoints
- Energy Accounts - Get account details
- Energy Balances - Get current balance
- Invoices - Get invoice documents
Was this page helpful?