CData Python Connector for Stripe

Build 23.0.8839

CreditNotes

Creates, updates, and queries a credit note to adjust an invoice's amount after the invoice is finalized.

Table Specific Information

Select

The connector uses the Stripe API to filter the results by the following columns and operators:

  • Id supports the following operator: =.
  • CustomerId supports the following operator: =.
  • InvoiceId supports the following operator: =.
  • AccountId supports the following operator: =.

The rest of the filter is executed client-side within the connector.

The provider supports the use of all columns as criteria in the WHERE clause of SELECT statements, as long as SupportEnhancedSQL is set to True. If SupportEnhancedSQL property is set to False, you still can retrieve the PaymentMethods:

SELECT * FROM CreditNotes
SELECT * FROM CreditNotes WHERE Id = '123124'
SELECT * FROM CreditNotes WHERE CustomerId = 'cus_N8rO0qc7j1SJJ9'
SELECT * FROM CreditNotes WHERE InvoiceId = 'in_23341xds'

Insert

To create a new credit note, InvoiceId is required:

INSERT INTO CreditNotes (InvoiceId) VALUES ('in_23341xds')
INSERT INTO CreditNotes (InvoiceId, Amount, CustomerId, Reason) VALUES ('in_23341xds', 1050, 'cus_N8rO0qc7j1SJJ9', 'duplicate')

Update

To modify a credit note, specify the credit note Id and run an Update statement.

UPDATE CreditNotes SET Amount = 1500 WHERE id='123124'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The Id of the credit note.

Amount Integer False

The integer amount in cents representing the total amount of the credit note, including tax.

AmountShipping Integer True

The sum of all the shipping amounts.

Created Datetime True

The time at which the object was created. Measured in seconds since the Unix epoch.

Currency String True

A three-letter ISO currency code, in lowercase.

CustomerId String True

The Id of customer.

CustomerBalanceTransaction String True

The customer balance transaction related to this credit note.

DiscountAmounts String True

The aggregate amounts calculated per discount for all line items.

EffectiveAt Datetime False

The date when this credit note goes into effect. This is the same as created unless overwritten.

InvoiceId String False

The Id of invoice.

Lines String False

Line items that make up the credit note.

Livemode Boolean True

true if the object is in live mode andfalse if in test mode.

Memo String False

Customer-facing text that appears on the credit note PDF.

Metadata String False

The set of key/value pairs that you can attach to a value list object.

Number String True

A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.

OutOfBandAmount Integer False

Amount that was credited outside of Stripe.

Pdf String True

The link to download the PDF of the credit note.

Reason String False

The reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory.

The allowed values are duplicate, fraudulent, order_change, product_unsatisfactory.

Refund String False

The refund related to this credit note.

ShippingCost String False

The details of the cost of shipping

Status String True

The status of this credit note, one of issued or void.

Subtotal Integer True

The integer amount in cents representing the amount of the credit note, excluding exclusive tax and invoice level discounts.

SubtotalExcludingTax Integer True

The integer amount in cents representing the amount of the credit note, excluding all tax and invoice level discounts.

TaxAmounts String True

The aggregate amounts calculated per tax rate for all line items.

Total Integer True

The integer amount in cents representing the total amount of the credit note, including tax and all discount.

TotalExcludingTax Integer True

The integer amount in cents representing the total amount of the credit note, excluding tax, but including discounts.

Type String True

The type of this credit note, either pre_payment or post_payment.

VoidedAt Datetime True

The time at which the credit note was voided.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
CreditAmount Integer

The integer amount in cents representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.

RefundAmount Integer

The integer amount in cents representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

AccountId String

The Id of the connected account to get credit notes for.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839