List all credit notes
Returns a list of credit notes.
API Endpoint: GET /v1/credit_notes
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.list()from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.list()Preview a credit note
Get a preview of a credit note without creating it.
API Endpoint: GET /v1/credit_notes/preview
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.preview(invoice="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.preview(invoice="string")Retrieve a credit note preview's line items
When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
API Endpoint: GET /v1/credit_notes/preview/lines
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.preview_lines(invoice="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.preview_lines(invoice="string")Retrieve a credit note's line items
When retrieving a credit note, you’ll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
API Endpoint: GET /v1/credit_notes/{credit_note}/lines
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.lines(credit_note="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.lines(credit_note="string")Retrieve a credit note
Retrieves the credit note object with the given identifier.
API Endpoint: GET /v1/credit_notes/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.get(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.get(id="string")Create a credit note
Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
its amount_due. For a status=paid invoice, a credit note does not affect its amount_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
or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
API Endpoint: POST /v1/credit_notes
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.create(invoice="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.create(invoice="string")Update a credit note
Updates an existing credit note.
API Endpoint: POST /v1/credit_notes/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.update(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.update(id="string")Void a credit note
Marks a credit note as void. Learn more about voiding credit notes.
API Endpoint: POST /v1/credit_notes/{id}/void
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.credit_note.void(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.credit_note.void(id="string")