Billing metrics help you to preview the billing effect of asset-based operations without actually performing the actions. When you cancel a product or service from the product cart, the application calculates and displays (as a snapshot) the real-time exact amount to be canceled or refunded. This helps you to know the estimated refund or credit based on the intended date of cancellation.

To Preview the Billing Metrices for Cancelation

  1. Call the Billing Management API, https://<URL_of_the_Instance>/api/billing/v1/schedules/metrics.
  2. Input the following parameters in the payload:

    Parameter

    Description

    Transaction Type

    The object to be canceled is AssetLineItem, OrderLineItem, or the BillingHeader.

    Transaction ID

    The ID of the transaction.

    Operation

    The type of operation carried out on the product or service, i.e. Cancellation.

    Cancellation Date

    The effective date of cancellation of the product or service.


    [
         {
             "TxnId": "{{orderLineItemId}}",
             "TxnType": "OrderLineItem",
             "Operation": "Terminate",
             "CancellationDate": "2025-01-01T06:11:07.068Z"
         }
          
    ]
    CODE

For example, you want to preview the real time amounts for a full-term cancellation of a product with a TCV (Sales) of USD1,200.00 and monthly billing frequency. The contract term is from 01-July-2024 to 30-June-2025. None of the BSRs are invoiced yet. You want to cancel the order from 01-January-2025. After supplying all the necessary inputs listed in step 2 above, the application provides you with the following fields as a preview:

Parameter

Description

Value

Transaction ID

The ID of the transaction.

ID

Billing Start Date

The date from when the billing starts for the product or service.

01-July-2024

Billing End Date

The last date till when the billing is done for the product or service.

01-January-2025

Same Day Cancellation

The flag Same Day Cancellation is set to True or False.

True

TCV (Sales)

The total contract value of the product or service.

USD 600.00

Billable Amount for Current OLI

The delta amount of the cancellation done through the current order line item.

(USD 600.00)

Total Invoiced Amount

The total amount that has already been invoiced to the customer.

USD 0.00

Pending Invoice Amount

The amount yet to be invoiced.

(USD 1,200.00)

Total Adjusted Amount

The total amount arising due to adjustments created on an invoice.

USD 0.00

Total Bill Including Adjustments

The total bill including the TCV (Sales) and total adjusted amount.

USD 0.00

For detailed information on the impact of Change and Cancel operations on assets, refer to Managing Assets.