Creating Subscriber Ids


I hope this community grows with wider contributions. I have just started looking at BilRun, more on an evaluation basis at this stage. My initial observations are that it is well structured, does the fundamental things required for a billing system (rating, discounting and invoicing).

However, attempting to create a PoC, I have found the documentation lacking in some aspects - especially how to model the common use cases.

Question 1
When you create a customer and a subscription with a set of services are associated to this customer, the subscriber_Id seems to be system generated (a number starting and incrementing by 1), So when you want to test the CDRs, how do you correlate the CLI in the incoming CDR to the subscriber? I had assumed that the subscriber id would be the CLI.

Question 2
I haven’t started looking at the apis (list looks great), but is there a Postman prescript to calculate the HMAC?

Thanks and regards,

Hi Satinder

Thank you for using BillRun.

For question #1 - you can match the field in the CDR to field in the subscriber entity (field can also be custom field).

For question #2 - Please share the code that you’ve used. We will share postman soon.


  1. I tried the exact code as listed in documentation for Python. I have also tried this python code

satinderpahwa@GO001001 billrun-docker % clear

satinderpahwa@GO001001 billrun-docker % python3

Python 3.7.3 (default, Apr 7 2020, 14:06:47)

[Clang 11.0.3 (clang-1103.0.32.59)] on darwin

Type “help”, “copyright”, “credits” or “license” for more information.

import requests

import hashlib

import hmac

import json

import time

secret = b’fd0bad92f692b0b9bc969086344e550d’

timestamp = str(int(time.time()))


params = ‘{“t”:"’ + timestamp + ‘“,“sid”:”’ + id + ‘"}’

message = str.encode(params)

signing =, message, hashlib.sha512)

sig = signing.hexdigest()

getParams = ‘t=’ + timestamp + ‘&sid=’ + id + ‘&sig=’ + sig

url = ‘http://localhost:8080/billapi/subscribers/get?’ + getParams

r = requests.get(url)


b’{“status”:0,“code”:17577,“message”:“Input parsing error”,“display”:{“code”:0,“desc”:“General error.”}}’



The code you put is not identical to the one in our documentation:

The query structure should be as follows:{“sid”:1}&page=0&size=1&t=XXXX&sig=YYYY

Please check and feedback.

Thanks, Ofer

I get the same message from the code in documentation. When I paste it here the underscores disappear - so tried to paste a picture,

Please put query argument with empty stringify object {}, means adding to the URL:


It should be also hashed and order of the variable is important to the hash.