Frequently Asked Questions
Getting Started: From Zero Setup to a Rated DR How do price lists work in Billing Engine? How do rules work in Billing Engine?This guide walks you through the minimum setup — from login to your first DR with an assigned price. You can do it in 10 minutes.
Every step can be done via the Dashboard or directly via the API — your choice.
Dashboard: Sign in at /dashboard with your credentials.
API:
POST /api/v1/auth/login
Content-Type: application/json
{
"username": "your_login",
"password": "your_password"
}
The response returns a token. Add it to every subsequent request:
Authorization: Bearer <token>
A price list tells the system how much each type of record costs. The structure has three levels: Price List → Version → Items.
Dashboard: Go to Price Lists → click Add Price List.
API:
POST /api/v1/price-lists
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Standard Price List",
"currency": "EUR"
}
Response: { "id": "<price_list_id>" } — save this.
A version defines when prices take effect. It must have is_active: true to be used.
Dashboard: Open the price list → Versions tab → Add Version.
API:
POST /api/v1/price-lists/<price_list_id>/versions
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "v1",
"valid_from": "2024-01-01T00:00:00Z",
"is_active": true
}
Response: { "id": "<version_id>" } — save this.
An item says: “For code VOICE_CZ, charge €0.06 per unit.”
Dashboard: Open the version → Add Item.
API:
POST /api/v1/price-lists/versions/<version_id>/items
Authorization: Bearer <token>
Content-Type: application/json
{
"code": "VOICE_CZ",
"name": "Voice Call CZ",
"price": 0.06,
"currency": "EUR",
"unit": "minute"
}
The
codevalue must exactly match thecodefield in the DR you send in Step 4.
A pricing rule links a price list to your customers. Without a rule, the system doesn’t know which price list to use.
The setup below applies the price list to all your customers.
Dashboard: Go to Pricing Rules → Add Rule, select the price list.
API:
POST /api/v1/pricing-rules
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Default Rule",
"code": "RULE_DEFAULT",
"price_list_id": "<price_list_id>",
"priority": 10,
"is_active": true
}
A rule without
customer_idorgroup_idapplies to all customers. To target a specific segment, add"group_id": "<group_id>".
Now send your first data record. Use "ondemand": true for immediate pricing.
You don’t need to create customers in advance. Just provide any identifier in customer_external_id — the customer is created automatically on the first record.
POST /api/v1/dr
Authorization: Bearer <token>
Content-Type: application/json
{
"ondemand": true,
"records": [
{
"code": "VOICE_CZ",
"quantity": 10,
"time_from": "2024-06-15T10:00:00Z",
"customer_external_id": "CUST-001"
}
]
}
Response: { "inserted": 1, "ids": ["<dr_id>"] }
What happened behind the scenes:
CUST-001 was automatically created (no personal data required)VOICE_CZ10 × 0.06 = €0.60ratedGet invoice data for any period with a single call.
Dashboard: Go to Billing → set the date range → Show Summary.
API:
POST /api/v1/dr/billing
Authorization: Bearer <token>
Content-Type: application/json
{
"time_from": "2024-06-01T00:00:00Z",
"time_to": "2024-06-30T23:59:59Z",
"group_by": "code"
}
Response:
{
"items": [
{
"code": "VOICE_CZ",
"quantity": 10,
"amount_without_vat": 0.60,
"vat_amount": 0.00,
"amount": 0.60,
"currency": "EUR"
}
],
"summary": {
"amount_without_vat": 0.60,
"vat_amount": 0.00,
"amount": 0.60,
"currency": "EUR"
}
}
SMS_CZ, DATA_EU, …)customer_external_id values; customers are created automaticallygroup_idvalid_from; historical data stays unchangedA price list in Billing Engine is a hierarchical structure consisting of versions and items.
Each price list can have multiple versions — typically one is active, others are archived.
Each version contains pricing items identified by a code (e.g., VOICE_CZ, SMS_CZ).
When a data record (DR) arrives, the system:
price = quantity × unit_pricePrice lists are not assigned to customers directly. The link goes through:
This model allows a single price list to be shared across many customers and makes it easy to switch to new versions without changing each customer’s configuration individually.
Pricing rules determine which price list and version are applied to a given data record.
Each rule defines:
code = "VOICE_CZ" or quantity > 10The system iterates through rules from highest priority and applies the first one that matches the record.
Conditions support operators: eq, ne, gt, gte, lt, lte, like, in.
{ "code": { "op": "eq", "value": "VOICE_CZ" },
"quantity": { "op": "gt", "value": 0 } }
Triggers extend rules with automated actions. They fire when:
conditions)SUM(quantity) > 100 (aggregate_conditions)A trigger can send a notification or add a charge to the billing output.