Class CreditNote
- All Implemented Interfaces:
HasId
,MetadataStore<CreditNote>
,StripeActiveObject
,StripeObjectInterface
Related guide: Credit notes
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
The amount on which tax is calculated, in cents (or local equivalent).Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static CreditNote
create
(CreditNoteCreateParams params) Issue a credit note to adjust the amount of a finalized invoice.static CreditNote
create
(CreditNoteCreateParams params, RequestOptions options) Issue a credit note to adjust the amount of a finalized invoice.static CreditNote
Issue a credit note to adjust the amount of a finalized invoice.static CreditNote
create
(Map<String, Object> params, RequestOptions options) Issue a credit note to adjust the amount of a finalized invoice.boolean
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.This is the sum of all the shipping amounts.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomer
object.Get ID of expandablecustomerBalanceTransaction
object.Get expandedcustomerBalanceTransaction
.Get expandedcustomer
.The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.The aggregate amounts calculated per discount for all line items.The date when this credit note is in effect.getId()
Unique identifier for the object.Get ID of expandableinvoice
object.Get expandedinvoice
.getLines()
Line items that make up the credit note.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.getMemo()
Customer-facing text that appears on the credit note PDF.Set of key-value pairs that you can attach to an object.A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.String representing the object's type.Amount that was credited outside of Stripe.getPdf()
The link to download the PDF of the credit note.Reason for issuing this credit note, one ofduplicate
,fraudulent
,order_change
, orproduct_unsatisfactory
.Get ID of expandablerefund
object.Get expandedrefund
.The details of the cost of shipping, including the ShippingRate applied to the invoice.Status of this credit note, one ofissued
orvoid
.The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.The aggregate amounts calculated per tax rate for all line items.getTotal()
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.getType()
Type of this credit note, one ofpre_payment
orpost_payment
.The time that the credit note was voided.int
hashCode()
static CreditNoteCollection
list
(CreditNoteListParams params) Returns a list of credit notes.static CreditNoteCollection
list
(CreditNoteListParams params, RequestOptions options) Returns a list of credit notes.static CreditNoteCollection
Returns a list of credit notes.static CreditNoteCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of credit notes.static CreditNote
preview
(CreditNotePreviewParams params) Get a preview of a credit note without creating it.static CreditNote
preview
(CreditNotePreviewParams params, RequestOptions options) Get a preview of a credit note without creating it.static CreditNote
Get a preview of a credit note without creating it.static CreditNote
preview
(Map<String, Object> params, RequestOptions options) Get a preview of a credit note without creating it.static CreditNote
Retrieves the credit note object with the given identifier.static CreditNote
retrieve
(String id, RequestOptions options) Retrieves the credit note object with the given identifier.static CreditNote
retrieve
(String id, CreditNoteRetrieveParams params, RequestOptions options) Retrieves the credit note object with the given identifier.static CreditNote
Retrieves the credit note object with the given identifier.void
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.void
setAmountShipping
(Long amountShipping) This is the sum of all the shipping amounts.void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomer
(String id) void
void
setCustomerBalanceTransactionObject
(CustomerBalanceTransaction expandableObject) void
setCustomerObject
(Customer expandableObject) void
setDiscountAmount
(Long discountAmount) The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.void
setDiscountAmounts
(List<CreditNote.DiscountAmount> discountAmounts) The aggregate amounts calculated per discount for all line items.void
setEffectiveAt
(Long effectiveAt) The date when this credit note is in effect.void
Unique identifier for the object.void
setInvoice
(String id) void
setInvoiceObject
(Invoice expandableObject) void
Line items that make up the credit note.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
Customer-facing text that appears on the credit note PDF.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.void
String representing the object's type.void
setOutOfBandAmount
(Long outOfBandAmount) Amount that was credited outside of Stripe.void
The link to download the PDF of the credit note.void
Reason for issuing this credit note, one ofduplicate
,fraudulent
,order_change
, orproduct_unsatisfactory
.void
void
setRefundObject
(Refund expandableObject) void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
setShippingCost
(CreditNote.ShippingCost shippingCost) The details of the cost of shipping, including the ShippingRate applied to the invoice.void
Status of this credit note, one ofissued
orvoid
.void
setSubtotal
(Long subtotal) The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.void
setSubtotalExcludingTax
(Long subtotalExcludingTax) The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.void
setTaxAmounts
(List<CreditNote.TaxAmount> taxAmounts) The aggregate amounts calculated per tax rate for all line items.void
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.void
setTotalExcludingTax
(Long totalExcludingTax) The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.void
Type of this credit note, one ofpre_payment
orpost_payment
.void
setVoidedAt
(Long voidedAt) The time that the credit note was voided.update
(CreditNoteUpdateParams params) Updates an existing credit note.update
(CreditNoteUpdateParams params, RequestOptions options) Updates an existing credit note.Updates an existing credit note.update
(Map<String, Object> params, RequestOptions options) Updates an existing credit note.Marks a credit note as void.voidCreditNote
(RequestOptions options) Marks a credit note as void.Marks a credit note as void.voidCreditNote
(CreditNoteVoidCreditNoteParams params, RequestOptions options) Marks a credit note as void.voidCreditNote
(Map<String, Object> params) Marks a credit note as void.voidCreditNote
(Map<String, Object> params, RequestOptions options) Marks a credit note as void.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
CreditNote
public CreditNote()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
getCustomerBalanceTransaction
Get ID of expandablecustomerBalanceTransaction
object. -
setCustomerBalanceTransaction
-
getCustomerBalanceTransactionObject
Get expandedcustomerBalanceTransaction
. -
setCustomerBalanceTransactionObject
-
getInvoice
Get ID of expandableinvoice
object. -
setInvoice
-
getInvoiceObject
Get expandedinvoice
. -
setInvoiceObject
-
getRefund
Get ID of expandablerefund
object. -
setRefund
-
getRefundObject
Get expandedrefund
. -
setRefundObject
-
create
Issue a credit note to adjust the amount of a finalized invoice. For astatus=open
invoice, a credit note reduces itsamount_due
. For astatus=paid
invoice, a credit note does not affect itsamount_due
. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount
) or link an existing refund (usingrefund
). - Customer balance credit: credit the customer’s balance (using
credit_amount
) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
out_of_band_amount
).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s
pre_payment_credit_notes_amount
orpost_payment_credit_notes_amount
depending on itsstatus
at the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
public static CreditNote create(Map<String, Object> params, RequestOptions options) throws StripeExceptionIssue a credit note to adjust the amount of a finalized invoice. For astatus=open
invoice, a credit note reduces itsamount_due
. For astatus=paid
invoice, a credit note does not affect itsamount_due
. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount
) or link an existing refund (usingrefund
). - Customer balance credit: credit the customer’s balance (using
credit_amount
) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
out_of_band_amount
).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s
pre_payment_credit_notes_amount
orpost_payment_credit_notes_amount
depending on itsstatus
at the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
Issue a credit note to adjust the amount of a finalized invoice. For astatus=open
invoice, a credit note reduces itsamount_due
. For astatus=paid
invoice, a credit note does not affect itsamount_due
. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount
) or link an existing refund (usingrefund
). - Customer balance credit: credit the customer’s balance (using
credit_amount
) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
out_of_band_amount
).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s
pre_payment_credit_notes_amount
orpost_payment_credit_notes_amount
depending on itsstatus
at the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
public static CreditNote create(CreditNoteCreateParams params, RequestOptions options) throws StripeException Issue a credit note to adjust the amount of a finalized invoice. For astatus=open
invoice, a credit note reduces itsamount_due
. For astatus=paid
invoice, a credit note does not affect itsamount_due
. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount
) or link an existing refund (usingrefund
). - Customer balance credit: credit the customer’s balance (using
credit_amount
) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
out_of_band_amount
).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s
pre_payment_credit_notes_amount
orpost_payment_credit_notes_amount
depending on itsstatus
at the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
public static CreditNoteCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of credit notes.- Throws:
StripeException
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
public static CreditNoteCollection list(CreditNoteListParams params, RequestOptions options) throws StripeException Returns a list of credit notes.- Throws:
StripeException
-
preview
Get a preview of a credit note without creating it.- Throws:
StripeException
-
preview
public static CreditNote preview(Map<String, Object> params, RequestOptions options) throws StripeExceptionGet a preview of a credit note without creating it.- Throws:
StripeException
-
preview
Get a preview of a credit note without creating it.- Throws:
StripeException
-
preview
public static CreditNote preview(CreditNotePreviewParams params, RequestOptions options) throws StripeException Get a preview of a credit note without creating it.- Throws:
StripeException
-
retrieve
Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
public static CreditNote retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
public static CreditNote retrieve(String id, CreditNoteRetrieveParams params, RequestOptions options) throws StripeException Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
update
Updates an existing credit note.- Specified by:
update
in interfaceMetadataStore<CreditNote>
- Throws:
StripeException
-
update
Updates an existing credit note.- Specified by:
update
in interfaceMetadataStore<CreditNote>
- Throws:
StripeException
-
update
Updates an existing credit note.- Throws:
StripeException
-
update
public CreditNote update(CreditNoteUpdateParams params, RequestOptions options) throws StripeException Updates an existing credit note.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
public CreditNote voidCreditNote(Map<String, Object> params, RequestOptions options) throws StripeExceptionMarks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
public CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestOptions options) throws StripeException Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAmount
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. -
getAmountShipping
This is the sum of all the shipping amounts. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDiscountAmount
The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. -
getDiscountAmounts
The aggregate amounts calculated per discount for all line items. -
getEffectiveAt
The date when this credit note is in effect. Same ascreated
unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. -
getLines
Line items that make up the credit note. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getMemo
Customer-facing text that appears on the credit note PDF. -
getNumber
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
credit_note
. -
getOutOfBandAmount
Amount that was credited outside of Stripe. -
getPdf
The link to download the PDF of the credit note. -
getReason
Reason for issuing this credit note, one ofduplicate
,fraudulent
,order_change
, orproduct_unsatisfactory
. -
getShippingCost
The details of the cost of shipping, including the ShippingRate applied to the invoice. -
getStatus
-
getSubtotal
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. -
getSubtotalExcludingTax
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. -
getTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
getTotal
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. -
getTotalExcludingTax
The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. -
getType
Type of this credit note, one ofpre_payment
orpost_payment
. Apre_payment
credit note means it was issued when the invoice was open. Apost_payment
credit note means it was issued when the invoice was paid. -
getVoidedAt
The time that the credit note was voided. -
setAmount
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. -
setAmountShipping
This is the sum of all the shipping amounts. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDiscountAmount
The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. -
setDiscountAmounts
The aggregate amounts calculated per discount for all line items. -
setEffectiveAt
The date when this credit note is in effect. Same ascreated
unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. -
setId
Unique identifier for the object. -
setLines
Line items that make up the credit note. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMemo
Customer-facing text that appears on the credit note PDF. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setNumber
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
credit_note
. -
setOutOfBandAmount
Amount that was credited outside of Stripe. -
setPdf
The link to download the PDF of the credit note. -
setReason
Reason for issuing this credit note, one ofduplicate
,fraudulent
,order_change
, orproduct_unsatisfactory
. -
setShippingCost
The details of the cost of shipping, including the ShippingRate applied to the invoice. -
setStatus
-
setSubtotal
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. -
setSubtotalExcludingTax
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. -
setTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
setTotal
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. -
setTotalExcludingTax
The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. -
setType
Type of this credit note, one ofpre_payment
orpost_payment
. Apre_payment
credit note means it was issued when the invoice was open. Apost_payment
credit note means it was issued when the invoice was paid. -
setVoidedAt
The time that the credit note was voided. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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<CreditNote>
-