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 classstatic classstatic classGet expandedaccount.static classstatic classstatic classstatic classData features requested to be retrieved upon account creation.static classPage size of invoice pdf.static classstatic classThe amount on which tax is calculated, in cents (or local equivalent).static classstatic classstatic classThe quantity threshold boundary that applied to the given line item.static classstatic classNested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Invoicecreate(InvoiceCreateParams params) This endpoint creates a draft invoice for a given customer.static Invoicecreate(InvoiceCreateParams params, RequestOptions options) This endpoint creates a draft invoice for a given customer.static InvoiceThis endpoint creates a draft invoice for a given customer.static Invoicecreate(Map<String, Object> params, RequestOptions options) This endpoint creates a draft invoice for a given customer.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.booleanStripe 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 expandableaccountTaxIdsobject list.Final amount due at this time for this 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 expandableapplicationobject.The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.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.Indicates the reason why the invoice was created.Get ID of expandablechargeobject.Get expandedcharge.Eithercharge_automatically, orsend_invoice.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.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 expandabledefaultPaymentMethodobject.Get expandeddefaultPaymentMethod.Get ID of expandabledefaultSourceobject.Get expandeddefaultSource.The tax rates applied to this invoice, if any.Always true for a deleted object.An arbitrary string attached to the object.Describes the current discount applied to this invoice, if there is one.Get expandeddiscounts.Get IDs of expandablediscountsobject 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 expandablelatestRevisionobject.Get expandedlatestRevision.getLines()The individual line items that make up the invoice.Has the valuetrueif the object exists in live mode or the valuefalseif 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 expandableonBehalfOfobject.Get expandedonBehalfOf.getPaid()Whether payment was successfully collected for this invoice.Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.Get ID of expandablepaymentIntentobject.Get expandedpaymentIntent.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.getQuote()Get ID of expandablequoteobject.Get expandedquote.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.This is a legacy field that will be removed soon.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 expandablesubscriptionobject.Details about the subscription that created this invoice.Get expandedsubscription.Only set for upcoming invoices that preview prorations.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.getTax()The amount of tax on this invoice.Get ID of expandabletestClockobject.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 tax rate for all line items.The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.inthashCode()static InvoiceCollectionlist(InvoiceListParams params) You can list all invoices, or list the invoices for a specific customer.static InvoiceCollectionlist(InvoiceListParams params, RequestOptions options) You can list all invoices, or list the invoices for a specific customer.static InvoiceCollectionYou can list all invoices, or list the invoices for a specific customer.static InvoiceCollectionlist(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.static InvoiceRetrieves the invoice with the given ID.static Invoiceretrieve(String invoice, RequestOptions options) Retrieves the invoice with the given ID.static Invoiceretrieve(String invoice, InvoiceRetrieveParams params, RequestOptions options) Retrieves the invoice with the given ID.static InvoiceRetrieves the invoice with the given ID.static InvoiceSearchResultsearch(InvoiceSearchParams params) Search for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResultsearch(InvoiceSearchParams params, RequestOptions options) Search for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResultSearch for invoices you’ve previously created using Stripe’s Search Query Language.static InvoiceSearchResultsearch(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.voidsetAccountCountry(String accountCountry) The country of the business associated with this invoice, most often the business creating the invoice.voidsetAccountName(String accountName) The public name of the business associated with this invoice, most often the business creating the invoice.voidsetAccountTaxIdObjects(List<TaxId> objs) voidsetAccountTaxIds(List<String> ids) voidsetAmountDue(Long amountDue) Final amount due at this time for this invoice.voidsetAmountPaid(Long amountPaid) The amount, in cents (or local equivalent), that was paid.voidsetAmountRemaining(Long amountRemaining) The difference between amount_due and amount_paid, in cents (or local equivalent).voidsetAmountShipping(Long amountShipping) This is the sum of all the shipping amounts.voidsetApplication(String id) voidsetApplicationFeeAmount(Long applicationFeeAmount) The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.voidsetApplicationObject(Application expandableObject) voidsetAttemptCount(Long attemptCount) Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.voidsetAttempted(Boolean attempted) Whether an attempt has been made to pay the invoice.voidsetAutoAdvance(Boolean autoAdvance) Controls whether Stripe performs automatic collection of the invoice.voidsetAutomaticTax(Invoice.AutomaticTax automaticTax) voidsetBillingReason(String billingReason) Indicates the reason why the invoice was created.voidvoidsetChargeObject(Charge expandableObject) voidsetCollectionMethod(String collectionMethod) Eithercharge_automatically, orsend_invoice.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidsetCustomerAddress(Address customerAddress) The customer's address.voidsetCustomerEmail(String customerEmail) The customer's email.voidsetCustomerName(String customerName) The customer's name.voidsetCustomerObject(Customer expandableObject) voidsetCustomerPhone(String customerPhone) The customer's phone number.voidsetCustomerShipping(ShippingDetails customerShipping) The customer's shipping information.voidsetCustomerTaxExempt(String customerTaxExempt) The customer's tax exempt status.voidsetCustomerTaxIds(List<Invoice.CustomerTaxId> customerTaxIds) The customer's tax IDs.voidsetCustomFields(List<Invoice.CustomField> customFields) Custom fields displayed on the invoice.voidvoidsetDefaultPaymentMethodObject(PaymentMethod expandableObject) voidvoidsetDefaultSourceObject(PaymentSource expandableObject) voidsetDefaultTaxRates(List<TaxRate> defaultTaxRates) The tax rates applied to this invoice, if any.voidsetDeleted(Boolean deleted) Always true for a deleted object.voidsetDescription(String description) An arbitrary string attached to the object.voidsetDiscount(Discount discount) Describes the current discount applied to this invoice, if there is one.voidsetDiscountObjects(List<Discount> objs) voidsetDiscounts(List<String> ids) voidsetDueDate(Long dueDate) The date on which payment for this invoice is due.voidsetEffectiveAt(Long effectiveAt) The date when this invoice is in effect.voidsetEndingBalance(Long endingBalance) Ending customer balance after the invoice is finalized.voidFooter displayed on the invoice.voidsetFromInvoice(Invoice.FromInvoice fromInvoice) Details of the invoice that was cloned.voidsetHostedInvoiceUrl(String hostedInvoiceUrl) The URL for the hosted invoice page, which allows customers to view and pay an invoice.voidUnique identifier for the object.voidsetInvoicePdf(String invoicePdf) The link to download the PDF for the invoice.voidsetIssuer(Invoice.Issuer issuer) voidsetLastFinalizationError(StripeError lastFinalizationError) The error encountered during the previous attempt to finalize the invoice.voidvoidsetLatestRevisionObject(Invoice expandableObject) voidThe individual line items that make up the invoice.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidsetNextPaymentAttempt(Long nextPaymentAttempt) The time at which payment will next be attempted.voidA unique, identifying string that appears on emails sent to the customer for this invoice.voidString representing the object's type.voidsetOnBehalfOf(String id) voidsetOnBehalfOfObject(Account expandableObject) voidWhether payment was successfully collected for this invoice.voidsetPaidOutOfBand(Boolean paidOutOfBand) Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.voidvoidsetPaymentIntentObject(PaymentIntent expandableObject) voidsetPaymentSettings(Invoice.PaymentSettings paymentSettings) voidsetPeriodEnd(Long periodEnd) End of the usage period during which invoice items were added to this invoice.voidsetPeriodStart(Long periodStart) Start of the usage period during which invoice items were added to this invoice.voidsetPostPaymentCreditNotesAmount(Long postPaymentCreditNotesAmount) Total amount of all post-payment credit notes issued for this invoice.voidsetPrePaymentCreditNotesAmount(Long prePaymentCreditNotesAmount) Total amount of all pre-payment credit notes issued for this invoice.voidvoidsetQuoteObject(Quote expandableObject) voidsetReceiptNumber(String receiptNumber) This is the transaction number that appears on email receipts sent for this invoice.voidsetRendering(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.voidsetRenderingOptions(Invoice.RenderingOptions renderingOptions) This is a legacy field that will be removed soon.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidsetShippingCost(Invoice.ShippingCost shippingCost) The details of the cost of shipping, including the ShippingRate applied on the invoice.voidsetShippingDetails(ShippingDetails shippingDetails) Shipping details for the invoice.voidsetStartingBalance(Long startingBalance) Starting customer balance before the invoice is finalized.voidsetStatementDescriptor(String statementDescriptor) Extra information about an invoice for the customer's credit card statement.voidThe status of the invoice, one ofdraft,open,paid,uncollectible, orvoid.voidsetStatusTransitions(Invoice.StatusTransitions statusTransitions) voidvoidsetSubscriptionDetails(Invoice.SubscriptionDetails subscriptionDetails) Details about the subscription that created this invoice.voidsetSubscriptionObject(Subscription expandableObject) voidsetSubscriptionProrationDate(Long subscriptionProrationDate) Only set for upcoming invoices that preview prorations.voidsetSubtotal(Long subtotal) Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied.voidsetSubtotalExcludingTax(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.voidThe amount of tax on this invoice.voidsetTestClock(String id) voidsetTestClockObject(TestClock expandableObject) voidsetThresholdReason(Invoice.ThresholdReason thresholdReason) voidTotal after discounts and taxes.voidsetTotalDiscountAmounts(List<Invoice.TotalDiscountAmount> totalDiscountAmounts) The aggregate amounts calculated per discount across all line items.voidsetTotalExcludingTax(Long totalExcludingTax) The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.voidsetTotalTaxAmounts(List<Invoice.TotalTaxAmount> totalTaxAmounts) The aggregate amounts calculated per tax rate for all line items.voidsetTransferData(Invoice.TransferData transferData) The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.voidsetWebhooksDeliveredAt(Long webhooksDeliveredAt) Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.static Invoiceupcoming()At any time, you can preview the upcoming invoice for a customer.static Invoiceupcoming(InvoiceUpcomingParams params) At any time, you can preview the upcoming invoice for a customer.static Invoiceupcoming(InvoiceUpcomingParams params, RequestOptions options) At any time, you can preview the upcoming invoice for a customer.static InvoiceAt any time, you can preview the upcoming invoice for a customer.static Invoiceupcoming(Map<String, Object> params, RequestOptions options) At any time, you can preview the upcoming invoice for a customer.static InvoiceLineItemCollectionWhen retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items.static InvoiceLineItemCollectionWhen retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items.static InvoiceLineItemCollectionupcomingLines(InvoiceUpcomingLinesParams params, RequestOptions options) When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items.static InvoiceLineItemCollectionupcomingLines(Map<String, Object> params) When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items.static InvoiceLineItemCollectionupcomingLines(Map<String, Object> params, RequestOptions options) When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items.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.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, setStripeResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Invoice
public Invoice()
-
-
Method Details
-
getApplication
Get ID of expandableapplicationobject. -
setApplication
-
getApplicationObject
Get expandedapplication. -
setApplicationObject
-
getCharge
Get ID of expandablechargeobject. -
setCharge
-
getChargeObject
Get expandedcharge. -
setChargeObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getDefaultPaymentMethod
Get ID of expandabledefaultPaymentMethodobject. -
setDefaultPaymentMethod
-
getDefaultPaymentMethodObject
Get expandeddefaultPaymentMethod. -
setDefaultPaymentMethodObject
-
getDefaultSource
Get ID of expandabledefaultSourceobject. -
setDefaultSource
-
getDefaultSourceObject
Get expandeddefaultSource. -
setDefaultSourceObject
-
getLatestRevision
Get ID of expandablelatestRevisionobject. -
setLatestRevision
-
getLatestRevisionObject
Get expandedlatestRevision. -
setLatestRevisionObject
-
getOnBehalfOf
Get ID of expandableonBehalfOfobject. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf. -
setOnBehalfOfObject
-
getPaymentIntent
Get ID of expandablepaymentIntentobject. -
setPaymentIntent
-
getPaymentIntentObject
Get expandedpaymentIntent. -
setPaymentIntentObject
-
getQuote
Get ID of expandablequoteobject. -
setQuote
-
getQuoteObject
Get expandedquote. -
setQuoteObject
-
getSubscription
Get ID of expandablesubscriptionobject. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription. -
setSubscriptionObject
-
getTestClock
Get ID of expandabletestClockobject. -
setTestClock
-
getTestClockObject
Get expandedtestClock. -
setTestClockObject
-
getAccountTaxIds
Get IDs of expandableaccountTaxIdsobject list. -
setAccountTaxIds
-
getAccountTaxIdObjects
Get expandedaccountTaxIds. -
setAccountTaxIdObjects
-
getDiscounts
Get IDs of expandablediscountsobject list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts. -
setDiscountObjects
-
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
-
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
-
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.sentevent.- 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.sentevent.- 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.sentevent.- 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.sentevent.- 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.sentevent.- 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.sentevent.- Throws:
StripeException
-
upcoming
At any time, you can preview the upcoming invoice for a customer. 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 a
proration_dateparameter when doing the actual subscription update. The value passed in should be the same as thesubscription_proration_datereturned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]is equal to thesubscription_proration_dateon the upcoming invoice resource.- Throws:
StripeException
-
upcoming
At any time, you can preview the upcoming invoice for a customer. 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 a
proration_dateparameter when doing the actual subscription update. The value passed in should be the same as thesubscription_proration_datereturned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]is equal to thesubscription_proration_dateon the upcoming invoice resource.- Throws:
StripeException
-
upcoming
public static Invoice upcoming(Map<String, Object> params, RequestOptions options) throws StripeExceptionAt any time, you can preview the upcoming invoice for a customer. 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 a
proration_dateparameter when doing the actual subscription update. The value passed in should be the same as thesubscription_proration_datereturned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]is equal to thesubscription_proration_dateon the upcoming invoice resource.- Throws:
StripeException
-
upcoming
At any time, you can preview the upcoming invoice for a customer. 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 a
proration_dateparameter when doing the actual subscription update. The value passed in should be the same as thesubscription_proration_datereturned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]is equal to thesubscription_proration_dateon the upcoming invoice resource.- Throws:
StripeException
-
upcoming
public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException At any time, you can preview the upcoming invoice for a customer. 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 a
proration_dateparameter when doing the actual subscription update. The value passed in should be the same as thesubscription_proration_datereturned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]is equal to thesubscription_proration_dateon the upcoming invoice resource.- Throws:
StripeException
-
upcomingLines
When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
upcomingLines
public static InvoiceLineItemCollection upcomingLines(Map<String, Object> params) throws StripeExceptionWhen retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
upcomingLines
public static InvoiceLineItemCollection upcomingLines(Map<String, Object> params, RequestOptions options) throws StripeExceptionWhen retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
upcomingLines
public static InvoiceLineItemCollection upcomingLines(InvoiceUpcomingLinesParams params) throws StripeException When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
upcomingLines
public static InvoiceLineItemCollection upcomingLines(InvoiceUpcomingLinesParams params, RequestOptions options) throws StripeException When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- 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:
updatein 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:
updatein 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
-
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.- 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.- 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.- 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.- 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.- 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.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance 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_duemay be 0. If there is a positivestarting_balancefor the invoice (the customer owes money), theamount_duewill also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due. -
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. -
getApplicationFeeAmount
The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. -
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. -
getAttempted
Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after theinvoice.createdwebhook, 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
-
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. -
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. -
getDiscount
Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. -
getDueDate
The date on which payment for this invoice is due. This value will benullfor invoices wherecollection_method=charge_automatically. -
getEffectiveAt
The date when this invoice is in effect. Same asfinalized_atunless 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.linesis 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 valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getNextPaymentAttempt
The time at which payment will next be attempted. This value will benullfor 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. -
getPaid
Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. -
getPaidOutOfBand
Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. -
getPaymentSettings
-
getPeriodEnd
End of the usage period during which invoice items were added to this invoice. -
getPeriodStart
Start of the usage period during which invoice items were added to this invoice. -
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. -
getRenderingOptions
This is a legacy field that will be removed soon. For details aboutrendering_options, refer torenderinginstead. Options for invoice PDF rendering. -
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_detailsvalue 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
-
getSubscriptionDetails
Details about the subscription that created this invoice. -
getSubscriptionProrationDate
Only set for upcoming invoices that preview prorations. The time used to calculate prorations. -
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 -
getTax
The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. -
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. -
getTotalTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
getTransferData
The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. -
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_duemay be 0. If there is a positivestarting_balancefor the invoice (the customer owes money), theamount_duewill also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due. -
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. -
setApplicationFeeAmount
The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. -
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. -
setAttempted
Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after theinvoice.createdwebhook, 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
-
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. -
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. -
setDiscount
Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. -
setDueDate
The date on which payment for this invoice is due. This value will benullfor invoices wherecollection_method=charge_automatically. -
setEffectiveAt
The date when this invoice is in effect. Same asfinalized_atunless 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.linesis 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 valuetrueif the object exists in live mode or the valuefalseif 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 benullfor 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. -
setPaid
Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. -
setPaidOutOfBand
Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. -
setPaymentSettings
-
setPeriodEnd
End of the usage period during which invoice items were added to this invoice. -
setPeriodStart
Start of the usage period during which invoice items were added to this invoice. -
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. -
setRenderingOptions
This is a legacy field that will be removed soon. For details aboutrendering_options, refer torenderinginstead. Options for invoice PDF rendering. -
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_detailsvalue 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
-
setSubscriptionDetails
Details about the subscription that created this invoice. -
setSubscriptionProrationDate
Only set for upcoming invoices that preview prorations. The time used to calculate prorations. -
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 -
setTax
The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. -
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. -
setTotalTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
setTransferData
The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. -
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:
getMetadatain interfaceMetadataStore<Invoice>
-