Unbilled charge represents the charges that are held by passing invoice_immediately in various operations such as update subscription, add charge, create subscription, etc. Learn more.
If any invoice is to be created for a subscription all the unbilled charges associated with the subscription will be included in that invoice.
If any invoice is to be created for a customer, all the unbilled charges associated with its subscriptions will be included in that invoice.
Any automatic invoice creation like renewal, activation, etc., will include the unbilled charges.
Subscriptions are invoiced at the start of every term based on the recurring items and charged immediately against the customer's credit card if 'auto_collection' is turned 'on', otherwise the resulting invoice will be created as 'Payment Due'.
If consolidated invoicing is enabled, the charges during the subscription renewals/activations will be held and consolidated at the last renewal/activation that takes place on that particular day.
{
"unbilled_charges": [
{
"amount": 500,
"currency_code": "USD",
"customer_id": "__test__5SK2lmRmS627Arv5X",
"date_from": 1517483456,
"date_to": 1517483456,
"deleted": false,
"description": "SSL Charge USD Monthly",
"discount_amount": 0,
"entity_id": "ssl-charge-USD",
"entity_type": "charge_item_price",
"id": "li___test__5SK2lmRmS627B3A5f",
"is_voided": false,
"object": "unbilled_charge",
"pricing_model": "flat_fee",
"quantity": 1,
"subscription_id": "__test__5SK2lmRmS627AvF5Z",
"unit_amount": 500
}
]
}The decimal representation of the unit amount for the entity. The value is in major units of the currency. Returned when the entity is quantity-based and multi-decimal pricing is enabled.
The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and multi-decimal pricing is enabled.
The decimal representation of the amount for the charge, in major units of the currency. Typically equals to unit_amount_in_decimal
x quantity_in_decimal.
Returned when multi-decimal pricing
is enabled.
The unique ID of the business entity of this unbilled charge. This is always the same as the business entity of the customer.
The list of tiers applicable for this line item
This endpoint creates unbilled charges for a subscription.
Use this API to bill the unbilled charges. Available Credits and Excess Payments will automatically be applied while creating the invoice.
If the Auto Collection is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately.
During invoice creation, the PO number for the line items will be filled from the subscription's current PO number, if available.
If no recurring item is present in the created invoice, the invoice will be marked as recurring=false.
If consolidated invoicing is enabled and the parameter 'customer_id' is passed, multiple invoices can be created based on the following factors.
Use this API to delete an unbilled charge by specifying the id of the charge.
This endpoint lists all the unbilled charges.
A unique identifier for the subscription this charge belongs to. Supported operators : is, is_not, starts_with, is_present, in, not_in
Example → subscription_id[is] = "5hjdk8nOpd0b12"
A unique identifier for the customer being charged. Supported operators : is, is_not, starts_with, is_present, in, not_in
Example → customer_id[is] = "5hjdk8nOpd0b12"
This is similar to the "Create an invoice for unbilled charges" API but no invoice will be created, only an estimate for this operation is created.
In the estimate response,
Note:
Identifier of the customer for whom this estimate is created. Is given if 'subscription_id' is not specified. Applicable only if the 'Consolidated Invoicing' is enabled. If 'Consolidated Invoicing' is not enabled, an invoice will be generated for every subscription.