Hi
In TM Forum's TMF 654 API (Balance Management API), there is no direct operation to convert a reserved balance into a committed or consumed balance. Typically, in a balance management system, reservation and consumption are handled separately, and converting a reserved balance into a consumed balance would require the following steps:
Steps to Commit a Reserved Balance:
1. Reserve Balance: Initially, you use the `ReserveBalance` operation to hold a certain amount of balance. This prevents it from being used for other transactions while it's reserved for a specific purpose.
2. Cancel or Adjust Reservation:
- Since TMF 654 API does not have a direct commit operation on the `ReserveBalance` resource, you would need to cancel or adjust the reserved balance once the consumption time arrives.
- You can use `CancelReserveBalance` to free up the reserved balance or `AdjustReserveBalance` to reduce the reserved amount as needed.
3. Consume or Transfer the Balance:
- Once the reservation is canceled or adjusted, you need to use the TransferBalance or AdjustBalance operations to consume the actual balance.
- TransferBalance: This operation moves the balance from one account to another, which could be used in scenarios where the reserved amount is being "paid" or transferred as part of a transaction.
- AdjustBalance: This operation allows you to directly increase or decrease the balance of an account, reflecting the actual consumption of the previously reserved amount.
Example Flow:
1. Reserve the Balance:
- A user reserves a balance using the `ReserveBalance` operation.
2. Cancel the Reservation:
- When it's time to consume the reservation, use `CancelReserveBalance` to release the reserved balance.
3. Consume the Balance:
- Use `TransferBalance` or `AdjustBalance` to apply the actual consumption, deducting the corresponding amount from the user's account.
Why No Direct Commit Operation Exists:
The TMF 654 API separates the concepts of reservation and consumption to maintain flexibility. The lack of a direct "commit reservation" operation likely reflects the need to handle complex scenarios where:
- The reserved balance might need to be partially consumed or adjusted.
- The reservation could be canceled entirely before the consumption happens.
By using `CancelReserveBalance` or `AdjustReserveBalance`, you maintain control over the reserved balance before transferring or adjusting the actual balance.
Alternative Approach:
Some implementations of balance management systems may offer custom APIs or extensions to streamline this process, allowing direct conversion of reserved balances to consumed balances. However, in the standard TMF 654 API, the outlined multi-step process is the recommended approach.
I hope this helps, Kind regards,
Evgenii
------------------------------
Evgenii Kozinchenko
TO BE VERIFIED
------------------------------
Original Message:
Sent: Oct 01, 2024 05:06
From: Imran Mahmood
Subject: TMF 654 - Committing a reserved balance
Dear TM Forum,
How can we commit a reserved monetary balance using TMF 654 API?
For example, balance was reserved using ReserveBalance so the monetary amount is held. Now, at time of consuming the reservation how can we convert the reserved balance to consumed? There do not seem to be any API operations on ReserveBalance to commit the reservation to a consumed balance? Do we have to cancel or delete the reserved balance and then call Transfer Balance or Adjust Balance? Is there any mechanism to directly convert the reservation to a committed balance using reservation resource?
Regards,
Imran
------------------------------
Imran Mahmood
Etihad Etisalat Mobily
------------------------------