Class Invoice

    • Constructor Detail

      • Invoice

        public Invoice()
    • Method Detail

      • getCharge

        public java.lang.String getCharge()
        Get ID of expandable charge object.
      • setCharge

        public void setCharge​(java.lang.String id)
      • getChargeObject

        public Charge getChargeObject()
        Get expanded charge.
      • setChargeObject

        public void setChargeObject​(Charge expandableObject)
      • getCustomer

        public java.lang.String getCustomer()
        Get ID of expandable customer object.
      • setCustomer

        public void setCustomer​(java.lang.String id)
      • getCustomerObject

        public Customer getCustomerObject()
        Get expanded customer.
      • setCustomerObject

        public void setCustomerObject​(Customer expandableObject)
      • getDefaultPaymentMethod

        public java.lang.String getDefaultPaymentMethod()
        Get ID of expandable defaultPaymentMethod object.
      • setDefaultPaymentMethod

        public void setDefaultPaymentMethod​(java.lang.String id)
      • getDefaultPaymentMethodObject

        public PaymentMethod getDefaultPaymentMethodObject()
        Get expanded defaultPaymentMethod.
      • setDefaultPaymentMethodObject

        public void setDefaultPaymentMethodObject​(PaymentMethod expandableObject)
      • getDefaultSource

        public java.lang.String getDefaultSource()
        Get ID of expandable defaultSource object.
      • setDefaultSource

        public void setDefaultSource​(java.lang.String id)
      • getDefaultSourceObject

        public PaymentSource getDefaultSourceObject()
        Get expanded defaultSource.
      • setDefaultSourceObject

        public void setDefaultSourceObject​(PaymentSource expandableObject)
      • getOnBehalfOf

        public java.lang.String getOnBehalfOf()
        Get ID of expandable onBehalfOf object.
      • setOnBehalfOf

        public void setOnBehalfOf​(java.lang.String id)
      • getOnBehalfOfObject

        public Account getOnBehalfOfObject()
        Get expanded onBehalfOf.
      • setOnBehalfOfObject

        public void setOnBehalfOfObject​(Account expandableObject)
      • getPaymentIntent

        public java.lang.String getPaymentIntent()
        Get ID of expandable paymentIntent object.
      • setPaymentIntent

        public void setPaymentIntent​(java.lang.String id)
      • getPaymentIntentObject

        public PaymentIntent getPaymentIntentObject()
        Get expanded paymentIntent.
      • setPaymentIntentObject

        public void setPaymentIntentObject​(PaymentIntent expandableObject)
      • getQuote

        public java.lang.String getQuote()
        Get ID of expandable quote object.
      • setQuote

        public void setQuote​(java.lang.String id)
      • getQuoteObject

        public Quote getQuoteObject()
        Get expanded quote.
      • setQuoteObject

        public void setQuoteObject​(Quote expandableObject)
      • getSubscription

        public java.lang.String getSubscription()
        Get ID of expandable subscription object.
      • setSubscription

        public void setSubscription​(java.lang.String id)
      • getSubscriptionObject

        public Subscription getSubscriptionObject()
        Get expanded subscription.
      • setSubscriptionObject

        public void setSubscriptionObject​(Subscription expandableObject)
      • getAccountTaxIds

        public java.util.List<java.lang.String> getAccountTaxIds()
        Get IDs of expandable accountTaxIds object list.
      • setAccountTaxIds

        public void setAccountTaxIds​(java.util.List<java.lang.String> ids)
      • getAccountTaxIdObjects

        public java.util.List<TaxId> getAccountTaxIdObjects()
        Get expanded accountTaxIds.
      • setAccountTaxIdObjects

        public void setAccountTaxIdObjects​(java.util.List<TaxId> objs)
      • getDiscounts

        public java.util.List<java.lang.String> getDiscounts()
        Get IDs of expandable discounts object list.
      • setDiscounts

        public void setDiscounts​(java.util.List<java.lang.String> ids)
      • getDiscountObjects

        public java.util.List<Discount> getDiscountObjects()
        Get expanded discounts.
      • setDiscountObjects

        public void setDiscountObjects​(java.util.List<Discount> objs)
      • list

        public static InvoiceCollection list​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                      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
      • list

        public static InvoiceCollection list​(java.util.Map<java.lang.String,​java.lang.Object> 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
      • upcoming

        public static Invoice upcoming()
                                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_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

        Throws:
        StripeException
      • upcoming

        public static Invoice upcoming​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                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_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

        Throws:
        StripeException
      • upcoming

        public static Invoice upcoming​(java.util.Map<java.lang.String,​java.lang.Object> 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_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

        Throws:
        StripeException
      • upcoming

        public static Invoice upcoming​(InvoiceUpcomingParams params)
                                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_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on 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_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

        Throws:
        StripeException
      • create

        public static Invoice create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                              throws StripeException
        This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. 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​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                     RequestOptions options)
                              throws StripeException
        This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. 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)
                              throws StripeException
        This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. 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 draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.
        Throws:
        StripeException
      • update

        public Invoice update​(java.util.Map<java.lang.String,​java.lang.Object> params)
                       throws StripeException
        Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well as collection_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 interface MetadataStore<Invoice>
        Throws:
        StripeException
      • delete

        public Invoice delete()
                       throws StripeException
        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

        public Invoice delete​(RequestOptions options)
                       throws StripeException
        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

        public Invoice delete​(java.util.Map<java.lang.String,​java.lang.Object> params)
                       throws StripeException
        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

        public Invoice delete​(java.util.Map<java.lang.String,​java.lang.Object> params,
                              RequestOptions options)
                       throws StripeException
        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
      • pay

        public Invoice pay()
                    throws StripeException
        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

        public Invoice pay​(RequestOptions options)
                    throws StripeException
        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

        public Invoice pay​(java.util.Map<java.lang.String,​java.lang.Object> params)
                    throws StripeException
        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

        public Invoice pay​(java.util.Map<java.lang.String,​java.lang.Object> params,
                           RequestOptions options)
                    throws StripeException
        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

        public Invoice pay​(InvoicePayParams params)
                    throws StripeException
        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
      • finalizeInvoice

        public Invoice finalizeInvoice()
                                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
      • finalizeInvoice

        public Invoice finalizeInvoice​(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
      • finalizeInvoice

        public Invoice finalizeInvoice​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                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
      • finalizeInvoice

        public Invoice finalizeInvoice​(java.util.Map<java.lang.String,​java.lang.Object> 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
      • finalizeInvoice

        public Invoice finalizeInvoice​(InvoiceFinalizeInvoiceParams params)
                                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
      • sendInvoice

        public Invoice sendInvoice()
                            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
      • sendInvoice

        public Invoice sendInvoice​(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
      • sendInvoice

        public Invoice sendInvoice​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            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
      • sendInvoice

        public Invoice sendInvoice​(java.util.Map<java.lang.String,​java.lang.Object> 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
      • sendInvoice

        public Invoice sendInvoice​(InvoiceSendInvoiceParams params)
                            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
      • 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
      • markUncollectible

        public Invoice markUncollectible()
                                  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
      • markUncollectible

        public Invoice markUncollectible​(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
      • markUncollectible

        public Invoice markUncollectible​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                  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
      • markUncollectible

        public Invoice markUncollectible​(java.util.Map<java.lang.String,​java.lang.Object> 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
      • voidInvoice

        public Invoice voidInvoice()
                            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
      • voidInvoice

        public Invoice voidInvoice​(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
      • voidInvoice

        public Invoice voidInvoice​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            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
      • voidInvoice

        public Invoice voidInvoice​(java.util.Map<java.lang.String,​java.lang.Object> 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
      • getAccountCountry

        public java.lang.String getAccountCountry()
        The country of the business associated with this invoice, most often the business creating the invoice.
      • getAccountName

        public java.lang.String getAccountName()
        The public name of the business associated with this invoice, most often the business creating the invoice.
      • getAmountDue

        public java.lang.Long 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, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.
      • getAmountPaid

        public java.lang.Long getAmountPaid()
        The amount, in %s, that was paid.
      • getAmountRemaining

        public java.lang.Long getAmountRemaining()
        The amount remaining, in %s, that is due.
      • getApplicationFeeAmount

        public java.lang.Long getApplicationFeeAmount()
        The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
      • getAttemptCount

        public java.lang.Long 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

        public java.lang.Boolean getAttempted()
        Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users.
      • getAutoAdvance

        public java.lang.Boolean getAutoAdvance()
        Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.
      • getBillingReason

        public java.lang.String getBillingReason()
        Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.

        One of automatic_pending_invoice_item_invoice, manual, quote_accept, subscription, subscription_create, subscription_cycle, subscription_threshold, subscription_update, or upcoming.

      • getCollectionMethod

        public java.lang.String getCollectionMethod()
        Either charge_automatically, or send_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, or send_invoice.

      • getCreated

        public java.lang.Long getCreated()
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • getCustomFields

        public java.util.List<Invoice.CustomField> getCustomFields()
        Custom fields displayed on the invoice.
      • getCustomerAddress

        public Address getCustomerAddress()
        The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.
      • getCustomerEmail

        public java.lang.String getCustomerEmail()
        The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
      • getCustomerName

        public java.lang.String getCustomerName()
        The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.
      • getCustomerPhone

        public java.lang.String getCustomerPhone()
        The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.
      • getCustomerShipping

        public ShippingDetails getCustomerShipping()
        The customer's shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.
      • getCustomerTaxExempt

        public java.lang.String getCustomerTaxExempt()
        The customer's tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.

        One of exempt, none, or reverse.

      • getCustomerTaxIds

        public java.util.List<Invoice.CustomerTaxId> getCustomerTaxIds()
        The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as customer.tax_ids. Once the invoice is finalized, this field will no longer be updated.
      • getDefaultTaxRates

        public java.util.List<TaxRate> getDefaultTaxRates()
        The tax rates applied to this invoice, if any.
      • getDeleted

        public java.lang.Boolean getDeleted()
        Always true for a deleted object.
      • getDescription

        public java.lang.String getDescription()
        An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
      • getDiscount

        public Discount getDiscount()
        Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
      • getDueDate

        public java.lang.Long getDueDate()
        The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
      • getEndingBalance

        public java.lang.Long 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.
      • getFooter

        public java.lang.String getFooter()
        Footer displayed on the invoice.
      • getHostedInvoiceUrl

        public java.lang.String 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

        public java.lang.String getInvoicePdf()
        The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
      • getLastFinalizationError

        public StripeError getLastFinalizationError()
        The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
      • getLines

        public InvoiceLineItemCollection getLines()
        The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
      • getLivemode

        public java.lang.Boolean getLivemode()
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • getNextPaymentAttempt

        public java.lang.Long getNextPaymentAttempt()
        The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice.
      • getNumber

        public java.lang.String 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

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to invoice.

      • getPaid

        public java.lang.Boolean 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.
      • getPeriodEnd

        public java.lang.Long getPeriodEnd()
        End of the usage period during which invoice items were added to this invoice.
      • getPeriodStart

        public java.lang.Long getPeriodStart()
        Start of the usage period during which invoice items were added to this invoice.
      • getPostPaymentCreditNotesAmount

        public java.lang.Long getPostPaymentCreditNotesAmount()
        Total amount of all post-payment credit notes issued for this invoice.
      • getPrePaymentCreditNotesAmount

        public java.lang.Long getPrePaymentCreditNotesAmount()
        Total amount of all pre-payment credit notes issued for this invoice.
      • getReceiptNumber

        public java.lang.String getReceiptNumber()
        This is the transaction number that appears on email receipts sent for this invoice.
      • getStartingBalance

        public java.lang.Long getStartingBalance()
        Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.
      • getStatementDescriptor

        public java.lang.String getStatementDescriptor()
        Extra information about an invoice for the customer's credit card statement.
      • getStatus

        public java.lang.String getStatus()
        The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
      • getSubscriptionProrationDate

        public java.lang.Long getSubscriptionProrationDate()
        Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
      • getSubtotal

        public java.lang.Long getSubtotal()
        Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
      • getTax

        public java.lang.Long getTax()
        The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
      • getTotal

        public java.lang.Long getTotal()
        Total after discounts and taxes.
      • getTotalDiscountAmounts

        public java.util.List<Invoice.DiscountAmount> getTotalDiscountAmounts()
        The aggregate amounts calculated per discount across all line items.
      • getTotalTaxAmounts

        public java.util.List<Invoice.TaxAmount> getTotalTaxAmounts()
        The aggregate amounts calculated per tax rate for all line items.
      • getTransferData

        public Invoice.TransferData 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

        public java.lang.Long 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

        public void setAccountCountry​(java.lang.String accountCountry)
        The country of the business associated with this invoice, most often the business creating the invoice.
      • setAccountName

        public void setAccountName​(java.lang.String accountName)
        The public name of the business associated with this invoice, most often the business creating the invoice.
      • setAmountDue

        public void setAmountDue​(java.lang.Long amountDue)
        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, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.
      • setAmountPaid

        public void setAmountPaid​(java.lang.Long amountPaid)
        The amount, in %s, that was paid.
      • setAmountRemaining

        public void setAmountRemaining​(java.lang.Long amountRemaining)
        The amount remaining, in %s, that is due.
      • setApplicationFeeAmount

        public void setApplicationFeeAmount​(java.lang.Long applicationFeeAmount)
        The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
      • setAttemptCount

        public void setAttemptCount​(java.lang.Long attemptCount)
        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

        public void setAttempted​(java.lang.Boolean attempted)
        Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users.
      • setAutoAdvance

        public void setAutoAdvance​(java.lang.Boolean autoAdvance)
        Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.
      • setBillingReason

        public void setBillingReason​(java.lang.String billingReason)
        Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.

        One of automatic_pending_invoice_item_invoice, manual, quote_accept, subscription, subscription_create, subscription_cycle, subscription_threshold, subscription_update, or upcoming.

      • setCollectionMethod

        public void setCollectionMethod​(java.lang.String collectionMethod)
        Either charge_automatically, or send_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, or send_invoice.

      • setCreated

        public void setCreated​(java.lang.Long created)
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • setCustomFields

        public void setCustomFields​(java.util.List<Invoice.CustomField> customFields)
        Custom fields displayed on the invoice.
      • setCustomerAddress

        public void setCustomerAddress​(Address customerAddress)
        The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.
      • setCustomerEmail

        public void setCustomerEmail​(java.lang.String customerEmail)
        The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
      • setCustomerName

        public void setCustomerName​(java.lang.String customerName)
        The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.
      • setCustomerPhone

        public void setCustomerPhone​(java.lang.String customerPhone)
        The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.
      • setCustomerShipping

        public void setCustomerShipping​(ShippingDetails customerShipping)
        The customer's shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.
      • setCustomerTaxExempt

        public void setCustomerTaxExempt​(java.lang.String customerTaxExempt)
        The customer's tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.

        One of exempt, none, or reverse.

      • setCustomerTaxIds

        public void setCustomerTaxIds​(java.util.List<Invoice.CustomerTaxId> customerTaxIds)
        The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as customer.tax_ids. Once the invoice is finalized, this field will no longer be updated.
      • setDefaultTaxRates

        public void setDefaultTaxRates​(java.util.List<TaxRate> defaultTaxRates)
        The tax rates applied to this invoice, if any.
      • setDeleted

        public void setDeleted​(java.lang.Boolean deleted)
        Always true for a deleted object.
      • setDescription

        public void setDescription​(java.lang.String description)
        An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
      • setDiscount

        public void setDiscount​(Discount discount)
        Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
      • setDueDate

        public void setDueDate​(java.lang.Long dueDate)
        The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
      • setEndingBalance

        public void setEndingBalance​(java.lang.Long endingBalance)
        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.
      • setFooter

        public void setFooter​(java.lang.String footer)
        Footer displayed on the invoice.
      • setHostedInvoiceUrl

        public void setHostedInvoiceUrl​(java.lang.String hostedInvoiceUrl)
        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

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • setInvoicePdf

        public void setInvoicePdf​(java.lang.String invoicePdf)
        The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
      • setLastFinalizationError

        public void setLastFinalizationError​(StripeError lastFinalizationError)
        The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
      • setLines

        public void setLines​(InvoiceLineItemCollection lines)
        The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
      • setLivemode

        public void setLivemode​(java.lang.Boolean livemode)
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • setMetadata

        public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        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

        public void setNextPaymentAttempt​(java.lang.Long nextPaymentAttempt)
        The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice.
      • setNumber

        public void setNumber​(java.lang.String number)
        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

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to invoice.

      • setPaid

        public void setPaid​(java.lang.Boolean paid)
        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.
      • setPeriodEnd

        public void setPeriodEnd​(java.lang.Long periodEnd)
        End of the usage period during which invoice items were added to this invoice.
      • setPeriodStart

        public void setPeriodStart​(java.lang.Long periodStart)
        Start of the usage period during which invoice items were added to this invoice.
      • setPostPaymentCreditNotesAmount

        public void setPostPaymentCreditNotesAmount​(java.lang.Long postPaymentCreditNotesAmount)
        Total amount of all post-payment credit notes issued for this invoice.
      • setPrePaymentCreditNotesAmount

        public void setPrePaymentCreditNotesAmount​(java.lang.Long prePaymentCreditNotesAmount)
        Total amount of all pre-payment credit notes issued for this invoice.
      • setReceiptNumber

        public void setReceiptNumber​(java.lang.String receiptNumber)
        This is the transaction number that appears on email receipts sent for this invoice.
      • setStartingBalance

        public void setStartingBalance​(java.lang.Long startingBalance)
        Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.
      • setStatementDescriptor

        public void setStatementDescriptor​(java.lang.String statementDescriptor)
        Extra information about an invoice for the customer's credit card statement.
      • setStatus

        public void setStatus​(java.lang.String status)
        The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
      • setSubscriptionProrationDate

        public void setSubscriptionProrationDate​(java.lang.Long subscriptionProrationDate)
        Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
      • setSubtotal

        public void setSubtotal​(java.lang.Long subtotal)
        Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
      • setTax

        public void setTax​(java.lang.Long tax)
        The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
      • setTotal

        public void setTotal​(java.lang.Long total)
        Total after discounts and taxes.
      • setTotalDiscountAmounts

        public void setTotalDiscountAmounts​(java.util.List<Invoice.DiscountAmount> totalDiscountAmounts)
        The aggregate amounts calculated per discount across all line items.
      • setTotalTaxAmounts

        public void setTotalTaxAmounts​(java.util.List<Invoice.TaxAmount> totalTaxAmounts)
        The aggregate amounts calculated per tax rate for all line items.
      • setTransferData

        public void setTransferData​(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.
      • setWebhooksDeliveredAt

        public void setWebhooksDeliveredAt​(java.lang.Long webhooksDeliveredAt)
        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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.String> 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 interface MetadataStore<Invoice>