Note: This operation optionally supports 3DS verification flow. To achieve the same, create the Payment Intent and pass it as input parameter to this API.
Creates a one-off invoice for multiple 'Non Recurring' add-on & ad-hoc charges for a customer.
If the 'auto collection' has been turned 'on' for that customer then payment will be immediately collected using the payment method associated with the customer. The invoice will be generated upon successful collection of payments.
However, if the 'auto collection' is turned 'off', no collection attempt will be made and the invoice will be generated in the "Payment Due" status. Customer level auto collection property can be overridden by passing the auto_collection parameter.
The Shipping Address can be passed, which will then be attached to the generated invoice.
A 'One Time' coupon can be explicitly specified while creating this invoice.
You can pass the authorization_transaction_id to capture the already blocked funds to collect the payment. The excess payments will be applied to the invoice followed by the captured authorization payment.
If capturing authorization fails, the invoice will not be created. The invoice creation can be retried by passing the auto-collection as OFF. If the invoice due amount is greater than the authorization & excess payment amount collectively, the invoice status will be returned as payment_due. Collect payment for invoice API can be used to collect the remaining amount due.
- The authorization transaction will not be captured if the fraud status is found as suspicious. This api will result in invalid_state_for_request error. Read more on fraud management using Stripe Radar.
- Passing auto_collection will not update the customer level property.
- Available Credits and Excess Payments will automatically be applied to this invoice.
Sample Request
URL Format
Input Parameters
Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription_id' is not specified.
Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.(not applicable for consolidated invoice).
The currency code (ISO 4217 format) of the invoice amount.
The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.
taxes
and
line_item_taxes
are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
A note for this particular invoice. This, and all other notes for the invoice are displayed on the PDF invoice sent to the customer.
Set as true
to remove the general note
from this invoice.
If specified, the customer level auto collection will be overridden.
Whenever an invoice is created, an automatic attempt will be made to charge.
Whenever an invoice is created as payment due.
Token generated by Chargebee JS representing payment method details.
Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
Indicates whether the payment source should be retained for the customer.
The type of initiator to be used for the payment request triggered by this operation.
Pass this value to indicate that the request is initiated by the customer
Pass this value to indicate that the request is initiated by the merchant
Returns
Resource object representing invoice