Class Invoice
- All Implemented Interfaces:
HasId
,MetadataStore<Invoice>
,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 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 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 TypeMethodDescriptionaddLines
(InvoiceAddLinesParams params) Adds multiple line items to an invoice.addLines
(InvoiceAddLinesParams params, RequestOptions options) Adds multiple line items to an invoice.Adds multiple line items to an invoice.addLines
(Map<String, Object> params, RequestOptions options) Adds multiple line items to an invoice.protected boolean
static Invoice
create
(InvoiceCreateParams params) This endpoint creates a draft invoice for a given customer.static Invoice
create
(InvoiceCreateParams params, RequestOptions options) This endpoint creates a draft invoice for a given customer.static Invoice
This endpoint creates a draft invoice for a given customer.static Invoice
create
(Map<String, Object> params, RequestOptions options) This endpoint creates a draft invoice for a given customer.static Invoice
At any time, you can preview the upcoming invoice for a subscription or subscription schedule.static Invoice
createPreview
(RequestOptions options) At any time, you can preview the upcoming invoice for a subscription or subscription schedule.static Invoice
At any time, you can preview the upcoming invoice for a subscription or subscription schedule.static Invoice
createPreview
(InvoiceCreatePreviewParams params, RequestOptions options) At any time, you can preview the upcoming invoice for a subscription or subscription schedule.static Invoice
createPreview
(Map<String, Object> params) At any time, you can preview the upcoming invoice for a subscription or subscription schedule.static Invoice
createPreview
(Map<String, Object> params, RequestOptions options) At any time, you can preview the upcoming invoice for a subscription or subscription schedule.delete()
Permanently deletes a one-off invoice draft.delete
(RequestOptions options) Permanently deletes a one-off invoice draft.Permanently deletes a one-off invoice draft.delete
(Map<String, Object> params, RequestOptions options) Permanently deletes a one-off invoice draft.boolean
Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(RequestOptions options) Stripe automatically finalizes drafts before sending and attempting payment on invoices.Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(InvoiceFinalizeInvoiceParams params, RequestOptions options) Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(Map<String, Object> params) Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(Map<String, Object> params, RequestOptions options) Stripe automatically finalizes drafts before sending and attempting payment on invoices.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).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.Controls whether Stripe performs automatic collection of 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.Get ID of expandablecustomer
object.The customer's address.The customer's email.The customer's name.Get expandedcustomer
.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 ID of expandabledefaultPaymentMethod
object.Get expandeddefaultPaymentMethod
.Get ID of expandabledefaultSource
object.Get expandeddefaultSource
.The tax rates applied to this invoice, if any.Always true for a deleted object.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.The URL for the hosted invoice page, which allows customers to view and pay an invoice.getId()
Unique identifier for the object.The link to download the PDF for the invoice.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
.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.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()
static InvoiceCollection
list
(InvoiceListParams params) You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
list
(InvoiceListParams params, RequestOptions options) You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
list
(Map<String, Object> params, RequestOptions options) You can list all invoices, or list the invoices for a specific customer.Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(RequestOptions options) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(InvoiceMarkUncollectibleParams params, RequestOptions options) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(Map<String, Object> params) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(Map<String, Object> params, RequestOptions options) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.pay()
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(RequestOptions options) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(InvoicePayParams params) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(InvoicePayParams params, RequestOptions options) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(Map<String, Object> params, RequestOptions options) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.removeLines
(InvoiceRemoveLinesParams params) Removes multiple line items from an invoice.removeLines
(InvoiceRemoveLinesParams params, RequestOptions options) Removes multiple line items from an invoice.removeLines
(Map<String, Object> params) Removes multiple line items from an invoice.removeLines
(Map<String, Object> params, RequestOptions options) Removes multiple line items from an invoice.static Invoice
Retrieves the invoice with the given ID.static Invoice
retrieve
(String invoice, RequestOptions options) Retrieves the invoice with the given ID.static Invoice
retrieve
(String invoice, InvoiceRetrieveParams params, RequestOptions options) Retrieves the invoice with the given ID.static Invoice
Retrieves the invoice with the given ID.static InvoiceSearchResult
search
(InvoiceSearchParams params) Search for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResult
search
(InvoiceSearchParams params, RequestOptions options) Search for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResult
Search for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResult
search
(Map<String, Object> params, RequestOptions options) Search for invoices you’ve previously created using Stripe’s Search Query Language.Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(RequestOptions options) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(InvoiceSendInvoiceParams params) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(InvoiceSendInvoiceParams params, RequestOptions options) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(Map<String, Object> params) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(Map<String, Object> params, RequestOptions options) Stripe will automatically send invoices to customers according to your subscriptions settings.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
setAmountShipping
(Long amountShipping) This is the sum of all the shipping amounts.void
setApplication
(String id) void
setApplicationObject
(Application expandableObject) 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
setAutoAdvance
(Boolean autoAdvance) Controls whether Stripe performs automatic collection of the invoice.void
setAutomaticallyFinalizesAt
(Long automaticallyFinalizesAt) The time when this invoice is currently scheduled to be automatically finalized.void
setAutomaticTax
(Invoice.AutomaticTax automaticTax) void
setBillingReason
(String billingReason) Indicates the reason why the invoice was created.void
setCollectionMethod
(String collectionMethod) Eithercharge_automatically
, orsend_invoice
.void
setConfirmationSecret
(Invoice.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
setCustomer
(String id) 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
setCustomerObject
(Customer expandableObject) 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<Invoice.CustomerTaxId> customerTaxIds) The customer's tax IDs.void
setCustomFields
(List<Invoice.CustomField> customFields) Custom fields displayed on the invoice.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
setDeleted
(Boolean deleted) Always true for a deleted object.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
(Invoice.FromInvoice fromInvoice) Details of the invoice that was cloned.void
setHostedInvoiceUrl
(String hostedInvoiceUrl) The URL for the hosted invoice page, which allows customers to view and pay an invoice.void
Unique identifier for the object.void
setInvoicePdf
(String invoicePdf) The link to download the PDF for the invoice.void
setIssuer
(Invoice.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
(Invoice.Parent parent) The parent that generated this invoice.void
setPayments
(InvoicePaymentCollection payments) Payments for this invoice.void
setPaymentSettings
(Invoice.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
(Invoice.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
(Invoice.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
(Invoice.StatusTransitions statusTransitions) 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
(Invoice.ThresholdReason thresholdReason) void
Total after discounts and taxes.void
setTotalDiscountAmounts
(List<Invoice.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
setTotalPretaxCreditAmounts
(List<Invoice.TotalPretaxCreditAmount> totalPretaxCreditAmounts) Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice.void
setTotalTaxes
(List<Invoice.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.update
(InvoiceUpdateParams params) Draft invoices are fully editable.update
(InvoiceUpdateParams params, RequestOptions options) Draft invoices are fully editable.Draft invoices are fully editable.update
(Map<String, Object> params, RequestOptions options) Draft invoices are fully editable.updateLines
(InvoiceUpdateLinesParams params) Updates multiple line items on an invoice.updateLines
(InvoiceUpdateLinesParams params, RequestOptions options) Updates multiple line items on an invoice.updateLines
(Map<String, Object> params) Updates multiple line items on an invoice.updateLines
(Map<String, Object> params, RequestOptions options) Updates multiple line items on an invoice.Mark a finalized invoice as void.voidInvoice
(RequestOptions options) Mark a finalized invoice as void.voidInvoice
(InvoiceVoidInvoiceParams params) Mark a finalized invoice as void.voidInvoice
(InvoiceVoidInvoiceParams params, RequestOptions options) Mark a finalized invoice as void.voidInvoice
(Map<String, Object> params) Mark a finalized invoice as void.voidInvoice
(Map<String, Object> params, RequestOptions options) Mark a finalized invoice as void.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
-
Invoice
public Invoice()
-
-
Method Details
-
getApplication
Get ID of expandableapplication
object. -
setApplication
-
getApplicationObject
Get expandedapplication
. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
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
-
getTestClock
Get ID of expandabletestClock
object. -
setTestClock
-
getTestClockObject
Get expandedtestClock
. -
setTestClockObject
-
getAccountTaxIds
Get IDs of expandableaccountTaxIds
object list. -
setAccountTaxIds
-
getAccountTaxIdObjects
Get expandedaccountTaxIds
. -
setAccountTaxIdObjects
-
getDiscounts
Get IDs of expandablediscounts
object list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts
. -
setDiscountObjects
-
addLines
Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
addLines
Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
addLines
Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
addLines
public Invoice addLines(InvoiceAddLinesParams params, RequestOptions options) throws StripeException Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
create
This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.- Throws:
StripeException
-
create
public static Invoice create(Map<String, Object> params, RequestOptions options) throws StripeExceptionThis endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.- Throws:
StripeException
-
create
This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.- Throws:
StripeException
-
create
public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.- Throws:
StripeException
-
createPreview
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
public static Invoice createPreview(Map<String, Object> params, RequestOptions options) throws StripeExceptionAt any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
public static Invoice createPreview(InvoiceCreatePreviewParams params, RequestOptions options) throws StripeException At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
delete
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.- Throws:
StripeException
-
delete
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.- Throws:
StripeException
-
delete
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.- Throws:
StripeException
-
delete
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.- Throws:
StripeException
-
finalizeInvoice
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
finalizeInvoice
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
finalizeInvoice
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
finalizeInvoice
public Invoice finalizeInvoice(Map<String, Object> params, RequestOptions options) throws StripeExceptionStripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
finalizeInvoice
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
finalizeInvoice
public Invoice finalizeInvoice(InvoiceFinalizeInvoiceParams params, RequestOptions options) throws StripeException Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.- Throws:
StripeException
-
list
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.- Throws:
StripeException
-
list
public static InvoiceCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionYou can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.- Throws:
StripeException
-
list
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.- Throws:
StripeException
-
list
public static InvoiceCollection list(InvoiceListParams params, RequestOptions options) throws StripeException You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
public Invoice markUncollectible(Map<String, Object> params, RequestOptions options) throws StripeExceptionMarking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
public Invoice markUncollectible(InvoiceMarkUncollectibleParams params, RequestOptions options) throws StripeException Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
pay
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.- Throws:
StripeException
-
removeLines
Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
removeLines
public Invoice removeLines(Map<String, Object> params, RequestOptions options) throws StripeExceptionRemoves multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
removeLines
Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
removeLines
public Invoice removeLines(InvoiceRemoveLinesParams params, RequestOptions options) throws StripeException Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
retrieve
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public static Invoice retrieve(String invoice, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public static Invoice retrieve(String invoice, InvoiceRetrieveParams params, RequestOptions options) throws StripeException Retrieves the invoice with the given ID.- Throws:
StripeException
-
search
Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static InvoiceSearchResult search(Map<String, Object> params, RequestOptions options) throws StripeExceptionSearch for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static InvoiceSearchResult search(InvoiceSearchParams params, RequestOptions options) throws StripeException Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
sendInvoice
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
public Invoice sendInvoice(Map<String, Object> params, RequestOptions options) throws StripeExceptionStripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions options) throws StripeException Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Specified by:
update
in interfaceMetadataStore<Invoice>
- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Specified by:
update
in interfaceMetadataStore<Invoice>
- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
updateLines
Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
updateLines
public Invoice updateLines(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
updateLines
Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
updateLines
public Invoice updateLines(InvoiceUpdateLinesParams params, RequestOptions options) throws StripeException Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
voidInvoice
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
public Invoice voidInvoice(Map<String, Object> params, RequestOptions options) throws StripeExceptionMark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
public Invoice voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options) throws StripeException Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- 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. -
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. -
getAutoAdvance
Controls whether Stripe performs automatic collection of the invoice. Iffalse
, the invoice's state doesn't automatically advance without an explicit action. -
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. -
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. -
getDeleted
Always true for a deleted object. -
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. -
getHostedInvoiceUrl
The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. -
getInvoicePdf
The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. -
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. -
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
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. -
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. -
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. -
setAutoAdvance
Controls whether Stripe performs automatic collection of the invoice. Iffalse
, the invoice's state doesn't automatically advance without an explicit action. -
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. -
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. -
setDeleted
Always true for a deleted object. -
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. -
setHostedInvoiceUrl
The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. -
setId
Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details. -
setInvoicePdf
The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. -
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
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
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. -
setTotalPretaxCreditAmounts
public void setTotalPretaxCreditAmounts(List<Invoice.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. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details. -
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.- Specified by:
getMetadata
in interfaceMetadataStore<Invoice>
-