Class Invoice
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Invoice
-
- All Implemented Interfaces:
HasId,MetadataStore<Invoice>,StripeObjectInterface
public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInvoice.AutomaticTaxstatic classInvoice.CustomerTaxIdstatic classInvoice.CustomFieldstatic classInvoice.DiscountAmountstatic classInvoice.PaymentMethodOptionsstatic classInvoice.PaymentSettingsWe strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and other requirements.static classInvoice.StatusTransitionsstatic classInvoice.TaxAmountstatic classInvoice.ThresholdItemReasonstatic classInvoice.ThresholdReasonstatic classInvoice.TransferData-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description Invoice()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)static 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 Invoicecreate(java.util.Map<java.lang.String,java.lang.Object> params)This endpoint creates a draft invoice for a given customer.static Invoicecreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)This endpoint creates a draft invoice for a given customer.Invoicedelete()Permanently deletes a one-off invoice draft.Invoicedelete(RequestOptions options)Permanently deletes a one-off invoice draft.Invoicedelete(java.util.Map<java.lang.String,java.lang.Object> params)Permanently deletes a one-off invoice draft.Invoicedelete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Permanently deletes a one-off invoice draft.booleanequals(java.lang.Object o)InvoicefinalizeInvoice()Stripe automatically finalizes drafts before sending and attempting payment on invoices.InvoicefinalizeInvoice(RequestOptions options)Stripe automatically finalizes drafts before sending and attempting payment on invoices.InvoicefinalizeInvoice(InvoiceFinalizeInvoiceParams params)Stripe automatically finalizes drafts before sending and attempting payment on invoices.InvoicefinalizeInvoice(InvoiceFinalizeInvoiceParams params, RequestOptions options)Stripe automatically finalizes drafts before sending and attempting payment on invoices.InvoicefinalizeInvoice(java.util.Map<java.lang.String,java.lang.Object> params)Stripe automatically finalizes drafts before sending and attempting payment on invoices.InvoicefinalizeInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Stripe automatically finalizes drafts before sending and attempting payment on invoices.java.lang.StringgetAccountCountry()The country of the business associated with this invoice, most often the business creating the invoice.java.lang.StringgetAccountName()The public name of the business associated with this invoice, most often the business creating the invoice.java.util.List<TaxId>getAccountTaxIdObjects()Get expandedaccountTaxIds.java.util.List<java.lang.String>getAccountTaxIds()Get IDs of expandableaccountTaxIdsobject list.java.lang.LonggetAmountDue()Final amount due at this time for this invoice.java.lang.LonggetAmountPaid()The amount, in %s, that was paid.java.lang.LonggetAmountRemaining()The amount remaining, in %s, that is due.java.lang.LonggetApplicationFeeAmount()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.java.lang.LonggetAttemptCount()Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.java.lang.BooleangetAttempted()Whether an attempt has been made to pay the invoice.java.lang.BooleangetAutoAdvance()Controls whether Stripe will perform automatic collection of the invoice.Invoice.AutomaticTaxgetAutomaticTax()java.lang.StringgetBillingReason()Indicates the reason why the invoice was created.java.lang.StringgetCharge()Get ID of expandablechargeobject.ChargegetChargeObject()Get expandedcharge.java.lang.StringgetCollectionMethod()Eithercharge_automatically, orsend_invoice.java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetCurrency()Three-letter ISO currency code, in lowercase.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.AddressgetCustomerAddress()The customer's address.java.lang.StringgetCustomerEmail()The customer's email.java.lang.StringgetCustomerName()The customer's name.CustomergetCustomerObject()Get expandedcustomer.java.lang.StringgetCustomerPhone()The customer's phone number.ShippingDetailsgetCustomerShipping()The customer's shipping information.java.lang.StringgetCustomerTaxExempt()The customer's tax exempt status.java.util.List<Invoice.CustomerTaxId>getCustomerTaxIds()The customer's tax IDs.java.util.List<Invoice.CustomField>getCustomFields()Custom fields displayed on the invoice.java.lang.StringgetDefaultPaymentMethod()Get ID of expandabledefaultPaymentMethodobject.PaymentMethodgetDefaultPaymentMethodObject()Get expandeddefaultPaymentMethod.java.lang.StringgetDefaultSource()Get ID of expandabledefaultSourceobject.PaymentSourcegetDefaultSourceObject()Get expandeddefaultSource.java.util.List<TaxRate>getDefaultTaxRates()The tax rates applied to this invoice, if any.java.lang.BooleangetDeleted()Always true for a deleted object.java.lang.StringgetDescription()An arbitrary string attached to the object.DiscountgetDiscount()Describes the current discount applied to this invoice, if there is one.java.util.List<Discount>getDiscountObjects()Get expandeddiscounts.java.util.List<java.lang.String>getDiscounts()Get IDs of expandablediscountsobject list.java.lang.LonggetDueDate()The date on which payment for this invoice is due.java.lang.LonggetEndingBalance()Ending customer balance after the invoice is finalized.java.lang.StringgetFooter()Footer displayed on the invoice.java.lang.StringgetHostedInvoiceUrl()The URL for the hosted invoice page, which allows customers to view and pay an invoice.java.lang.StringgetId()Unique identifier for the object.java.lang.StringgetInvoicePdf()The link to download the PDF for the invoice.StripeErrorgetLastFinalizationError()The error encountered during the previous attempt to finalize the invoice.InvoiceLineItemCollectiongetLines()The individual line items that make up the invoice.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.java.util.Map<java.lang.String,java.lang.String>getMetadata()Set of key-value pairs that you can attach to an object.java.lang.LonggetNextPaymentAttempt()The time at which payment will next be attempted.java.lang.StringgetNumber()A unique, identifying string that appears on emails sent to the customer for this invoice.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetOnBehalfOf()Get ID of expandableonBehalfOfobject.AccountgetOnBehalfOfObject()Get expandedonBehalfOf.java.lang.BooleangetPaid()Whether payment was successfully collected for this invoice.java.lang.StringgetPaymentIntent()Get ID of expandablepaymentIntentobject.PaymentIntentgetPaymentIntentObject()Get expandedpaymentIntent.Invoice.PaymentSettingsgetPaymentSettings()java.lang.LonggetPeriodEnd()End of the usage period during which invoice items were added to this invoice.java.lang.LonggetPeriodStart()Start of the usage period during which invoice items were added to this invoice.java.lang.LonggetPostPaymentCreditNotesAmount()Total amount of all post-payment credit notes issued for this invoice.java.lang.LonggetPrePaymentCreditNotesAmount()Total amount of all pre-payment credit notes issued for this invoice.java.lang.StringgetReceiptNumber()This is the transaction number that appears on email receipts sent for this invoice.java.lang.LonggetStartingBalance()Starting customer balance before the invoice is finalized.java.lang.StringgetStatementDescriptor()Extra information about an invoice for the customer's credit card statement.java.lang.StringgetStatus()The status of the invoice, one ofdraft,open,paid,uncollectible, orvoid.Invoice.StatusTransitionsgetStatusTransitions()java.lang.StringgetSubscription()Get ID of expandablesubscriptionobject.SubscriptiongetSubscriptionObject()Get expandedsubscription.java.lang.LonggetSubscriptionProrationDate()Only set for upcoming invoices that preview prorations.java.lang.LonggetSubtotal()Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.java.lang.LonggetTax()The amount of tax on this invoice.Invoice.ThresholdReasongetThresholdReason()java.lang.LonggetTotal()Total after discounts and taxes.java.util.List<Invoice.DiscountAmount>getTotalDiscountAmounts()The aggregate amounts calculated per discount across all line items.java.util.List<Invoice.TaxAmount>getTotalTaxAmounts()The aggregate amounts calculated per tax rate for all line items.Invoice.TransferDatagetTransferData()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.java.lang.LonggetWebhooksDeliveredAt()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 InvoiceCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)You can list all invoices, or list the invoices for a specific customer.static InvoiceCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)You can list all invoices, or list the invoices for a specific customer.InvoicemarkUncollectible()Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.InvoicemarkUncollectible(RequestOptions options)Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.InvoicemarkUncollectible(InvoiceMarkUncollectibleParams params)Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.InvoicemarkUncollectible(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.InvoicemarkUncollectible(java.util.Map<java.lang.String,java.lang.Object> params)Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.InvoicemarkUncollectible(java.util.Map<java.lang.String,java.lang.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.Invoicepay()Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoicepay(RequestOptions options)Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoicepay(InvoicePayParams params)Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoicepay(InvoicePayParams params, RequestOptions options)Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoicepay(java.util.Map<java.lang.String,java.lang.Object> params)Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoicepay(java.util.Map<java.lang.String,java.lang.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 Invoiceretrieve(java.lang.String invoice)Retrieves the invoice with the given ID.static Invoiceretrieve(java.lang.String invoice, RequestOptions options)Retrieves the invoice with the given ID.static Invoiceretrieve(java.lang.String invoice, InvoiceRetrieveParams params, RequestOptions options)Retrieves the invoice with the given ID.static Invoiceretrieve(java.lang.String invoice, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves the invoice with the given ID.InvoicesendInvoice()Stripe will automatically send invoices to customers according to your subscriptions settings.InvoicesendInvoice(RequestOptions options)Stripe will automatically send invoices to customers according to your subscriptions settings.InvoicesendInvoice(InvoiceSendInvoiceParams params)Stripe will automatically send invoices to customers according to your subscriptions settings.InvoicesendInvoice(InvoiceSendInvoiceParams params, RequestOptions options)Stripe will automatically send invoices to customers according to your subscriptions settings.InvoicesendInvoice(java.util.Map<java.lang.String,java.lang.Object> params)Stripe will automatically send invoices to customers according to your subscriptions settings.InvoicesendInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Stripe will automatically send invoices to customers according to your subscriptions settings.voidsetAccountCountry(java.lang.String accountCountry)The country of the business associated with this invoice, most often the business creating the invoice.voidsetAccountName(java.lang.String accountName)The public name of the business associated with this invoice, most often the business creating the invoice.voidsetAccountTaxIdObjects(java.util.List<TaxId> objs)voidsetAccountTaxIds(java.util.List<java.lang.String> ids)voidsetAmountDue(java.lang.Long amountDue)Final amount due at this time for this invoice.voidsetAmountPaid(java.lang.Long amountPaid)The amount, in %s, that was paid.voidsetAmountRemaining(java.lang.Long amountRemaining)The amount remaining, in %s, that is due.voidsetApplicationFeeAmount(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.voidsetAttemptCount(java.lang.Long attemptCount)Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.voidsetAttempted(java.lang.Boolean attempted)Whether an attempt has been made to pay the invoice.voidsetAutoAdvance(java.lang.Boolean autoAdvance)Controls whether Stripe will perform automatic collection of the invoice.voidsetAutomaticTax(Invoice.AutomaticTax automaticTax)voidsetBillingReason(java.lang.String billingReason)Indicates the reason why the invoice was created.voidsetCharge(java.lang.String id)voidsetChargeObject(Charge expandableObject)voidsetCollectionMethod(java.lang.String collectionMethod)Eithercharge_automatically, orsend_invoice.voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.voidsetCustomer(java.lang.String id)voidsetCustomerAddress(Address customerAddress)The customer's address.voidsetCustomerEmail(java.lang.String customerEmail)The customer's email.voidsetCustomerName(java.lang.String customerName)The customer's name.voidsetCustomerObject(Customer expandableObject)voidsetCustomerPhone(java.lang.String customerPhone)The customer's phone number.voidsetCustomerShipping(ShippingDetails customerShipping)The customer's shipping information.voidsetCustomerTaxExempt(java.lang.String customerTaxExempt)The customer's tax exempt status.voidsetCustomerTaxIds(java.util.List<Invoice.CustomerTaxId> customerTaxIds)The customer's tax IDs.voidsetCustomFields(java.util.List<Invoice.CustomField> customFields)Custom fields displayed on the invoice.voidsetDefaultPaymentMethod(java.lang.String id)voidsetDefaultPaymentMethodObject(PaymentMethod expandableObject)voidsetDefaultSource(java.lang.String id)voidsetDefaultSourceObject(PaymentSource expandableObject)voidsetDefaultTaxRates(java.util.List<TaxRate> defaultTaxRates)The tax rates applied to this invoice, if any.voidsetDeleted(java.lang.Boolean deleted)Always true for a deleted object.voidsetDescription(java.lang.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(java.util.List<Discount> objs)voidsetDiscounts(java.util.List<java.lang.String> ids)voidsetDueDate(java.lang.Long dueDate)The date on which payment for this invoice is due.voidsetEndingBalance(java.lang.Long endingBalance)Ending customer balance after the invoice is finalized.voidsetFooter(java.lang.String footer)Footer displayed on the invoice.voidsetHostedInvoiceUrl(java.lang.String hostedInvoiceUrl)The URL for the hosted invoice page, which allows customers to view and pay an invoice.voidsetId(java.lang.String id)Unique identifier for the object.voidsetInvoicePdf(java.lang.String invoicePdf)The link to download the PDF for the invoice.voidsetLastFinalizationError(StripeError lastFinalizationError)The error encountered during the previous attempt to finalize the invoice.voidsetLines(InvoiceLineItemCollection lines)The individual line items that make up the invoice.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetNextPaymentAttempt(java.lang.Long nextPaymentAttempt)The time at which payment will next be attempted.voidsetNumber(java.lang.String number)A unique, identifying string that appears on emails sent to the customer for this invoice.voidsetObject(java.lang.String object)String representing the object's type.voidsetOnBehalfOf(java.lang.String id)voidsetOnBehalfOfObject(Account expandableObject)voidsetPaid(java.lang.Boolean paid)Whether payment was successfully collected for this invoice.voidsetPaymentIntent(java.lang.String id)voidsetPaymentIntentObject(PaymentIntent expandableObject)voidsetPaymentSettings(Invoice.PaymentSettings paymentSettings)voidsetPeriodEnd(java.lang.Long periodEnd)End of the usage period during which invoice items were added to this invoice.voidsetPeriodStart(java.lang.Long periodStart)Start of the usage period during which invoice items were added to this invoice.voidsetPostPaymentCreditNotesAmount(java.lang.Long postPaymentCreditNotesAmount)Total amount of all post-payment credit notes issued for this invoice.voidsetPrePaymentCreditNotesAmount(java.lang.Long prePaymentCreditNotesAmount)Total amount of all pre-payment credit notes issued for this invoice.voidsetReceiptNumber(java.lang.String receiptNumber)This is the transaction number that appears on email receipts sent for this invoice.voidsetStartingBalance(java.lang.Long startingBalance)Starting customer balance before the invoice is finalized.voidsetStatementDescriptor(java.lang.String statementDescriptor)Extra information about an invoice for the customer's credit card statement.voidsetStatus(java.lang.String status)The status of the invoice, one ofdraft,open,paid,uncollectible, orvoid.voidsetStatusTransitions(Invoice.StatusTransitions statusTransitions)voidsetSubscription(java.lang.String id)voidsetSubscriptionObject(Subscription expandableObject)voidsetSubscriptionProrationDate(java.lang.Long subscriptionProrationDate)Only set for upcoming invoices that preview prorations.voidsetSubtotal(java.lang.Long subtotal)Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.voidsetTax(java.lang.Long tax)The amount of tax on this invoice.voidsetThresholdReason(Invoice.ThresholdReason thresholdReason)voidsetTotal(java.lang.Long total)Total after discounts and taxes.voidsetTotalDiscountAmounts(java.util.List<Invoice.DiscountAmount> totalDiscountAmounts)The aggregate amounts calculated per discount across all line items.voidsetTotalTaxAmounts(java.util.List<Invoice.TaxAmount> 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(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.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 Invoiceupcoming(java.util.Map<java.lang.String,java.lang.Object> params)At any time, you can preview the upcoming invoice for a customer.static Invoiceupcoming(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)At any time, you can preview the upcoming invoice for a customer.Invoiceupdate(InvoiceUpdateParams params)Draft invoices are fully editable.Invoiceupdate(InvoiceUpdateParams params, RequestOptions options)Draft invoices are fully editable.Invoiceupdate(java.util.Map<java.lang.String,java.lang.Object> params)Draft invoices are fully editable.Invoiceupdate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Draft invoices are fully editable.InvoicevoidInvoice()Mark a finalized invoice as void.InvoicevoidInvoice(RequestOptions options)Mark a finalized invoice as void.InvoicevoidInvoice(InvoiceVoidInvoiceParams params)Mark a finalized invoice as void.InvoicevoidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options)Mark a finalized invoice as void.InvoicevoidInvoice(java.util.Map<java.lang.String,java.lang.Object> params)Mark a finalized invoice as void.InvoicevoidInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Mark a finalized invoice as void.-
Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getCharge
public java.lang.String getCharge()
Get ID of expandablechargeobject.
-
setCharge
public void setCharge(java.lang.String id)
-
getChargeObject
public Charge getChargeObject()
Get expandedcharge.
-
setChargeObject
public void setChargeObject(Charge expandableObject)
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomerobject.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getDefaultPaymentMethod
public java.lang.String getDefaultPaymentMethod()
Get ID of expandabledefaultPaymentMethodobject.
-
setDefaultPaymentMethod
public void setDefaultPaymentMethod(java.lang.String id)
-
getDefaultPaymentMethodObject
public PaymentMethod getDefaultPaymentMethodObject()
Get expandeddefaultPaymentMethod.
-
setDefaultPaymentMethodObject
public void setDefaultPaymentMethodObject(PaymentMethod expandableObject)
-
getDefaultSource
public java.lang.String getDefaultSource()
Get ID of expandabledefaultSourceobject.
-
setDefaultSource
public void setDefaultSource(java.lang.String id)
-
getDefaultSourceObject
public PaymentSource getDefaultSourceObject()
Get expandeddefaultSource.
-
setDefaultSourceObject
public void setDefaultSourceObject(PaymentSource expandableObject)
-
getOnBehalfOf
public java.lang.String getOnBehalfOf()
Get ID of expandableonBehalfOfobject.
-
setOnBehalfOf
public void setOnBehalfOf(java.lang.String id)
-
getOnBehalfOfObject
public Account getOnBehalfOfObject()
Get expandedonBehalfOf.
-
setOnBehalfOfObject
public void setOnBehalfOfObject(Account expandableObject)
-
getPaymentIntent
public java.lang.String getPaymentIntent()
Get ID of expandablepaymentIntentobject.
-
setPaymentIntent
public void setPaymentIntent(java.lang.String id)
-
getPaymentIntentObject
public PaymentIntent getPaymentIntentObject()
Get expandedpaymentIntent.
-
setPaymentIntentObject
public void setPaymentIntentObject(PaymentIntent expandableObject)
-
getSubscription
public java.lang.String getSubscription()
Get ID of expandablesubscriptionobject.
-
setSubscription
public void setSubscription(java.lang.String id)
-
getSubscriptionObject
public Subscription getSubscriptionObject()
Get expandedsubscription.
-
setSubscriptionObject
public void setSubscriptionObject(Subscription expandableObject)
-
getAccountTaxIds
public java.util.List<java.lang.String> getAccountTaxIds()
Get IDs of expandableaccountTaxIdsobject list.
-
setAccountTaxIds
public void setAccountTaxIds(java.util.List<java.lang.String> ids)
-
getAccountTaxIdObjects
public java.util.List<TaxId> getAccountTaxIdObjects()
Get expandedaccountTaxIds.
-
setAccountTaxIdObjects
public void setAccountTaxIdObjects(java.util.List<TaxId> objs)
-
getDiscounts
public java.util.List<java.lang.String> getDiscounts()
Get IDs of expandablediscountsobject list.
-
setDiscounts
public void setDiscounts(java.util.List<java.lang.String> ids)
-
getDiscountObjects
public java.util.List<Discount> getDiscountObjects()
Get expandeddiscounts.
-
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
-
list
public static InvoiceCollection list(InvoiceListParams 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(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
-
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_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(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_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(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_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) 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
-
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
-
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
-
retrieve
public static Invoice retrieve(java.lang.String invoice) throws StripeException
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public static Invoice retrieve(java.lang.String invoice, RequestOptions options) throws StripeException
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public static Invoice retrieve(java.lang.String invoice, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public static Invoice retrieve(java.lang.String invoice, InvoiceRetrieveParams params, RequestOptions options) throws StripeException
Retrieves the invoice with the given ID.- 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 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
public Invoice update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
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
public Invoice update(InvoiceUpdateParams params) throws StripeException
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
public Invoice update(InvoiceUpdateParams params, RequestOptions options) throws StripeException
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
-
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
-
pay
public Invoice pay(InvoicePayParams 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
-
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
-
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
-
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.sentevent.- 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.sentevent.- 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.sentevent.- 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.sentevent.- 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.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
-
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
-
markUncollectible
public Invoice markUncollectible(InvoiceMarkUncollectibleParams 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(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
-
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
-
voidInvoice
public Invoice voidInvoice(InvoiceVoidInvoiceParams 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(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
-
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, 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
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 theinvoice.createdwebhook, 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. Whenfalse, the invoice's state will not automatically advance without an explicit action.
-
getAutomaticTax
public Invoice.AutomaticTax getAutomaticTax()
-
getBillingReason
public java.lang.String getBillingReason()
Indicates the reason why the invoice was created.subscription_cycleindicates an invoice created by a subscription advancing into a new period.subscription_createindicates an invoice created due to creating a subscription.subscription_updateindicates an invoice created due to updating a subscription.subscriptionis set for all old invoices to indicate either a change to a subscription or a period advancement.manualis set for all invoices unrelated to a subscription (for example: created via the invoice editor). Theupcomingvalue is reserved for simulated invoices per the upcoming invoice endpoint.subscription_thresholdindicates an invoice created due to a billing threshold being reached.One of
automatic_pending_invoice_item_invoice,manual,subscription,subscription_create,subscription_cycle,subscription_threshold,subscription_update, orupcoming.
-
getCollectionMethod
public java.lang.String 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
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.One of
exempt,none, orreverse.
-
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 ascustomer.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 benullfor invoices wherecollection_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.linesis sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
getNextPaymentAttempt
public java.lang.Long getNextPaymentAttempt()
The time at which payment will next be attempted. This value will benullfor invoices wherecollection_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.
-
getPaymentSettings
public Invoice.PaymentSettings getPaymentSettings()
-
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()
-
getStatusTransitions
public Invoice.StatusTransitions getStatusTransitions()
-
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.
-
getThresholdReason
public Invoice.ThresholdReason getThresholdReason()
-
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, 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
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 theinvoice.createdwebhook, 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. Whenfalse, the invoice's state will not automatically advance without an explicit action.
-
setAutomaticTax
public void setAutomaticTax(Invoice.AutomaticTax automaticTax)
-
setBillingReason
public void setBillingReason(java.lang.String billingReason)
Indicates the reason why the invoice was created.subscription_cycleindicates an invoice created by a subscription advancing into a new period.subscription_createindicates an invoice created due to creating a subscription.subscription_updateindicates an invoice created due to updating a subscription.subscriptionis set for all old invoices to indicate either a change to a subscription or a period advancement.manualis set for all invoices unrelated to a subscription (for example: created via the invoice editor). Theupcomingvalue is reserved for simulated invoices per the upcoming invoice endpoint.subscription_thresholdindicates an invoice created due to a billing threshold being reached.One of
automatic_pending_invoice_item_invoice,manual,subscription,subscription_create,subscription_cycle,subscription_threshold,subscription_update, orupcoming.
-
setCollectionMethod
public void setCollectionMethod(java.lang.String collectionMethod)
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
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.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 equalcustomer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.One of
exempt,none, orreverse.
-
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 ascustomer.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 benullfor invoices wherecollection_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.linesis 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 valuetrueif the object exists in live mode or the valuefalseif 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 benullfor invoices wherecollection_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.
-
setPaymentSettings
public void setPaymentSettings(Invoice.PaymentSettings paymentSettings)
-
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)
-
setStatusTransitions
public void setStatusTransitions(Invoice.StatusTransitions statusTransitions)
-
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.
-
setThresholdReason
public void setThresholdReason(Invoice.ThresholdReason thresholdReason)
-
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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
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:
getMetadatain interfaceMetadataStore<Invoice>
-
-