Class QuotePreviewInvoice
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
They contain invoice items, 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, 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, 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, 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.
Related guide: Send invoices to customers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
For more details about AmountsDue, please refer to the API Reference.static class
For more details about AppliesTo, please refer to the API Reference.static class
For more details about AutomaticTax, please refer to the API Reference.static class
For more details about ConfirmationSecret, please refer to the API Reference.static class
For more details about CustomerTaxId, please refer to the API Reference.static class
For more details about CustomField, please refer to the API Reference.static class
For more details about FromInvoice, please refer to the API Reference.static class
For more details about Issuer, please refer to the API Reference.static class
For more details about Parent, please refer to the API Reference.static class
For more details about PaymentSettings, please refer to the API Reference.static class
For more details about Rendering, please refer to the API Reference.static class
For more details about ShippingCost, please refer to the API Reference.static class
For more details about StatusTransitions, please refer to the API Reference.static class
For more details about ThresholdReason, please refer to the API Reference.static class
For more details about TotalDiscountAmount, please refer to the API Reference.static class
For more details about TotalMarginAmount, please refer to the API Reference.static class
For more details about TotalPretaxCreditAmount, please refer to the API Reference.static class
For more details about TotalTax, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The country of the business associated with this invoice, most often the business creating the invoice.The public name of the business associated with this invoice, most often the business creating the invoice.Get expandedaccountTaxIds
.Get IDs of expandableaccountTaxIds
object list.Final amount due at this time for this invoice.Amount that was overpaid on the invoice.The amount, in cents (or local equivalent), that was paid.The difference between amount_due and amount_paid, in cents (or local equivalent).List of expected payments and corresponding due dates.This is the sum of all the shipping amounts.Get ID of expandableapplication
object.Get expandedapplication
.Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.Whether an attempt has been made to pay the invoice.The time when this invoice is currently scheduled to be automatically finalized.Indicates the reason why the invoice was created.Eithercharge_automatically
, orsend_invoice
.The confirmation secret associated with this invoice.Time at which the object was created.Three-letter ISO currency code, in lowercase.The ID of the account who will be billed.The customer's address.The customer's email.The customer's name.The customer's phone number.The customer's shipping information.The customer's tax exempt status.The customer's tax IDs.Custom fields displayed on the invoice.Get expandeddefaultMargins
.Get IDs of expandabledefaultMargins
object list.Get ID of expandabledefaultPaymentMethod
object.Get expandeddefaultPaymentMethod
.Get ID of expandabledefaultSource
object.Get expandeddefaultSource
.The tax rates applied to this invoice, if any.An arbitrary string attached to the object.Get expandeddiscounts
.Get IDs of expandablediscounts
object list.The date on which payment for this invoice is due.The date when this invoice is in effect.Ending customer balance after the invoice is finalized.Footer displayed on the invoice.Details of the invoice that was cloned.getId()
Unique identifier for the object.The error encountered during the previous attempt to finalize the invoice.Get ID of expandablelatestRevision
object.Get expandedlatestRevision
.getLines()
The individual line items that make up the invoice.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.The time at which payment will next be attempted.A unique, identifying string that appears on emails sent to the customer for this invoice.String representing the object's type.Get ID of expandableonBehalfOf
object.Get expandedonBehalfOf
.The parent that generated this invoice.Payments for this invoice.End of the usage period during which invoice items were added to this invoice.Start of the usage period during which invoice items were added to this invoice.Total amount of all post-payment credit notes issued for this invoice.Total amount of all pre-payment credit notes issued for this invoice.This is the transaction number that appears on email receipts sent for this invoice.The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.The details of the cost of shipping, including the ShippingRate applied on the invoice.Shipping details for the invoice.Starting customer balance before the invoice is finalized.Extra information about an invoice for the customer's credit card statement.The status of the invoice, one ofdraft
,open
,paid
,uncollectible
, orvoid
.Get ID of expandablesubscription
object.Get expandedsubscription
.Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied.The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied.Get ID of expandabletestClock
object.Get expandedtestClock
.getTotal()
Total after discounts and taxes.The aggregate amounts calculated per discount across all line items.The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.The aggregate amounts calculated per margin across all line items.Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice.The aggregate tax information of all line items.Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.int
hashCode()
list
(String quote, QuotePreviewInvoiceListParams params) Preview the invoices that would be generated by accepting the quote.list
(String quote, QuotePreviewInvoiceListParams params, RequestOptions options) Preview the invoices that would be generated by accepting the quote.Preview the invoices that would be generated by accepting the quote.Preview the invoices that would be generated by accepting the quote.void
setAccountCountry
(String accountCountry) The country of the business associated with this invoice, most often the business creating the invoice.void
setAccountName
(String accountName) The public name of the business associated with this invoice, most often the business creating the invoice.void
setAccountTaxIdObjects
(List<TaxId> objs) void
setAccountTaxIds
(List<String> ids) void
setAmountDue
(Long amountDue) Final amount due at this time for this invoice.void
setAmountOverpaid
(Long amountOverpaid) Amount that was overpaid on the invoice.void
setAmountPaid
(Long amountPaid) The amount, in cents (or local equivalent), that was paid.void
setAmountRemaining
(Long amountRemaining) The difference between amount_due and amount_paid, in cents (or local equivalent).void
setAmountsDue
(List<QuotePreviewInvoice.AmountsDue> amountsDue) List of expected payments and corresponding due dates.void
setAmountShipping
(Long amountShipping) This is the sum of all the shipping amounts.void
setApplication
(String id) void
setApplicationObject
(Application expandableObject) void
setAppliesTo
(QuotePreviewInvoice.AppliesTo appliesTo) void
setAttemptCount
(Long attemptCount) Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.void
setAttempted
(Boolean attempted) Whether an attempt has been made to pay the invoice.void
setAutomaticallyFinalizesAt
(Long automaticallyFinalizesAt) The time when this invoice is currently scheduled to be automatically finalized.void
setAutomaticTax
(QuotePreviewInvoice.AutomaticTax automaticTax) void
setBillingReason
(String billingReason) Indicates the reason why the invoice was created.void
setCollectionMethod
(String collectionMethod) Eithercharge_automatically
, orsend_invoice
.void
setConfirmationSecret
(QuotePreviewInvoice.ConfirmationSecret confirmationSecret) The confirmation secret associated with this invoice.void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomerAccount
(String customerAccount) The ID of the account who will be billed.void
setCustomerAddress
(Address customerAddress) The customer's address.void
setCustomerEmail
(String customerEmail) The customer's email.void
setCustomerName
(String customerName) The customer's name.void
setCustomerPhone
(String customerPhone) The customer's phone number.void
setCustomerShipping
(ShippingDetails customerShipping) The customer's shipping information.void
setCustomerTaxExempt
(String customerTaxExempt) The customer's tax exempt status.void
setCustomerTaxIds
(List<QuotePreviewInvoice.CustomerTaxId> customerTaxIds) The customer's tax IDs.void
setCustomFields
(List<QuotePreviewInvoice.CustomField> customFields) Custom fields displayed on the invoice.void
setDefaultMarginObjects
(List<Margin> objs) void
setDefaultMargins
(List<String> ids) void
void
setDefaultPaymentMethodObject
(PaymentMethod expandableObject) void
void
setDefaultSourceObject
(PaymentSource expandableObject) void
setDefaultTaxRates
(List<TaxRate> defaultTaxRates) The tax rates applied to this invoice, if any.void
setDescription
(String description) An arbitrary string attached to the object.void
setDiscountObjects
(List<Discount> objs) void
setDiscounts
(List<String> ids) void
setDueDate
(Long dueDate) The date on which payment for this invoice is due.void
setEffectiveAt
(Long effectiveAt) The date when this invoice is in effect.void
setEndingBalance
(Long endingBalance) Ending customer balance after the invoice is finalized.void
Footer displayed on the invoice.void
setFromInvoice
(QuotePreviewInvoice.FromInvoice fromInvoice) Details of the invoice that was cloned.void
Unique identifier for the object.void
setIssuer
(QuotePreviewInvoice.Issuer issuer) void
setLastFinalizationError
(StripeError lastFinalizationError) The error encountered during the previous attempt to finalize the invoice.void
void
setLatestRevisionObject
(Invoice expandableObject) void
The individual line items that make up the invoice.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
setNextPaymentAttempt
(Long nextPaymentAttempt) The time at which payment will next be attempted.void
A unique, identifying string that appears on emails sent to the customer for this invoice.void
String representing the object's type.void
setOnBehalfOf
(String id) void
setOnBehalfOfObject
(Account expandableObject) void
setParent
(QuotePreviewInvoice.Parent parent) The parent that generated this invoice.void
setPayments
(InvoicePaymentCollection payments) Payments for this invoice.void
setPaymentSettings
(QuotePreviewInvoice.PaymentSettings paymentSettings) void
setPeriodEnd
(Long periodEnd) End of the usage period during which invoice items were added to this invoice.void
setPeriodStart
(Long periodStart) Start of the usage period during which invoice items were added to this invoice.void
setPostPaymentCreditNotesAmount
(Long postPaymentCreditNotesAmount) Total amount of all post-payment credit notes issued for this invoice.void
setPrePaymentCreditNotesAmount
(Long prePaymentCreditNotesAmount) Total amount of all pre-payment credit notes issued for this invoice.void
setReceiptNumber
(String receiptNumber) This is the transaction number that appears on email receipts sent for this invoice.void
setRendering
(QuotePreviewInvoice.Rendering rendering) The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
setShippingCost
(QuotePreviewInvoice.ShippingCost shippingCost) The details of the cost of shipping, including the ShippingRate applied on the invoice.void
setShippingDetails
(ShippingDetails shippingDetails) Shipping details for the invoice.void
setStartingBalance
(Long startingBalance) Starting customer balance before the invoice is finalized.void
setStatementDescriptor
(String statementDescriptor) Extra information about an invoice for the customer's credit card statement.void
The status of the invoice, one ofdraft
,open
,paid
,uncollectible
, orvoid
.void
setStatusTransitions
(QuotePreviewInvoice.StatusTransitions statusTransitions) void
void
setSubscriptionObject
(Subscription expandableObject) void
setSubtotal
(Long subtotal) Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied.void
setSubtotalExcludingTax
(Long subtotalExcludingTax) The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied.void
setTestClock
(String id) void
setTestClockObject
(TestClock expandableObject) void
setThresholdReason
(QuotePreviewInvoice.ThresholdReason thresholdReason) void
Total after discounts and taxes.void
setTotalDiscountAmounts
(List<QuotePreviewInvoice.TotalDiscountAmount> totalDiscountAmounts) The aggregate amounts calculated per discount across all line items.void
setTotalExcludingTax
(Long totalExcludingTax) The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.void
setTotalMarginAmounts
(List<QuotePreviewInvoice.TotalMarginAmount> totalMarginAmounts) The aggregate amounts calculated per margin across all line items.void
setTotalPretaxCreditAmounts
(List<QuotePreviewInvoice.TotalPretaxCreditAmount> totalPretaxCreditAmounts) Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice.void
setTotalTaxes
(List<QuotePreviewInvoice.TotalTax> totalTaxes) The aggregate tax information of all line items.void
setWebhooksDeliveredAt
(Long webhooksDeliveredAt) Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
QuotePreviewInvoice
public QuotePreviewInvoice()
-
-
Method Details
-
getApplication
Get ID of expandableapplication
object. -
setApplication
-
getApplicationObject
Get expandedapplication
. -
setApplicationObject
-
getDefaultPaymentMethod
Get ID of expandabledefaultPaymentMethod
object. -
setDefaultPaymentMethod
-
getDefaultPaymentMethodObject
Get expandeddefaultPaymentMethod
. -
setDefaultPaymentMethodObject
-
getDefaultSource
Get ID of expandabledefaultSource
object. -
setDefaultSource
-
getDefaultSourceObject
Get expandeddefaultSource
. -
setDefaultSourceObject
-
getLatestRevision
Get ID of expandablelatestRevision
object. -
setLatestRevision
-
getLatestRevisionObject
Get expandedlatestRevision
. -
setLatestRevisionObject
-
getOnBehalfOf
Get ID of expandableonBehalfOf
object. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf
. -
setOnBehalfOfObject
-
getSubscription
Get ID of expandablesubscription
object. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription
. -
setSubscriptionObject
-
getTestClock
Get ID of expandabletestClock
object. -
setTestClock
-
getTestClockObject
Get expandedtestClock
. -
setTestClockObject
-
getAccountTaxIds
Get IDs of expandableaccountTaxIds
object list. -
setAccountTaxIds
-
getAccountTaxIdObjects
Get expandedaccountTaxIds
. -
setAccountTaxIdObjects
-
getDefaultMargins
Get IDs of expandabledefaultMargins
object list. -
setDefaultMargins
-
getDefaultMarginObjects
Get expandeddefaultMargins
. -
setDefaultMarginObjects
-
getDiscounts
Get IDs of expandablediscounts
object list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts
. -
setDiscountObjects
-
list
public static QuotePreviewInvoiceCollection list(String quote, Map<String, Object> params) throws StripeExceptionPreview the invoices that would be generated by accepting the quote.- Throws:
StripeException
-
list
public static QuotePreviewInvoiceCollection list(String quote, Map<String, Object> params, RequestOptions options) throws StripeExceptionPreview the invoices that would be generated by accepting the quote.- Throws:
StripeException
-
list
public static QuotePreviewInvoiceCollection list(String quote, QuotePreviewInvoiceListParams params) throws StripeException Preview the invoices that would be generated by accepting the quote.- Throws:
StripeException
-
list
public static QuotePreviewInvoiceCollection list(String quote, QuotePreviewInvoiceListParams params, RequestOptions options) throws StripeException Preview the invoices that would be generated by accepting the quote.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAccountCountry
The country of the business associated with this invoice, most often the business creating the invoice. -
getAccountName
The public name of the business associated with this invoice, most often the business creating the invoice. -
getAmountDue
Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, theamount_due
may be 0. If there is a positivestarting_balance
for the invoice (the customer owes money), theamount_due
will also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due
. -
getAmountOverpaid
Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. -
getAmountPaid
The amount, in cents (or local equivalent), that was paid. -
getAmountRemaining
The difference between amount_due and amount_paid, in cents (or local equivalent). -
getAmountShipping
This is the sum of all the shipping amounts. -
getAmountsDue
List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. -
getAppliesTo
-
getAttemptCount
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. -
getAttempted
Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after theinvoice.created
webhook, for example, so you might not want to display that invoice as unpaid to your users. -
getAutomaticTax
-
getAutomaticallyFinalizesAt
The time when this invoice is currently scheduled to be automatically finalized. The field will benull
if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always benull
- seefinalized_at
for the time when an already-finalized invoice was finalized. -
getBillingReason
Indicates the reason why the invoice was created.*
manual
: Unrelated to a subscription, for example, created via the invoice editor. *subscription
: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. *subscription_create
: A new subscription was created. *subscription_cycle
: A subscription advanced into a new period. *subscription_threshold
: A subscription reached a billing threshold. *subscription_update
: A subscription was updated. *upcoming
: Reserved for simulated invoices, per the upcoming invoice endpoint.One of
automatic_pending_invoice_item_invoice
,manual
,quote_accept
,subscription
,subscription_create
,subscription_cycle
,subscription_threshold
,subscription_update
, orupcoming
. -
getCollectionMethod
Eithercharge_automatically
, orsend_invoice
. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.One of
charge_automatically
, orsend_invoice
. -
getConfirmationSecret
The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getCustomFields
Custom fields displayed on the invoice. -
getCustomerAccount
The ID of the account who will be billed. -
getCustomerAddress
The customer's address. Until the invoice is finalized, this field will equalcustomer.address
. Once the invoice is finalized, this field will no longer be updated. -
getCustomerEmail
The customer's email. Until the invoice is finalized, this field will equalcustomer.email
. Once the invoice is finalized, this field will no longer be updated. -
getCustomerName
The customer's name. Until the invoice is finalized, this field will equalcustomer.name
. Once the invoice is finalized, this field will no longer be updated. -
getCustomerPhone
The customer's phone number. Until the invoice is finalized, this field will equalcustomer.phone
. Once the invoice is finalized, this field will no longer be updated. -
getCustomerShipping
The customer's shipping information. Until the invoice is finalized, this field will equalcustomer.shipping
. Once the invoice is finalized, this field will no longer be updated. -
getCustomerTaxExempt
The customer's tax exempt status. Until the invoice is finalized, this field will equalcustomer.tax_exempt
. Once the invoice is finalized, this field will no longer be updated.One of
exempt
,none
, orreverse
. -
getCustomerTaxIds
The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs ascustomer.tax_ids
. Once the invoice is finalized, this field will no longer be updated. -
getDefaultTaxRates
The tax rates applied to this invoice, if any. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. -
getDueDate
The date on which payment for this invoice is due. This value will benull
for invoices wherecollection_method=charge_automatically
. -
getEffectiveAt
The date when this invoice is in effect. Same asfinalized_at
unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. -
getEndingBalance
Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. -
getFromInvoice
Details of the invoice that was cloned. See the revision documentation for more details. -
getIssuer
-
getLastFinalizationError
The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. -
getLines
The individual line items that make up the invoice.lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
getNextPaymentAttempt
The time at which payment will next be attempted. This value will benull
for invoices wherecollection_method=send_invoice
. -
getNumber
A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
quote_preview_invoice
. -
getParent
The parent that generated this invoice. -
getPaymentSettings
-
getPayments
Payments for this invoice. -
getPeriodEnd
End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. -
getPeriodStart
Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. -
getPostPaymentCreditNotesAmount
Total amount of all post-payment credit notes issued for this invoice. -
getPrePaymentCreditNotesAmount
Total amount of all pre-payment credit notes issued for this invoice. -
getReceiptNumber
This is the transaction number that appears on email receipts sent for this invoice. -
getRendering
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. -
getShippingCost
The details of the cost of shipping, including the ShippingRate applied on the invoice. -
getShippingDetails
Shipping details for the invoice. The Invoice PDF will use theshipping_details
value if it is set, otherwise the PDF will render the shipping address from the customer. -
getStartingBalance
Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. -
getStatementDescriptor
Extra information about an invoice for the customer's credit card statement. -
getStatus
-
getStatusTransitions
-
getSubtotal
Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated -
getSubtotalExcludingTax
The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated -
getThresholdReason
-
getTotal
Total after discounts and taxes. -
getTotalDiscountAmounts
The aggregate amounts calculated per discount across all line items. -
getTotalExcludingTax
The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. -
getTotalMarginAmounts
The aggregate amounts calculated per margin across all line items. -
getTotalPretaxCreditAmounts
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. -
getTotalTaxes
The aggregate tax information of all line items. -
getWebhooksDeliveredAt
Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. -
setAccountCountry
The country of the business associated with this invoice, most often the business creating the invoice. -
setAccountName
The public name of the business associated with this invoice, most often the business creating the invoice. -
setAmountDue
Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, theamount_due
may be 0. If there is a positivestarting_balance
for the invoice (the customer owes money), theamount_due
will also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due
. -
setAmountOverpaid
Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. -
setAmountPaid
The amount, in cents (or local equivalent), that was paid. -
setAmountRemaining
The difference between amount_due and amount_paid, in cents (or local equivalent). -
setAmountShipping
This is the sum of all the shipping amounts. -
setAmountsDue
List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. -
setAppliesTo
-
setAttemptCount
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. -
setAttempted
Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after theinvoice.created
webhook, for example, so you might not want to display that invoice as unpaid to your users. -
setAutomaticTax
-
setAutomaticallyFinalizesAt
The time when this invoice is currently scheduled to be automatically finalized. The field will benull
if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always benull
- seefinalized_at
for the time when an already-finalized invoice was finalized. -
setBillingReason
Indicates the reason why the invoice was created.*
manual
: Unrelated to a subscription, for example, created via the invoice editor. *subscription
: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. *subscription_create
: A new subscription was created. *subscription_cycle
: A subscription advanced into a new period. *subscription_threshold
: A subscription reached a billing threshold. *subscription_update
: A subscription was updated. *upcoming
: Reserved for simulated invoices, per the upcoming invoice endpoint.One of
automatic_pending_invoice_item_invoice
,manual
,quote_accept
,subscription
,subscription_create
,subscription_cycle
,subscription_threshold
,subscription_update
, orupcoming
. -
setCollectionMethod
Eithercharge_automatically
, orsend_invoice
. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.One of
charge_automatically
, orsend_invoice
. -
setConfirmationSecret
The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCustomFields
Custom fields displayed on the invoice. -
setCustomerAccount
The ID of the account who will be billed. -
setCustomerAddress
The customer's address. Until the invoice is finalized, this field will equalcustomer.address
. Once the invoice is finalized, this field will no longer be updated. -
setCustomerEmail
The customer's email. Until the invoice is finalized, this field will equalcustomer.email
. Once the invoice is finalized, this field will no longer be updated. -
setCustomerName
The customer's name. Until the invoice is finalized, this field will equalcustomer.name
. Once the invoice is finalized, this field will no longer be updated. -
setCustomerPhone
The customer's phone number. Until the invoice is finalized, this field will equalcustomer.phone
. Once the invoice is finalized, this field will no longer be updated. -
setCustomerShipping
The customer's shipping information. Until the invoice is finalized, this field will equalcustomer.shipping
. Once the invoice is finalized, this field will no longer be updated. -
setCustomerTaxExempt
The customer's tax exempt status. Until the invoice is finalized, this field will equalcustomer.tax_exempt
. Once the invoice is finalized, this field will no longer be updated.One of
exempt
,none
, orreverse
. -
setCustomerTaxIds
The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs ascustomer.tax_ids
. Once the invoice is finalized, this field will no longer be updated. -
setDefaultTaxRates
The tax rates applied to this invoice, if any. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. -
setDueDate
The date on which payment for this invoice is due. This value will benull
for invoices wherecollection_method=charge_automatically
. -
setEffectiveAt
The date when this invoice is in effect. Same asfinalized_at
unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. -
setEndingBalance
Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. -
setFromInvoice
Details of the invoice that was cloned. See the revision documentation for more details. -
setId
Unique identifier for the object. For preview invoices created using the create preview endpoint, this id will be prefixed withupcoming_in
. -
setIssuer
-
setLastFinalizationError
The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. -
setLines
The individual line items that make up the invoice.lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setNextPaymentAttempt
The time at which payment will next be attempted. This value will benull
for invoices wherecollection_method=send_invoice
. -
setNumber
A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
quote_preview_invoice
. -
setParent
The parent that generated this invoice. -
setPaymentSettings
-
setPayments
Payments for this invoice. -
setPeriodEnd
End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. -
setPeriodStart
Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. -
setPostPaymentCreditNotesAmount
Total amount of all post-payment credit notes issued for this invoice. -
setPrePaymentCreditNotesAmount
Total amount of all pre-payment credit notes issued for this invoice. -
setReceiptNumber
This is the transaction number that appears on email receipts sent for this invoice. -
setRendering
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. -
setShippingCost
The details of the cost of shipping, including the ShippingRate applied on the invoice. -
setShippingDetails
Shipping details for the invoice. The Invoice PDF will use theshipping_details
value if it is set, otherwise the PDF will render the shipping address from the customer. -
setStartingBalance
Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. -
setStatementDescriptor
Extra information about an invoice for the customer's credit card statement. -
setStatus
-
setStatusTransitions
-
setSubtotal
Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated -
setSubtotalExcludingTax
The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated -
setThresholdReason
-
setTotal
Total after discounts and taxes. -
setTotalDiscountAmounts
public void setTotalDiscountAmounts(List<QuotePreviewInvoice.TotalDiscountAmount> totalDiscountAmounts) The aggregate amounts calculated per discount across all line items. -
setTotalExcludingTax
The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. -
setTotalMarginAmounts
The aggregate amounts calculated per margin across all line items. -
setTotalPretaxCreditAmounts
public void setTotalPretaxCreditAmounts(List<QuotePreviewInvoice.TotalPretaxCreditAmount> totalPretaxCreditAmounts) Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. -
setTotalTaxes
The aggregate tax information of all line items. -
setWebhooksDeliveredAt
Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. For preview invoices created using the create preview endpoint, this id will be prefixed withupcoming_in
.
-