Context
The goal of ProAbono is to outsource the entire billing logic, relieving developers from this complexity.
The consumption-type features allow billing for aggregated one-time usages at the end of a period, e.g., the number of SMS consumed in a month.
The period management is programmed in ProAbono, and the valuation and resetting of consumption are driven by ProAbono. This operation can be triggered in various cases:
- Automatically upon subscription renewal
- Automatically upon scheduled customer billing
- Through the API
- During a cancellation operation
- During an offer change operation
Procedure
Not all the cases listed above need to be managed during the installation of ProAbono. However, it is necessary to use one of the 4 recommended methods to transmit consumption:
- Real-time transmission
- Queue
- Daily
- Monthly
1) Real-time Transmission
Concept
Your server sends an increment request for each consumption.
Refer to the article Updating Usages or the technical documentation to learn more about usage transmission.
Advantages
- The customer portal reflects real-time consumption, allowing the customer to have an accurate tracking of their usage.
Disadvantages
- If there is a high volume of consumption, the number of requests can be high.
- The system does not allow concurrent calls (simultaneous modification of the same subscription).
2) Queue-based Transmission
Concept
Your server records the consumption in an internal queue and sends batch increment requests.
The technical documentation is available here.
Advantages
- The customer portal reflects near real-time consumption, allowing the customer to have an accurate tracking of their usage.
- It is possible to push consecutive consumption on the same subscription within the same request.
Disadvantages
- More complex to implement technically.
3) Daily Transmission
Concept
Your server sends daily increment requests, ideally in batches.
The technical documentation is available here.
Advantages
- Fewer requests.
- The process is easier to monitor and restart in case of any issues.
Disadvantages
- The customer portal reflects consumption status from the previous day.
- A billing on day J does not take into account the consumption on day J; that consumption will be accounted for in the next billing cycle.
4) Monthly Transmission
Concept
Your server sends monthly increment requests for the value of the monthly consumption, ideally in batches.
The technical documentation is available here.
Advantages
- Fewer requests.
- You have complete control (and responsibility) over the consumption.
Disadvantages
- The customer portal does not reflect consumption status.
Note on Batch Usage TransmissionBatch transmission has the advantage of reducing processing time and the number of requests sent to ProAbono.
It automatically manages scheduling if multiple usages are sent for the same feature of the same subscription.
However, if a single subscription fails in a batch, the entire batch fails. To avoid this problem, it is recommended to verify usages before allowing a customer to consume (which is a good practice in general).