Guides
Invoicing

Modifying & Recalculating Invoices

3min

Amberflo allows you to modify and recalculate invoices that are open in the current billing period or in the grace period with new prices or discounts. This action replaces the customer's current open invoice or the invoice in the grace period with an invoice calculated using a new pricing plan based on the existing usage and discounts applied on top of them.

Changing Pricing Plans

On the customer details page, notice the Add New Plan button on the Pricing Plan component. When clicked, you will navigate to a page where you can assign a new pricing plan to a customer.

Notice the last option under Start Date: Start of current billing period

When a pricing plan is assigned with this Start Date option selected, the customer's pricing plan will be replaced from the beginning of the billing period and the invoice will be recalculated. When the invoice is in the grace period, the Start of the previous billing period option will be available to recalculate the previous billing period invoice.

Document image


Change Pricing Plans through the API

This feature is also available at the API level. See: Assign a Pricing Plan to a Customer

The startTimeInSeconds parameter can be passed in at the start of the current billing period to replace the pricing plan and the invoice.

Apply Discounts

On the customer details page, notice the Add button on the Discounts component. When clicked, you will navigate to a page where you can add a new discount to a customer.

Notice the last option under Start Date: Start of current billing period

When a discount is assigned with this Start Date option selected, the discount will be added from the beginning of the billing period and the invoice will be modified. When the invoice is in the grace period, the Start of the previous billing period option will be available to recalculate the previous billing period invoice.

Document image


Add Discounts through the API

This feature is also available at the API level. See: Add Discount to a Customer

The startTimeInSeconds parameter can be passed in at the start of the current billing period to add a discount to the current invoice.