public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice>
Modifier and Type | Class and Description |
---|---|
static class |
Invoice.CustomerTaxId |
static class |
Invoice.CustomField |
static class |
Invoice.StatusTransitions |
static class |
Invoice.TaxAmount |
static class |
Invoice.ThresholdItemReason |
static class |
Invoice.ThresholdReason |
static class |
Invoice.TransferData |
ApiResource.RequestMethod, ApiResource.RequestType
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Invoice() |
Modifier and Type | Method and 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 draft invoice.
|
Invoice |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Permanently deletes a draft invoice.
|
Invoice |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Permanently deletes a draft invoice.
|
Invoice |
delete(RequestOptions options)
Permanently deletes a draft invoice.
|
boolean |
equals(java.lang.Object o) |
Invoice |
finalizeInvoice()
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.
|
Invoice |
finalizeInvoice(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.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](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice.
|
java.lang.String |
getBillingReason()
Indicates the reason why the invoice was created.
|
java.lang.String |
getCharge()
Get id of expandable `charge` object.
|
Charge |
getChargeObject()
Get expanded `charge`.
|
java.lang.String |
getCollectionMethod()
Either `charge_automatically`, or `send_invoice`.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase.
|
java.lang.String |
getCustomer()
Get id of expandable `customer` 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 expanded `customer`.
|
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 expandable `defaultPaymentMethod` object.
|
PaymentMethod |
getDefaultPaymentMethodObject()
Get expanded `defaultPaymentMethod`.
|
java.lang.String |
getDefaultSource()
Get id of expandable `defaultSource` object.
|
PaymentSource |
getDefaultSourceObject()
Get expanded `defaultSource`.
|
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() |
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.
|
InvoiceLineItemCollection |
getLines()
The individual line items that make up the invoice.
|
java.lang.Boolean |
getLivemode()
Has the value `true` if the object exists in live mode or the value `false` if the object
exists in test mode.
|
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 expandable `paymentIntent` object.
|
PaymentIntent |
getPaymentIntentObject()
Get expanded `paymentIntent`.
|
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 of `draft`, `open`, `paid`, `uncollectible`, or `void`.
|
Invoice.StatusTransitions |
getStatusTransitions() |
java.lang.String |
getSubscription()
Get id of expandable `subscription` object.
|
Subscription |
getSubscriptionObject()
Get expanded `subscription`.
|
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 discount or
tax is applied.
|
java.lang.Long |
getTax()
The amount of tax on this invoice.
|
java.math.BigDecimal |
getTaxPercent()
This percentage of the subtotal has been added to the total amount of the invoice, including
invoice line items and discounts.
|
Invoice.ThresholdReason |
getThresholdReason() |
java.lang.Long |
getTotal()
Total after discounts and taxes.
|
java.util.List<Invoice.TaxAmount> |
getTotalTaxAmounts()
The aggregate amounts calculated per tax rate for all line items.
|
Invoice.TransferData |
getTransferData()
If specified, the funds from the invoice will be transferred to the destination and the ID of
the resulting transfer will be found on the invoice's charge.
|
java.lang.Long |
getWebhooksDeliveredAt()
The time at which webhooks for this invoice were successfully delivered (if the invoice had no
webhooks to deliver, this will match `created`).
|
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(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 |
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 |
pay()
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.
|
Invoice |
pay(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,
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.
|
static Invoice |
retrieve(java.lang.String invoice,
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(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.
|
Invoice |
sendInvoice(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 |
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](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) 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)
Either `charge_automatically`, or `send_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](https://www.iso.org/iso-4217-currency-codes.html), 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) |
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 |
setLines(InvoiceLineItemCollection lines)
The individual line items that make up the invoice.
|
void |
setLivemode(java.lang.Boolean livemode)
Has the value `true` if the object exists in live mode or the value `false` if the object
exists in test mode.
|
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 |
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 of `draft`, `open`, `paid`, `uncollectible`, or `void`.
|
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 discount or
tax is applied.
|
void |
setTax(java.lang.Long tax)
The amount of tax on this invoice.
|
void |
setTaxPercent(java.math.BigDecimal taxPercent)
This percentage of the subtotal has been added to the total amount of the invoice, including
invoice line items and discounts.
|
void |
setThresholdReason(Invoice.ThresholdReason thresholdReason) |
void |
setTotal(java.lang.Long total)
Total after discounts and taxes.
|
void |
setTotalTaxAmounts(java.util.List<Invoice.TaxAmount> totalTaxAmounts)
The aggregate amounts calculated per tax rate for all line items.
|
void |
setTransferData(Invoice.TransferData transferData)
If specified, the funds from the invoice will be transferred to the destination and the ID of
the resulting transfer will be found on the invoice's charge.
|
void |
setWebhooksDeliveredAt(java.lang.Long webhooksDeliveredAt)
The time at which webhooks for this invoice were successfully delivered (if the invoice had no
webhooks to deliver, this will match `created`).
|
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(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.
|
Invoice |
voidInvoice(RequestOptions options)
Mark a finalized invoice as void.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCharge()
public void setCharge(java.lang.String id)
public Charge getChargeObject()
public void setChargeObject(Charge expandableObject)
public java.lang.String getCustomer()
public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
public void setCustomerObject(Customer expandableObject)
public java.lang.String getDefaultPaymentMethod()
public void setDefaultPaymentMethod(java.lang.String id)
public PaymentMethod getDefaultPaymentMethodObject()
public void setDefaultPaymentMethodObject(PaymentMethod expandableObject)
public java.lang.String getDefaultSource()
public void setDefaultSource(java.lang.String id)
public PaymentSource getDefaultSourceObject()
public void setDefaultSourceObject(PaymentSource expandableObject)
public java.lang.String getPaymentIntent()
public void setPaymentIntent(java.lang.String id)
public PaymentIntent getPaymentIntentObject()
public void setPaymentIntentObject(PaymentIntent expandableObject)
public java.lang.String getSubscription()
public void setSubscription(java.lang.String id)
public Subscription getSubscriptionObject()
public void setSubscriptionObject(Subscription expandableObject)
public static InvoiceCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static InvoiceCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static InvoiceCollection list(InvoiceListParams params) throws StripeException
StripeException
public static InvoiceCollection list(InvoiceListParams params, RequestOptions options) throws StripeException
StripeException
public static Invoice upcoming() throws StripeException
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what
proration will take place. To ensure that the actual proration is calculated exactly the same
as the previewed proration, you should pass a proration_date
parameter when doing
the actual subscription update. The value passed in should be the same as the
subscription_proration_date
returned on the upcoming invoice resource. The recommended
way to get only the prorations being previewed is to consider only proration line items where
period[start]
is equal to the subscription_proration_date
on the
upcoming invoice resource.
StripeException
public static Invoice upcoming(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what
proration will take place. To ensure that the actual proration is calculated exactly the same
as the previewed proration, you should pass a proration_date
parameter when doing
the actual subscription update. The value passed in should be the same as the
subscription_proration_date
returned on the upcoming invoice resource. The recommended
way to get only the prorations being previewed is to consider only proration line items where
period[start]
is equal to the subscription_proration_date
on the
upcoming invoice resource.
StripeException
public static Invoice upcoming(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what
proration will take place. To ensure that the actual proration is calculated exactly the same
as the previewed proration, you should pass a proration_date
parameter when doing
the actual subscription update. The value passed in should be the same as the
subscription_proration_date
returned on the upcoming invoice resource. The recommended
way to get only the prorations being previewed is to consider only proration line items where
period[start]
is equal to the subscription_proration_date
on the
upcoming invoice resource.
StripeException
public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeException
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what
proration will take place. To ensure that the actual proration is calculated exactly the same
as the previewed proration, you should pass a proration_date
parameter when doing
the actual subscription update. The value passed in should be the same as the
subscription_proration_date
returned on the upcoming invoice resource. The recommended
way to get only the prorations being previewed is to consider only proration line items where
period[start]
is equal to the subscription_proration_date
on the
upcoming invoice resource.
StripeException
public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what
proration will take place. To ensure that the actual proration is calculated exactly the same
as the previewed proration, you should pass a proration_date
parameter when doing
the actual subscription update. The value passed in should be the same as the
subscription_proration_date
returned on the upcoming invoice resource. The recommended
way to get only the prorations being previewed is to consider only proration line items where
period[start]
is equal to the subscription_proration_date
on the
upcoming invoice resource.
StripeException
public static Invoice create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Invoice create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Invoice create(InvoiceCreateParams params) throws StripeException
StripeException
public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException
StripeException
public static Invoice retrieve(java.lang.String invoice) throws StripeException
StripeException
public static Invoice retrieve(java.lang.String invoice, RequestOptions options) throws StripeException
StripeException
public static Invoice retrieve(java.lang.String invoice, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Invoice retrieve(java.lang.String invoice, InvoiceRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public Invoice update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
collection_method
, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing,
reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.
update
in interface MetadataStore<Invoice>
StripeException
public Invoice update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
collection_method
, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing,
reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.
update
in interface MetadataStore<Invoice>
StripeException
public Invoice update(InvoiceUpdateParams params) throws StripeException
collection_method
, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing,
reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.
StripeException
public Invoice update(InvoiceUpdateParams params, RequestOptions options) throws StripeException
collection_method
, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing,
reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.
StripeException
public Invoice delete() throws StripeException
StripeException
public Invoice delete(RequestOptions options) throws StripeException
StripeException
public Invoice delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Invoice delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Invoice pay() throws StripeException
StripeException
public Invoice pay(RequestOptions options) throws StripeException
StripeException
public Invoice pay(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Invoice pay(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Invoice pay(InvoicePayParams params) throws StripeException
StripeException
public Invoice pay(InvoicePayParams params, RequestOptions options) throws StripeException
StripeException
public Invoice finalizeInvoice() throws StripeException
StripeException
public Invoice finalizeInvoice(RequestOptions options) throws StripeException
StripeException
public Invoice finalizeInvoice(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Invoice finalizeInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Invoice finalizeInvoice(InvoiceFinalizeInvoiceParams params) throws StripeException
StripeException
public Invoice finalizeInvoice(InvoiceFinalizeInvoiceParams params, RequestOptions options) throws StripeException
StripeException
public Invoice sendInvoice() throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice sendInvoice(RequestOptions options) throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice sendInvoice(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice sendInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice sendInvoice(InvoiceSendInvoiceParams params) throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions options) throws StripeException
Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.
StripeException
public Invoice markUncollectible() throws StripeException
StripeException
public Invoice markUncollectible(RequestOptions options) throws StripeException
StripeException
public Invoice markUncollectible(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Invoice markUncollectible(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Invoice markUncollectible(InvoiceMarkUncollectibleParams params) throws StripeException
StripeException
public Invoice markUncollectible(InvoiceMarkUncollectibleParams params, RequestOptions options) throws StripeException
StripeException
public Invoice voidInvoice() throws StripeException
StripeException
public Invoice voidInvoice(RequestOptions options) throws StripeException
StripeException
public Invoice voidInvoice(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Invoice voidInvoice(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Invoice voidInvoice(InvoiceVoidInvoiceParams params) throws StripeException
StripeException
public Invoice voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options) throws StripeException
StripeException
public java.lang.String getAccountCountry()
public java.lang.String getAccountName()
public java.lang.Long getAmountDue()
public java.lang.Long getAmountPaid()
public java.lang.Long getAmountRemaining()
public java.lang.Long getApplicationFeeAmount()
public java.lang.Long getAttemptCount()
public java.lang.Boolean getAttempted()
public java.lang.Boolean getAutoAdvance()
public java.lang.String getBillingReason()
public java.lang.String getCollectionMethod()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.util.List<Invoice.CustomField> getCustomFields()
public Address getCustomerAddress()
public java.lang.String getCustomerEmail()
public java.lang.String getCustomerName()
public java.lang.String getCustomerPhone()
public ShippingDetails getCustomerShipping()
public java.lang.String getCustomerTaxExempt()
public java.util.List<Invoice.CustomerTaxId> getCustomerTaxIds()
public java.util.List<TaxRate> getDefaultTaxRates()
public java.lang.Boolean getDeleted()
public java.lang.String getDescription()
public Discount getDiscount()
public java.lang.Long getDueDate()
public java.lang.Long getEndingBalance()
public java.lang.String getFooter()
public java.lang.String getHostedInvoiceUrl()
public java.lang.String getInvoicePdf()
public InvoiceLineItemCollection getLines()
public java.lang.Boolean getLivemode()
public java.lang.Long getNextPaymentAttempt()
public java.lang.String getNumber()
public java.lang.String getObject()
public java.lang.Boolean getPaid()
public java.lang.Long getPeriodEnd()
public java.lang.Long getPeriodStart()
public java.lang.Long getPostPaymentCreditNotesAmount()
public java.lang.Long getPrePaymentCreditNotesAmount()
public java.lang.String getReceiptNumber()
public java.lang.Long getStartingBalance()
public java.lang.String getStatementDescriptor()
public java.lang.String getStatus()
public Invoice.StatusTransitions getStatusTransitions()
public java.lang.Long getSubscriptionProrationDate()
public java.lang.Long getSubtotal()
public java.lang.Long getTax()
public java.math.BigDecimal getTaxPercent()
public Invoice.ThresholdReason getThresholdReason()
public java.lang.Long getTotal()
public java.util.List<Invoice.TaxAmount> getTotalTaxAmounts()
public Invoice.TransferData getTransferData()
public java.lang.Long getWebhooksDeliveredAt()
public void setAccountCountry(java.lang.String accountCountry)
public void setAccountName(java.lang.String accountName)
public void setAmountDue(java.lang.Long amountDue)
public void setAmountPaid(java.lang.Long amountPaid)
public void setAmountRemaining(java.lang.Long amountRemaining)
public void setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
public void setAttemptCount(java.lang.Long attemptCount)
public void setAttempted(java.lang.Boolean attempted)
public void setAutoAdvance(java.lang.Boolean autoAdvance)
public void setBillingReason(java.lang.String billingReason)
public void setCollectionMethod(java.lang.String collectionMethod)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setCustomFields(java.util.List<Invoice.CustomField> customFields)
public void setCustomerAddress(Address customerAddress)
public void setCustomerEmail(java.lang.String customerEmail)
public void setCustomerName(java.lang.String customerName)
public void setCustomerPhone(java.lang.String customerPhone)
public void setCustomerShipping(ShippingDetails customerShipping)
public void setCustomerTaxExempt(java.lang.String customerTaxExempt)
public void setCustomerTaxIds(java.util.List<Invoice.CustomerTaxId> customerTaxIds)
public void setDefaultTaxRates(java.util.List<TaxRate> defaultTaxRates)
public void setDeleted(java.lang.Boolean deleted)
public void setDescription(java.lang.String description)
public void setDiscount(Discount discount)
public void setDueDate(java.lang.Long dueDate)
public void setEndingBalance(java.lang.Long endingBalance)
public void setFooter(java.lang.String footer)
public void setHostedInvoiceUrl(java.lang.String hostedInvoiceUrl)
public void setId(java.lang.String id)
public void setInvoicePdf(java.lang.String invoicePdf)
public void setLines(InvoiceLineItemCollection lines)
public void setLivemode(java.lang.Boolean livemode)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setNextPaymentAttempt(java.lang.Long nextPaymentAttempt)
public void setNumber(java.lang.String number)
public void setObject(java.lang.String object)
public void setPaid(java.lang.Boolean paid)
public void setPeriodEnd(java.lang.Long periodEnd)
public void setPeriodStart(java.lang.Long periodStart)
public void setPostPaymentCreditNotesAmount(java.lang.Long postPaymentCreditNotesAmount)
public void setPrePaymentCreditNotesAmount(java.lang.Long prePaymentCreditNotesAmount)
public void setReceiptNumber(java.lang.String receiptNumber)
public void setStartingBalance(java.lang.Long startingBalance)
public void setStatementDescriptor(java.lang.String statementDescriptor)
public void setStatus(java.lang.String status)
public void setStatusTransitions(Invoice.StatusTransitions statusTransitions)
public void setSubscriptionProrationDate(java.lang.Long subscriptionProrationDate)
public void setSubtotal(java.lang.Long subtotal)
public void setTax(java.lang.Long tax)
public void setTaxPercent(java.math.BigDecimal taxPercent)
public void setThresholdReason(Invoice.ThresholdReason thresholdReason)
public void setTotal(java.lang.Long total)
public void setTotalTaxAmounts(java.util.List<Invoice.TaxAmount> totalTaxAmounts)
public void setTransferData(Invoice.TransferData transferData)
public void setWebhooksDeliveredAt(java.lang.Long webhooksDeliveredAt)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<Invoice>