For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading Travelping Open Subscriber Server 6.16, an older release. The newest release is 6.20. Go to 6.20

Charging Account API

TPOSS Charging Account API allows you to read and manage charging accounts using the following RPC methods:

Data model

A charging account is represented by an object with the following properties:

The tariff options are represented by an object with the following properties:

API methods

Charging.Account.Create

The method allows you to register a new charging account with the given account information.

You can pass the following parameters in the request:

Example of the request:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31801 - The charging account with the given ChargingAccountId already exists.
  • -31802 - There is no registered tariff with the given TariffId.
  • -31803 - The Valid-From or Valid-Till date range is invalid.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.

Charging.Account.Read

The method allows you to fetch a charging account object associated with the given ChargingAccountId. If the charging account with such an identifier is not found in the system, TPOSS returns an error. If the charging account has associated balances, TPOSS returns them in the response.

You can pass the following parameters in the request:

Example of the request:

bash

Example of the successful response:

json

If a balance was provisioned with IMEI and the charging account was provisioned with tariff options, the response also contain them:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31804 - Charging account for the given ChargingAccountId was not found.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.

Charging.Account.Delete

The method allows you to mark the charging account associated with the given ChargingAccountId as deleted. TPOSS returns an error if the charging account is not found.

Note

TPOSS CCS subsystem does not delete charging accounts from the database based on the API call. Instead, the objects are only marked as deleted and no longer visible to API consumers. An internal process finally deletes these objects from the database.

You can pass the following parameters in the request:

Example of the request:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31804 - Charging account for the given ChargingAccountId was not found.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.

Charging.Account.Update

The method allows you to update a charging account associated with the given ChargingAccountId. If the charging account with the given identifier is not found, TPOSS returns an error.

You can pass the following parameters in the request:

Example of the request:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31802 - The requested tariff is not provisioned.
  • -31803 - The Valid-From or Valid-Till date range is invalid.
  • -31804 - Charging account for the given ChargingAccountId was not found.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.