Package com.stripe.service
Class CreditNoteService
java.lang.Object
com.stripe.net.ApiService
com.stripe.service.CreditNoteService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(CreditNoteCreateParams params) Issue a credit note to adjust the amount of a finalized invoice.create
(CreditNoteCreateParams params, RequestOptions options) Issue a credit note to adjust the amount of a finalized invoice.list()
Returns a list of credit notes.list
(RequestOptions options) Returns a list of credit notes.list
(CreditNoteListParams params) Returns a list of credit notes.list
(CreditNoteListParams params, RequestOptions options) Returns a list of credit notes.preview
(CreditNotePreviewParams params) Get a preview of a credit note without creating it.preview
(CreditNotePreviewParams params, RequestOptions options) Get a preview of a credit note without creating it.Retrieves the credit note object with the given identifier.retrieve
(String id, RequestOptions options) Retrieves the credit note object with the given identifier.retrieve
(String id, CreditNoteRetrieveParams params) Retrieves the credit note object with the given identifier.retrieve
(String id, CreditNoteRetrieveParams params, RequestOptions options) Retrieves the credit note object with the given identifier.Updates an existing credit note.update
(String id, RequestOptions options) Updates an existing credit note.update
(String id, CreditNoteUpdateParams params) Updates an existing credit note.update
(String id, CreditNoteUpdateParams params, RequestOptions options) Updates an existing credit note.voidCreditNote
(String id) Marks a credit note as void.voidCreditNote
(String id, RequestOptions options) Marks a credit note as void.voidCreditNote
(String id, CreditNoteVoidCreditNoteParams params) Marks a credit note as void.voidCreditNote
(String id, CreditNoteVoidCreditNoteParams params, RequestOptions options) Marks a credit note as void.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
CreditNoteService
-
-
Method Details
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
public StripeCollection<CreditNote> list(CreditNoteListParams params, RequestOptions options) throws StripeException Returns a list of credit notes.- Throws:
StripeException
-
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 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
-
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
Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
public 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.- Throws:
StripeException
-
update
Updates an existing credit note.- Throws:
StripeException
-
update
Updates an existing credit note.- Throws:
StripeException
-
update
public CreditNote update(String id, CreditNoteUpdateParams params, RequestOptions options) throws StripeException Updates an existing credit note.- Throws:
StripeException
-
preview
Get a preview of a credit note without creating it.- Throws:
StripeException
-
preview
public CreditNote preview(CreditNotePreviewParams params, RequestOptions options) throws StripeException Get a preview of a credit note without creating it.- Throws:
StripeException
-
voidCreditNote
public CreditNote voidCreditNote(String id, CreditNoteVoidCreditNoteParams params) throws StripeException 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(String id, CreditNoteVoidCreditNoteParams params, RequestOptions options) throws StripeException Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
lineItems
-
previewLines
-