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 class
Invoice.CustomerTaxId
static class
Invoice.CustomField
static class
Invoice.DiscountAmount
static class
Invoice.PaymentMethodOptions
static class
Invoice.PaymentSettings
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and other requirements.static class
Invoice.StatusTransitions
static class
Invoice.TaxAmount
static class
Invoice.ThresholdItemReason
static class
Invoice.ThresholdReason
static class
Invoice.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 boolean
canEqual(java.lang.Object other)
static Invoice
create(InvoiceCreateParams params)
This endpoint creates a draft invoice for a given customer.static Invoice
create(InvoiceCreateParams params, RequestOptions options)
This endpoint creates a draft invoice for a given customer.static Invoice
create(java.util.Map<java.lang.String,java.lang.Object> params)
This endpoint creates a draft invoice for a given customer.static Invoice
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
This endpoint creates a draft invoice for a given customer.Invoice
delete()
Permanently deletes a one-off invoice draft.Invoice
delete(RequestOptions options)
Permanently deletes a one-off invoice draft.Invoice
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Permanently deletes a one-off invoice draft.Invoice
delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Permanently deletes a one-off invoice draft.boolean
equals(java.lang.Object o)
Invoice
finalizeInvoice()
Stripe automatically finalizes drafts before sending and attempting payment on invoices.Invoice
finalizeInvoice(RequestOptions options)
Stripe automatically finalizes drafts before sending and attempting payment on invoices.Invoice
finalizeInvoice(InvoiceFinalizeInvoiceParams params)
Stripe automatically finalizes drafts before sending and attempting payment on invoices.Invoice
finalizeInvoice(InvoiceFinalizeInvoiceParams params, RequestOptions options)
Stripe automatically finalizes drafts before sending and attempting payment on invoices.Invoice
finalizeInvoice(java.util.Map<java.lang.String,java.lang.Object> params)
Stripe automatically finalizes drafts before sending and attempting payment on invoices.Invoice
finalizeInvoice(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.String
getAccountCountry()
The country of the business associated with this invoice, most often the business creating the invoice.java.lang.String
getAccountName()
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 expandableaccountTaxIds
object list.java.lang.Long
getAmountDue()
Final amount due at this time for this invoice.java.lang.Long
getAmountPaid()
The amount, in %s, that was paid.java.lang.Long
getAmountRemaining()
The amount remaining, in %s, that is due.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.java.lang.Long
getAttemptCount()
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.java.lang.Boolean
getAttempted()
Whether an attempt has been made to pay the invoice.java.lang.Boolean
getAutoAdvance()
Controls whether Stripe will perform automatic collection of the invoice.java.lang.String
getBillingReason()
Indicates the reason why the invoice was created.java.lang.String
getCharge()
Get ID of expandablecharge
object.Charge
getChargeObject()
Get expandedcharge
.java.lang.String
getCollectionMethod()
Eithercharge_automatically
, orsend_invoice
.java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getCurrency()
Three-letter ISO currency code, in lowercase.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Address
getCustomerAddress()
The customer's address.java.lang.String
getCustomerEmail()
The customer's email.java.lang.String
getCustomerName()
The customer's name.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.String
getCustomerPhone()
The customer's phone number.ShippingDetails
getCustomerShipping()
The customer's shipping information.java.lang.String
getCustomerTaxExempt()
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.String
getDefaultPaymentMethod()
Get ID of expandabledefaultPaymentMethod
object.PaymentMethod
getDefaultPaymentMethodObject()
Get expandeddefaultPaymentMethod
.java.lang.String
getDefaultSource()
Get ID of expandabledefaultSource
object.PaymentSource
getDefaultSourceObject()
Get expandeddefaultSource
.java.util.List<TaxRate>
getDefaultTaxRates()
The tax rates applied to this invoice, if any.java.lang.Boolean
getDeleted()
Always true for a deleted object.java.lang.String
getDescription()
An arbitrary string attached to the object.Discount
getDiscount()
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 expandablediscounts
object list.java.lang.Long
getDueDate()
The date on which payment for this invoice is due.java.lang.Long
getEndingBalance()
Ending customer balance after the invoice is finalized.java.lang.String
getFooter()
Footer displayed on the invoice.java.lang.String
getHostedInvoiceUrl()
The URL for the hosted invoice page, which allows customers to view and pay an invoice.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getInvoicePdf()
The link to download the PDF for the invoice.StripeError
getLastFinalizationError()
The error encountered during the previous attempt to finalize the invoice.InvoiceLineItemCollection
getLines()
The individual line items that make up the invoice.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.Long
getNextPaymentAttempt()
The time at which payment will next be attempted.java.lang.String
getNumber()
A unique, identifying string that appears on emails sent to the customer for this invoice.java.lang.String
getObject()
String representing the object's type.java.lang.Boolean
getPaid()
Whether payment was successfully collected for this invoice.java.lang.String
getPaymentIntent()
Get ID of expandablepaymentIntent
object.PaymentIntent
getPaymentIntentObject()
Get expandedpaymentIntent
.Invoice.PaymentSettings
getPaymentSettings()
java.lang.Long
getPeriodEnd()
End of the usage period during which invoice items were added to this invoice.java.lang.Long
getPeriodStart()
Start of the usage period during which invoice items were added to this invoice.java.lang.Long
getPostPaymentCreditNotesAmount()
Total amount of all post-payment credit notes issued for this invoice.java.lang.Long
getPrePaymentCreditNotesAmount()
Total amount of all pre-payment credit notes issued for this invoice.java.lang.String
getReceiptNumber()
This is the transaction number that appears on email receipts sent for this invoice.java.lang.Long
getStartingBalance()
Starting customer balance before the invoice is finalized.java.lang.String
getStatementDescriptor()
Extra information about an invoice for the customer's credit card statement.java.lang.String
getStatus()
The status of the invoice, one ofdraft
,open
,paid
,uncollectible
, orvoid
.Invoice.StatusTransitions
getStatusTransitions()
java.lang.String
getSubscription()
Get ID of expandablesubscription
object.Subscription
getSubscriptionObject()
Get expandedsubscription
.java.lang.Long
getSubscriptionProrationDate()
Only set for upcoming invoices that preview prorations.java.lang.Long
getSubtotal()
Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.java.lang.Long
getTax()
The amount of tax on this invoice.Invoice.ThresholdReason
getThresholdReason()
java.lang.Long
getTotal()
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.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.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.int
hashCode()
static InvoiceCollection
list(InvoiceListParams params)
You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
list(InvoiceListParams params, RequestOptions options)
You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
You can list all invoices, or list the invoices for a specific customer.static InvoiceCollection
list(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.Invoice
markUncollectible()
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Invoice
markUncollectible(RequestOptions options)
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Invoice
markUncollectible(InvoiceMarkUncollectibleParams params)
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Invoice
markUncollectible(InvoiceMarkUncollectibleParams params, RequestOptions options)
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Invoice
markUncollectible(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.Invoice
markUncollectible(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.Invoice
pay()
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoice
pay(RequestOptions options)
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoice
pay(InvoicePayParams params)
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoice
pay(InvoicePayParams params, RequestOptions options)
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.Invoice
pay(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.Invoice
pay(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 Invoice
retrieve(java.lang.String invoice)
Retrieves the invoice with the given ID.static Invoice
retrieve(java.lang.String invoice, RequestOptions options)
Retrieves the invoice with the given ID.static Invoice
retrieve(java.lang.String invoice, InvoiceRetrieveParams params, RequestOptions options)
Retrieves the invoice with the given ID.static Invoice
retrieve(java.lang.String invoice, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the invoice with the given ID.Invoice
sendInvoice()
Stripe will automatically send invoices to customers according to your subscriptions settings.Invoice
sendInvoice(RequestOptions options)
Stripe will automatically send invoices to customers according to your subscriptions settings.Invoice
sendInvoice(InvoiceSendInvoiceParams params)
Stripe will automatically send invoices to customers according to your subscriptions settings.Invoice
sendInvoice(InvoiceSendInvoiceParams params, RequestOptions options)
Stripe will automatically send invoices to customers according to your subscriptions settings.Invoice
sendInvoice(java.util.Map<java.lang.String,java.lang.Object> params)
Stripe will automatically send invoices to customers according to your subscriptions settings.Invoice
sendInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Stripe will automatically send invoices to customers according to your subscriptions settings.void
setAccountCountry(java.lang.String accountCountry)
The country of the business associated with this invoice, most often the business creating the invoice.void
setAccountName(java.lang.String accountName)
The public name of the business associated with this invoice, most often the business creating the invoice.void
setAccountTaxIdObjects(java.util.List<TaxId> objs)
void
setAccountTaxIds(java.util.List<java.lang.String> ids)
void
setAmountDue(java.lang.Long amountDue)
Final amount due at this time for this invoice.void
setAmountPaid(java.lang.Long amountPaid)
The amount, in %s, that was paid.void
setAmountRemaining(java.lang.Long amountRemaining)
The amount remaining, in %s, that is due.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.void
setAttemptCount(java.lang.Long attemptCount)
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.void
setAttempted(java.lang.Boolean attempted)
Whether an attempt has been made to pay the invoice.void
setAutoAdvance(java.lang.Boolean autoAdvance)
Controls whether Stripe will perform automatic collection of the invoice.void
setBillingReason(java.lang.String billingReason)
Indicates the reason why the invoice was created.void
setCharge(java.lang.String id)
void
setChargeObject(Charge expandableObject)
void
setCollectionMethod(java.lang.String collectionMethod)
Eithercharge_automatically
, orsend_invoice
.void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.void
setCustomer(java.lang.String id)
void
setCustomerAddress(Address customerAddress)
The customer's address.void
setCustomerEmail(java.lang.String customerEmail)
The customer's email.void
setCustomerName(java.lang.String customerName)
The customer's name.void
setCustomerObject(Customer expandableObject)
void
setCustomerPhone(java.lang.String customerPhone)
The customer's phone number.void
setCustomerShipping(ShippingDetails customerShipping)
The customer's shipping information.void
setCustomerTaxExempt(java.lang.String customerTaxExempt)
The customer's tax exempt status.void
setCustomerTaxIds(java.util.List<Invoice.CustomerTaxId> customerTaxIds)
The customer's tax IDs.void
setCustomFields(java.util.List<Invoice.CustomField> customFields)
Custom fields displayed on the invoice.void
setDefaultPaymentMethod(java.lang.String id)
void
setDefaultPaymentMethodObject(PaymentMethod expandableObject)
void
setDefaultSource(java.lang.String id)
void
setDefaultSourceObject(PaymentSource expandableObject)
void
setDefaultTaxRates(java.util.List<TaxRate> defaultTaxRates)
The tax rates applied to this invoice, if any.void
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.void
setDescription(java.lang.String description)
An arbitrary string attached to the object.void
setDiscount(Discount discount)
Describes the current discount applied to this invoice, if there is one.void
setDiscountObjects(java.util.List<Discount> objs)
void
setDiscounts(java.util.List<java.lang.String> ids)
void
setDueDate(java.lang.Long dueDate)
The date on which payment for this invoice is due.void
setEndingBalance(java.lang.Long endingBalance)
Ending customer balance after the invoice is finalized.void
setFooter(java.lang.String footer)
Footer displayed on the invoice.void
setHostedInvoiceUrl(java.lang.String hostedInvoiceUrl)
The URL for the hosted invoice page, which allows customers to view and pay an invoice.void
setId(java.lang.String id)
Unique identifier for the object.void
setInvoicePdf(java.lang.String invoicePdf)
The link to download the PDF for the invoice.void
setLastFinalizationError(StripeError lastFinalizationError)
The error encountered during the previous attempt to finalize the invoice.void
setLines(InvoiceLineItemCollection lines)
The individual line items that make up the invoice.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setNextPaymentAttempt(java.lang.Long nextPaymentAttempt)
The time at which payment will next be attempted.void
setNumber(java.lang.String number)
A unique, identifying string that appears on emails sent to the customer for this invoice.void
setObject(java.lang.String object)
String representing the object's type.void
setPaid(java.lang.Boolean paid)
Whether payment was successfully collected for this invoice.void
setPaymentIntent(java.lang.String id)
void
setPaymentIntentObject(PaymentIntent expandableObject)
void
setPaymentSettings(Invoice.PaymentSettings paymentSettings)
void
setPeriodEnd(java.lang.Long periodEnd)
End of the usage period during which invoice items were added to this invoice.void
setPeriodStart(java.lang.Long periodStart)
Start of the usage period during which invoice items were added to this invoice.void
setPostPaymentCreditNotesAmount(java.lang.Long postPaymentCreditNotesAmount)
Total amount of all post-payment credit notes issued for this invoice.void
setPrePaymentCreditNotesAmount(java.lang.Long prePaymentCreditNotesAmount)
Total amount of all pre-payment credit notes issued for this invoice.void
setReceiptNumber(java.lang.String receiptNumber)
This is the transaction number that appears on email receipts sent for this invoice.void
setStartingBalance(java.lang.Long startingBalance)
Starting customer balance before the invoice is finalized.void
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about an invoice for the customer's credit card statement.void
setStatus(java.lang.String status)
The status of the invoice, one ofdraft
,open
,paid
,uncollectible
, orvoid
.void
setStatusTransitions(Invoice.StatusTransitions statusTransitions)
void
setSubscription(java.lang.String id)
void
setSubscriptionObject(Subscription expandableObject)
void
setSubscriptionProrationDate(java.lang.Long subscriptionProrationDate)
Only set for upcoming invoices that preview prorations.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.void
setTax(java.lang.Long tax)
The amount of tax on this invoice.void
setThresholdReason(Invoice.ThresholdReason thresholdReason)
void
setTotal(java.lang.Long total)
Total after discounts and taxes.void
setTotalDiscountAmounts(java.util.List<Invoice.DiscountAmount> totalDiscountAmounts)
The aggregate amounts calculated per discount across all line items.void
setTotalTaxAmounts(java.util.List<Invoice.TaxAmount> totalTaxAmounts)
The aggregate amounts calculated per tax rate for all line items.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.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.static Invoice
upcoming()
At any time, you can preview the upcoming invoice for a customer.static Invoice
upcoming(InvoiceUpcomingParams params)
At any time, you can preview the upcoming invoice for a customer.static Invoice
upcoming(InvoiceUpcomingParams params, RequestOptions options)
At any time, you can preview the upcoming invoice for a customer.static Invoice
upcoming(java.util.Map<java.lang.String,java.lang.Object> params)
At any time, you can preview the upcoming invoice for a customer.static Invoice
upcoming(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
At any time, you can preview the upcoming invoice for a customer.Invoice
update(InvoiceUpdateParams params)
Draft invoices are fully editable.Invoice
update(InvoiceUpdateParams params, RequestOptions options)
Draft invoices are fully editable.Invoice
update(java.util.Map<java.lang.String,java.lang.Object> params)
Draft invoices are fully editable.Invoice
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Draft invoices are fully editable.Invoice
voidInvoice()
Mark a finalized invoice as void.Invoice
voidInvoice(RequestOptions options)
Mark a finalized invoice as void.Invoice
voidInvoice(InvoiceVoidInvoiceParams params)
Mark a finalized invoice as void.Invoice
voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options)
Mark a finalized invoice as void.Invoice
voidInvoice(java.util.Map<java.lang.String,java.lang.Object> params)
Mark a finalized invoice as void.Invoice
voidInvoice(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 expandablecharge
object.
-
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 expandablecustomer
object.
-
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 expandabledefaultPaymentMethod
object.
-
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 expandabledefaultSource
object.
-
setDefaultSource
public void setDefaultSource(java.lang.String id)
-
getDefaultSourceObject
public PaymentSource getDefaultSourceObject()
Get expandeddefaultSource
.
-
setDefaultSourceObject
public void setDefaultSourceObject(PaymentSource expandableObject)
-
getPaymentIntent
public java.lang.String getPaymentIntent()
Get ID of expandablepaymentIntent
object.
-
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 expandablesubscription
object.
-
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 expandableaccountTaxIds
object 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 expandablediscounts
object 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_date
parameter when doing the actual subscription update. The value passed in should be the same as thesubscription_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 whereperiod[start]
is equal to thesubscription_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 thesubscription_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 whereperiod[start]
is equal to thesubscription_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 thesubscription_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 whereperiod[start]
is equal to thesubscription_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 thesubscription_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 whereperiod[start]
is equal to thesubscription_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 thesubscription_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 whereperiod[start]
is equal to thesubscription_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
-
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:
update
in 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:
update
in 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.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
-
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_due
may be 0. If there is a positivestarting_balance
for the invoice (the customer owes money), theamount_due
will also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due
.
-
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.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. Whenfalse
, 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). Theupcoming
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
,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 benull
for 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.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 valuetrue
if the object exists in live mode or the valuefalse
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 benull
for 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_due
may be 0. If there is a positivestarting_balance
for the invoice (the customer owes money), theamount_due
will also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due
.
-
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.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. Whenfalse
, 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). Theupcoming
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
,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 benull
for 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.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 valuetrue
if the object exists in live mode or the valuefalse
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 benull
for 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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
getMetadata
in interfaceMetadataStore<Invoice>
-
-