Billing system integration with ChirpStack Application Server

I am wondering about any Golang written library/framework that able to implement Billing functionality such as tarifing depending on working time, amount of end nodes, able to generate PDF invoices to payment, send them using email, payment processing.
Or maybe any plans to implement it in ChirpStack?

I don’t have any plans to integrate this within ChirpStack directly, but I do facilitate this. You could implement the Controller interface and use this together with the ChirpStack Network Server. See for example:

	// HandleUplinkMetaData handles uplink meta-rata.
	rpc HandleUplinkMetaData(HandleUplinkMetaDataRequest) returns (google.protobuf.Empty) {}

	// HandleDownlinkMetaData handles downlink meta-data.
	rpc HandleDownlinkMetaData(HandleDownlinkMetaDataRequest) returns (google.protobuf.Empty) {}

These two methods provide a lot of meta-data on which you could base your billing (spreading-factor, payload size split to mac-commands and frmpayload, …).