Invoice constructor
- 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,
- 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
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)
Implementation
const Invoice({
this.accountCountry,
this.accountName,
this.accountTaxIds,
required this.amountDue,
required this.amountPaid,
required this.amountRemaining,
required this.amountShipping,
this.application,
this.applicationFeeAmount,
required this.attemptCount,
required this.attempted,
this.autoAdvance,
required this.automaticTax,
this.billingReason,
this.charge,
required this.collectionMethod,
required this.created,
required this.currency,
this.customFields,
this.customer,
this.customerAddress,
this.customerEmail,
this.customerName,
this.customerPhone,
this.customerShipping,
this.customerTaxExempt,
this.customerTaxIds,
this.defaultPaymentMethod,
this.defaultSource,
required this.defaultTaxRates,
this.description,
this.discount,
this.discounts,
this.dueDate,
this.effectiveAt,
this.endingBalance,
this.footer,
this.fromInvoice,
this.hostedInvoiceUrl,
this.id,
this.invoicePdf,
required this.issuer,
this.lastFinalizationError,
this.latestRevision,
required this.lines,
required this.livemode,
this.metadata,
this.nextPaymentAttempt,
this.number,
this.onBehalfOf,
required this.paid,
required this.paidOutOfBand,
this.paymentIntent,
required this.paymentSettings,
required this.periodEnd,
required this.periodStart,
required this.postPaymentCreditNotesAmount,
required this.prePaymentCreditNotesAmount,
this.quote,
this.receiptNumber,
this.rendering,
this.renderingOptions,
this.shippingCost,
this.shippingDetails,
required this.startingBalance,
this.statementDescriptor,
this.status,
required this.statusTransitions,
this.subscription,
this.subscriptionDetails,
this.subscriptionProrationDate,
required this.subtotal,
this.subtotalExcludingTax,
this.tax,
this.testClock,
this.thresholdReason,
required this.total,
this.totalDiscountAmounts,
this.totalExcludingTax,
required this.totalTaxAmounts,
this.transferData,
this.webhooksDeliveredAt,
});