turbot/stripe

steampipe plugin install stripesteampipe plugin install stripe

Table: stripe_customer

Customers defined in the Stripe account.

Examples

List all customers

select
*
from
stripe_customer

Customers added in the last week

select
id,
name,
created
from
stripe_customer
where
created > (current_timestamp - interval '7 days')
order by
created desc

All customers with a credit on their account

select
id,
name,
account_balance,
currency
from
stripe_customer
where
account_balance < 0

All customers with an outstanding balance to add to their next invoice

select
id,
name,
account_balance,
currency
from
stripe_customer
where
account_balance > 0

.inspect stripe_customer

Customer details.

NameTypeDescription
addressjsonbThe customer’s address.
balancebigintCurrent balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
createdtimestamp without time zoneTime at which the object was created.
currencytextThree-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
default_sourcejsonbID of the default payment source for the customer.
deletedbooleanTrue if the customer is marked as deleted.
delinquentbooleanWhen the customer’s latest invoice is billed by charging automatically, delinquent is true if the invoice’s latest charge failed. When the customer’s latest invoice is billed by sending an invoice, delinquent is true if the invoice isn’t paid by its due date. If an invoice is marked uncollectible by dunning, delinquent doesn’t get reset to false.
descriptiontextAn arbitrary string attached to the object. Often useful for displaying to users.
discountjsonbDescribes the current discount active on the customer, if there is one.
emailtextThe customer’s email address.
idtextUnique identifier for the customer.
invoice_prefixtextThe prefix for the customer used to generate unique invoice numbers.
invoice_settingsjsonbThe customer’s default invoice settings.
livemodebooleanHas the value true if the object exists in live mode or the value false if the object exists in test mode.
metadatajsonbSet 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.
nametextThe customer’s full name or business name.
next_invoice_sequencebigintThe suffix of the customer’s next invoice number, e.g., 0001.
phonetextThe customer’s phone number.
preferred_localesjsonbThe customer’s preferred locales (languages), ordered by preference.
shippingjsonbMailing and shipping address for the customer. Appears on invoices emailed to this customer.
tax_exempttextDescribes the customer’s tax exemption status. One of none, exempt, or reverse.
tax_idsjsonbThe customer’s tax IDs.