JDBC Driver for Stripe

Build 22.0.8462

Invoices

Create, update, delete, and query the available Invoices in Stripe.

Table Specific Information

Select

Server-Side Query Support

The driver will use the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client side within the driver.

  • Id, CustomerId, Closed, Date, DueDate, and Subscription support the following operators: <,>>=,<,<=, =.

The provider supports all columns to be used as criteria in the WHERE clause of Select statement, as long as SupportEnhancedSQL is set to True. If SupportEnhancedSQL property is set to False, you still can retrieve:

-an All Invoices:

SELECT * FROM Invoices 

-an Invoices by specifying its Id:

SELECT * FROM Invoices WHERE Id = 'or_12345678'

-Invoices for a given Customer:

SELECT * FROM Invoices WHERE CustomerId = 'cus_12345678'

-Invoices by Closed :

SELECT * FROM Invoices WHERE Closed = True

-Invoices by Subscription :

SELECT * FROM Invoices WHERE Subscription='sub_12345678'

Insert

-To Create a new Invoice, CustomerId,CollectionMethod,DaysUntilDue and PendingInvoiceItemsBehavior is required: CustomFieldsAggregate is an aggregate column. See the example below on how to insert into this column.

INSERT INTO Invoices (CustomerId,CollectionMethod,DaysUntilDue,PendingInvoiceItemsBehavior,CustomFieldsAggregate) VALUES ('cus_MDxevmmMzKidZc','send_invoice',30,'exclude','{\"name\":\"cf_test\",\"value\":\"mycfvalue\"}')

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The Id of the invoice.

CustomerId String False

Customers.Id

The ID of the customer who will be billed.

AccountCountry String False

The country of the business associated with this invoice, most often the business creating the invoice.

AccountName String False

The name of the business associated with this invoice, most often the business creating the invoice.

AccountTaxRates String False

The account tax IDs associated with the invoice.

AmountDue Int True

Final amount due at this time for this invoice.

AmountPaid Int True

The amount, in cents, that was paid.

AmountRemaining Int True

The amount remaining, in cents, that is due.

Application String False

ID of the Connect Application that created the invoice.

ApplicationFeeAmount Int False

The fee in cents that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.

AttemptCount Int True

Number of payment attempts made for this invoice, from the perspective of the payment retry schedule..

Attempted Boolean True

Whether an attempt has been made to pay the invoice. .

AutomaticTaxEnabled Boolean False

Whether Stripe automatically computes tax on this invoice.

AutomaticTaxStatus String False

The status of the most recent automated tax calculation for this invoice.

BillingReason String False

Indicates the reason why the invoice was created.

CollectionMethod String True

Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.

Charge String True

ID of the latest charge generated for this invoice, if any.

AutoAdvance Boolean False

Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.

Currency String True

Three-letter ISO currency code, in lowercase.

Created Datetime True

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

Description String False

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.

DefaultPaymentMethod String False

ID of the default payment method for the invoice.

DefaultSource String False

ID of the default payment source for the invoice.

DefaultTaxRates String False

The tax rates applied to this invoice.

DiscountName String True

Name of the coupon.

DiscountAmount String True

Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.

CouponId String True

Id of the coupon.

Discounts String False

The discounts applied to the invoice.

DueDate Datetime False

The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.

EndingBalance Int True

Ending customer balance after the invoice is finalized.

InvoicePdf String True

The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.

Footer String False

Footer displayed on the invoice.

LastFinalizationError String True

The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.

HostedInvoiceUrl String True

The URL for the hosted invoice page, which allows customers to view and pay an invoice.

Livemode Boolean True

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

MetadataAggregate String False

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

CustomFieldsAggregate String False

Custom Fields object.

NextPaymentAttempt Datetime False

The time at which payment will next be attempted..

Number String True

A unique, identifying string that appears on emails sent to the customer for this invoice.

OnBehalfOf String False

The account (if any) for which the funds of the invoice payment are intended.

Paid Boolean False

Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.

PaidOutOfBand Boolean False

Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.

PaymentIntent String False

The PaymentIntent associated with this invoice.

PaymentMethodOptions String False

Payment-method-specific configuration to provide to the invoice's PaymentIntent.

PaymentMethodTypes String False

The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent.

PostPaymentCreditNotesAmount Int False

Total amount of all post-payment credit notes issued for this invoice.

PrePaymentCreditNotesAmount Int False

Total amount of all pre-payment credit notes issued for this invoice.

Quote String False

The quote this invoice was generated from.

PeriodEnd Datetime True

End of the usage period during which invoice items were added to this invoice.

PeriodStart Datetime True

Start of the usage period during which invoice items were added to this invoice.

ReceiptNumber String True

This is the transaction number that appears on email receipts sent for this invoice.

StartingBalance Int True

Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.

StatementDescriptor String False

If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer.

Status String False

The status of the invoice, one of draft, open, paid, uncollectible, or void. Instead of checking the forgiven field on an invoice, check for the uncollectible status. Instead of setting the forgiven field on an invoice, mark it as uncollectible.

The allowed values are draft, open, paid, uncollectible, void.

Subscription String True

The subscription that this invoice was prepared for, if any.

StatusTransitionsFinalizedAt Datetime True

The time that the invoice draft was finalized.

StatusTransitionsMarkedUncollectibleAt Datetime True

The time that the invoice was marked uncollectible.

StatusTransitionsPaidAt Datetime True

The time that the invoice was paid.

StatusTransitionsVoidedAt Datetime True

The time that the invoice was voided.

Subtotal Int True

Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.

Tax Int True

The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.

TestClock String False

ID of the test clock this invoice item belongs to.

Total Int True

Total after discounts and taxes.

TotalDiscountAmounts String False

The aggregate amounts calculated per discount across all line items.

TotalTaxAmounts String False

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

TransferDataAmount Int False

The amount in paise that will be transferred to the destination account when the invoice is paid.

TransferDataDestination String False

The account where funds from the payment will be transferred to upon payment success.

WebhooksDeliveredAt Datetime False

Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.

Customer String False

The customers id.

CustomerAddress String True

The customers address.

CustomerEmail String True

The customers email.

CustomerName String True

The customers name.

CustomerPhone String True

The customers phone number.

CustomerShipping String True

The customers shipping information.

CustomerTaxExempt String True

The customers tax exempt status.

CustomerTaxIds String True

The customers tax IDs.

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
Upcoming Boolean

Determines if the select is for upcoming invoices.

DaysUntilDue Int

The number of days from which the invoice is created until it is due. Only valid for invoices where billing=send_invoice.

Forgive Boolean

Determines if invoice should be forgiven if source has insufficient funds to fully pay the invoice.

Source String

A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.

AccountId String

The Id of the connected account to get invoices for

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462