Invoice class final

Invoice

Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary). If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice. If your invoice is configured to be billed by sending an email, then based on your [email settings](https://dashboard.stripe.com/account/billing/automatic), Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice. Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice. More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance). Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)

Implemented types

Constructors

Invoice({String? accountCountry, String? accountName, List<InvoiceAccountTaxIdsItemOrId>? accountTaxIds, required int amountDue, required int amountPaid, required int amountRemaining, required int amountShipping, BillingPortalConfigurationApplicationOrId? application, int? applicationFeeAmount, required int attemptCount, required bool attempted, bool? autoAdvance, required AutomaticTax automaticTax, InvoiceBillingReason? billingReason, ChargeOrId? charge, required InvoiceCollectionMethod collectionMethod, required DateTime created, required String currency, List<InvoiceSettingCustomField>? customFields, BankAccountCustomerOrId? customer, Address? customerAddress, String? customerEmail, String? customerName, String? customerPhone, ChargeShipping? customerShipping, CheckoutSessionCustomerDetailsTaxExempt? customerTaxExempt, List<InvoicesResourceInvoiceTaxId>? customerTaxIds, PaymentMethodOrId? defaultPaymentMethod, PaymentSourceOrId? defaultSource, required List<TaxRate> defaultTaxRates, String? description, Discount? discount, List<DiscountsResourceDiscountAmountDiscountOrId>? discounts, DateTime? dueDate, DateTime? effectiveAt, int? endingBalance, String? footer, InvoiceFromInvoice? fromInvoice, String? hostedInvoiceUrl, String? id, String? invoicePdf, required ConnectAccountReference issuer, ApiErrors? lastFinalizationError, InvoiceOrId? latestRevision, required InvoiceLines lines, required bool livemode, Map<String, String>? metadata, DateTime? nextPaymentAttempt, String? number, AccountOrId? onBehalfOf, required bool paid, required bool paidOutOfBand, PaymentIntentOrId? paymentIntent, required InvoicesPaymentSettings paymentSettings, required DateTime periodEnd, required DateTime periodStart, required int postPaymentCreditNotesAmount, required int prePaymentCreditNotesAmount, QuoteOrId? quote, String? receiptNumber, InvoiceRendering? rendering, InvoiceRenderingOptions? renderingOptions, CheckoutSessionShippingCost? shippingCost, ChargeShipping? shippingDetails, required int startingBalance, String? statementDescriptor, InvoiceStatus? status, required InvoicesResourceStatusTransitions statusTransitions, SubscriptionOrId? subscription, InvoiceSubscriptionDetails? subscriptionDetails, int? subscriptionProrationDate, required int subtotal, int? subtotalExcludingTax, int? tax, TestHelpersTestClockOrId? testClock, InvoiceThresholdReason? thresholdReason, required int total, List<DiscountsResourceDiscountAmount>? totalDiscountAmounts, int? totalExcludingTax, required List<InvoiceTaxAmount> totalTaxAmounts, ChargeTransferData? transferData, DateTime? webhooksDeliveredAt})
Invoice
const
Invoice.fromJson(Object? json)
factory

Properties

accountCountry → String?
final
accountName → String?
final
accountTaxIds → List<InvoiceAccountTaxIdsItemOrId>?
final
amountDue → int
final
amountPaid → int
final
amountRemaining → int
final
amountShipping → int
final
application → BillingPortalConfigurationApplicationOrId?
final
applicationFeeAmount → int?
final
attemptCount → int
final
attempted → bool
final
autoAdvance → bool?
final
automaticTax → AutomaticTax
final
billingReason → InvoiceBillingReason?
final
charge → ChargeOrId?
final
collectionMethod → InvoiceCollectionMethod
final
created → DateTime
final
currency → String
final
customer → BankAccountCustomerOrId?
final
customerAddress → Address?
final
customerEmail → String?
final
customerName → String?
final
customerPhone → String?
final
customerShipping → ChargeShipping?
final
customerTaxExempt → CheckoutSessionCustomerDetailsTaxExempt?
final
customerTaxIds → List<InvoicesResourceInvoiceTaxId>?
final
customFields → List<InvoiceSettingCustomField>?
final
defaultPaymentMethod → PaymentMethodOrId?
final
defaultSource → PaymentSourceOrId?
final
defaultTaxRates → List<TaxRate>
final
description → String?
final
discount → Discount?
final
discounts → List<DiscountsResourceDiscountAmountDiscountOrId>?
final
dueDate → DateTime?
final
effectiveAt → DateTime?
final
endingBalance → int?
final
final
fromInvoice → InvoiceFromInvoice?
Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
final
hashCode → int
The hash code for this object.
no setterinherited
hostedInvoiceUrl → String?
final
id → String?
The ID of the Invoice.
final
invoicePdf → String?
final
issuer → ConnectAccountReference
final
lastFinalizationError → ApiErrors?
final
latestRevision → InvoiceOrId?
final
lines → InvoiceLines
InvoiceLinesList
final
livemode → bool
final
metadata → Map<String, String>?
final
nextPaymentAttempt → DateTime?
final
number → String?
final
object → String
final
onBehalfOf → AccountOrId?
final
final
paidOutOfBand → bool
final
paymentIntent → PaymentIntentOrId?
final
paymentSettings → InvoicesPaymentSettings
final
periodEnd → DateTime
final
periodStart → DateTime
final
postPaymentCreditNotesAmount → int
final
prePaymentCreditNotesAmount → int
final
quote → QuoteOrId?
final
receiptNumber → String?
final
rendering → InvoiceRendering?
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
final
renderingOptions → InvoiceRenderingOptions?
This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shippingCost → CheckoutSessionShippingCost?
final
shippingDetails → ChargeShipping?
final
startingBalance → int
final
statementDescriptor → String?
final
status → InvoiceStatus?
final
statusTransitions → InvoicesResourceStatusTransitions
final
subscription → SubscriptionOrId?
final
subscriptionDetails → InvoiceSubscriptionDetails?
Details about the subscription that created this invoice.
final
subscriptionProrationDate → int?
final
subtotal → int
final
subtotalExcludingTax → int?
final
tax → int?
final
testClock → TestHelpersTestClockOrId?
final
thresholdReason → InvoiceThresholdReason?
final
total → int
final
totalDiscountAmounts → List<DiscountsResourceDiscountAmount>?
final
totalExcludingTax → int?
final
totalTaxAmounts → List<InvoiceTaxAmount>
final
transferData → ChargeTransferData?
final
webhooksDeliveredAt → DateTime?
final

Methods

encodeWith<V>(Encoder<V> encoder) → V
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

encode<V>(Invoice instance, Encoder<V> encoder) → V
override