Balance, Meter, and Wallet REST APIs

The balance management APIs include the messaging required to operate on a balance, meter, or wallet object. The primitives include the messaging and data elements required to create, modify, associate, and query objects directly related to a balance or meter, including their thresholds.

When thresholds are added, deleted, or modified for a subscriber or group, policy sessions associated with a device are re-evaluated and if the results have changed, MATRIXX Policy Application sends an SNR (Sy) or a RAR (Gx). When the MtxDisplay attribute in a balance or meter template is set to none, wallet queries do not return information for that balance.

When a balance transfer request fails due to insufficient funds, the response includes CREDIT_LIMIT_REACHED (38). If the operation fails because a balance threshold was crossed, the response includes BALANCE_FLOOR_REACHED (81). If the operation type is configured to generate an EDR, a BalanceTransferFailureEvent EDR is generated. For more information about SubMan error codes, see the discussion about SubMan API result codes. For information about failure events, see the discussion about event generation for failed transactions.

The SubMan API object and wallet queries provide information showing the resource ID mapping for virtual balances that map to a shared balance. The SubMan response includes fields for the aggregate owning object and the aggregate resource ID to identify the exact structure.

The wallet query APIs indicate when a balance is the result of an external payment request with the IsCreateExternalPaymentRequest field. A value of true indicates the balance is associated with an external payment method and an external payment request is created to request the payment. For more information about external payment requests, see the discussion about external payment requests in MATRIXX Pricing and Rating.
Note: The maximum number of balances (default is 200) in a wallet for a subscription or group is determined by the create_config.info question: Global:What is the maximum number of balances a subscriber or group could have in the wallet?

The balance adjustment APIs extend the balance end date from the date of the call plus the adjustment amount if the current balance end date is in the past. For example, if the date and time of the call is 6 November 2023 12:00 and the current end time of the balance is 1 November 2023 12:00 (5 days in the past) and the balance end time is extended by 7 days, the new balance end time is 13 November 12:00. If the current balance end date is in the future, the end date is adjusted from the balance end date plus the adjustment amount. For example, if the date and time of the call is 6 November 2023 12:00 and the current end time of the balance is 11 November 2023 12:00 (5 days in the future) and the balance end time is extended by 7 days, the new balance end time is 18 November 12:00.

For information about global configuration questions, see the discussion about global system configuration in MATRIXX Configuration.