Skip to content

Stripe

Stripe payments, billing, customers, payouts, Connect and events as SQL tables

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/stripe/index.md to help me query Stripe with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

See outstanding invoices by customer

Balances are grouped by currency so amounts in different currencies are never added together.

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT customer, customer_name, customer_email, currency,
       count(*) AS open_invoices,
       sum(amount_remaining_decimal) AS amount_due
FROM stripe.main.invoices()
WHERE status = 'open'
GROUP BY customer, customer_name, customer_email, currency
ORDER BY amount_due DESC
LIMIT 10

Quick start

Choose where to run Stripe, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'stripe' AS stripe (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-stripe'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

stripe credentials

Stripe API key (restricted key with read permissions recommended), plus optional Connect account and API version

Get these credentials →
secret.sql
CREATE SECRET stripe (
    TYPE stripe,
    api_key        '<STRIPE_API_KEY>',  -- secret
    stripe_account '<stripe_account>',
    api_version    '<api_version>',
    base_url       '<base_url>'
);
Credential fields and requirements →

4. Run a query

query.sql
SELECT customer, customer_name, customer_email, currency,
       count(*) AS open_invoices,
       sum(amount_remaining_decimal) AS amount_due
FROM stripe.main.invoices()
WHERE status = 'open'
GROUP BY customer, customer_name, customer_email, currency
ORDER BY amount_due DESC
LIMIT 10
More example queries →
Technical details
Verified connector release
v0.3.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'stripe' AS stripe (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Stripe as SQL: payments, balance, customers, billing, product catalog, Connect and the event feed, read-only from the Stripe API.

Catalog

Everything stripe exposes once attached — read straight from the worker's released build.

stripe 15 schemas
api 1 function

Raw JSON access to any documented Stripe GET endpoint, for single objects and fields the typed functions omit.

Schema examples (1)
Example

Your account's country and default currency from the raw account object

SELECT body->>'$.country' AS country,
  body->>'$.default_currency' AS currency
FROM stripe.api.get('/v1/account');
Table functions
get (path VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Raw read of any documented Stripe GET endpoint as one JSON row (an escape hatch for single objects)

Positional arguments
path VARCHAR
A documented Stripe GET path with its ids filled in, e.g. '/v1/charges/ch_123' or '/v1/account'.
Named arguments
params := MAP(VARCHAR, VARCHAR)
Query parameters keyed by bracketed parameter name, e.g. {'expand[]': 'customer'}. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header. · default null
Returns columns
path VARCHAR
The requested API path.
object VARCHAR
Stripe's object type of the response (e.g. charge, list).
body JSON
The whole JSON response, credentials redacted.
Example

Your account's country and default currency from the raw account object

SELECT body->>'$.country' AS country,
  body->>'$.default_currency' AS currency
FROM stripe.api.get('/v1/account');
Link
balance 7 functions

Money movement endpoints of the Stripe API: the balance and its settings, balance transactions, payouts and top-ups, and currency reference data.

Schema examples (7)
Examples (7)

Key fields of the balance (/v1/balance)

SELECT livemode FROM stripe.balance.balance();

Key fields of the balance settings (/v1/balance_settings)

SELECT raw FROM stripe.balance.balance_settings();

Count balance transactions by status

SELECT status, count(*) AS n
FROM stripe.balance.balance_transactions()
GROUP BY status
ORDER BY n DESC, status;

The first ten country specs by id

SELECT id, default_currency
FROM stripe.balance.country_specs()
ORDER BY id
LIMIT 10;
3 more examples

The first ten exchange rates by id

SELECT id FROM stripe.balance.exchange_rates() ORDER BY id LIMIT 10;

Count payouts by status

SELECT status, count(*) AS n
FROM stripe.balance.payouts()
GROUP BY status
ORDER BY n DESC, status;

Count topups by status

SELECT status, count(*) AS n
FROM stripe.balance.topups()
GROUP BY status
ORDER BY n DESC, status;
Table functions
balance (params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves the current account balance, based on the authentication that was used to make the request. (GET /v1/balance)

Named arguments
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
available JSON
Available funds that you can transfer or pay out automatically by Stripe or explicitly through the Transfers API or Payouts API.
connect_reserved JSON
Funds held due to negative balances on connected accounts where account.controller.requirement_collection is application, which includes Custom accounts.
instant_available JSON
Funds that you can pay out using Instant Payouts.
issuing JSON
The issuing field of the balance object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
pending JSON
Funds that aren't available in the balance yet.
refund_and_dispute_prefunding JSON
The refund and dispute prefunding field of the balance object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the balance (/v1/balance)

SELECT livemode FROM stripe.balance.balance();
Link
balance_settings (params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves balance settings for a given connected account. (GET /v1/balance_settings)

Named arguments
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
payments JSON
The payments field of the balance_settings object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the balance settings (/v1/balance_settings)

SELECT raw FROM stripe.balance.balance_settings();
Link
balance_transactions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), payout := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). (GET /v1/balance_transactions)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
payout := VARCHAR
For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. (Stripe parameter payout) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Gross amount of this transaction (in cents (or local equivalent)). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
available_on TIMESTAMP WITH TIME ZONE
The date that the transaction's net funds become available in the Stripe balance.
balance_type VARCHAR
The balance that this transaction impacts. One of: issuing, payments, refund_and_dispute_prefunding, risk_reserved.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
exchange_rate DOUBLE
If applicable, this transaction uses an exchange rate.
fee BIGINT
Fees (in cents (or local equivalent)) paid for this transaction. (minor units)
fee_decimal DECIMAL(38,3)
Same amount in major units (exact).
fee_details JSON
Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
net BIGINT
Net impact to a Stripe balance (in cents (or local equivalent)). (minor units)
net_decimal DECIMAL(38,3)
Same amount in major units (exact).
reporting_category VARCHAR
Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
source VARCHAR
This transaction relates to the Stripe object.
status VARCHAR
The transaction's net funds status in the Stripe balance, which are either available or pending.
type VARCHAR
Transaction type: tax_fund, adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count balance transactions by status

SELECT status, count(*) AS n
FROM stripe.balance.balance_transactions()
GROUP BY status
ORDER BY n DESC, status;
Link
country_specs (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all Country Spec objects available in the API. (GET /v1/country_specs)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
default_currency VARCHAR
The default currency for this country.
supported_bank_account_currencies JSON
Currencies that can be accepted in the specific country (for transfers).
supported_payment_currencies VARCHAR[]
Currencies that can be accepted in the specified country (for payments).
supported_payment_methods VARCHAR[]
Payment methods available in the specified country.
supported_transfer_countries VARCHAR[]
Countries that can accept transfers from the specified country.
verification_fields JSON
The verification fields field of the country_spec object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten country specs by id

SELECT id, default_currency
FROM stripe.balance.country_specs()
ORDER BY id
LIMIT 10;
Link
exchange_rates (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

[Deprecated] The ExchangeRate APIs are deprecated. (GET /v1/exchange_rates)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
rates JSON
Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten exchange rates by id

SELECT id FROM stripe.balance.exchange_rates() ORDER BY id LIMIT 10;
Link
payouts (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. (GET /v1/payouts)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
application_fee VARCHAR
The application fee (if any) for the payout.
application_fee_amount BIGINT
The amount of the application fee (if any) requested for the payout. (minor units)
application_fee_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
arrival_date TIMESTAMP WITH TIME ZONE
Date that you can expect the payout to arrive in the bank.
automatic BOOLEAN
Returns true if the payout is created by an automated payout schedule and false if it's requested manually.
balance_transaction VARCHAR
ID of the balance transaction that describes the impact of this payout on your account balance.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
destination VARCHAR
ID of the bank account or card the payout is sent to.
failure_balance_transaction VARCHAR
If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed…
failure_code VARCHAR
Error code that provides a reason for a payout failure, if available.
failure_message VARCHAR
Message that provides the reason for a payout failure, if available.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
method VARCHAR
The method used to send this payout, which can be standard or instant.
original_payout VARCHAR
If the payout reverses another, this is the ID of the original payout.
payout_method VARCHAR
ID of the v2 FinancialAccount the funds are sent to.
reconciliation_status VARCHAR
If completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout. One of: completed, in_progress, not_applicable.
reversed_by VARCHAR
If the payout reverses, this is the ID of the payout that reverses this payout.
source_type VARCHAR
The source balance this payout came from, which can be one of the following: card, fpx, or bank_account.
statement_descriptor VARCHAR
Extra information about a payout that displays on the user's bank statement.
status VARCHAR
Current status of the payout: paid, pending, in_transit, canceled or failed.
trace_id JSON
A value that generates from the beneficiary's bank that allows users to track payouts with their bank.
type VARCHAR
Can be bank_account or card. One of: bank_account, card.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count payouts by status

SELECT status, count(*) AS n
FROM stripe.balance.payouts()
GROUP BY status
ORDER BY n DESC, status;
Link
topups (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of top-ups. (GET /v1/topups)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Amount transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
ID of the balance transaction that describes the impact of this top-up on your account balance.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
expected_availability_date BIGINT
Date the funds are expected to arrive in your Stripe account for payouts.
failure_code VARCHAR
Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
failure_message VARCHAR
Message to user further explaining reason for top-up failure if available.
initiated_by VARCHAR
Indicates whether the top-up was initiated by Stripe or by the user. One of: stripe, user.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_method VARCHAR
The ID of a PaymentMethod representing the payment method used for the top-up.
payment_method_options JSON
Payment-method-specific configuration for this top-up.
source JSON
The source field is deprecated.
statement_descriptor VARCHAR
Extra information about a top-up.
status VARCHAR
The status of the top-up is either canceled, failed, pending, reversed, or succeeded. One of: canceled, failed, pending, reversed, succeeded.
transfer_group VARCHAR
A string that identifies this top-up as part of a group.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count topups by status

SELECT status, count(*) AS n
FROM stripe.balance.topups()
GROUP BY status
ORDER BY n DESC, status;
Link
billing 45 functions

Every billing read endpoint of the Stripe API: customers and their sub-resources, invoices, credit notes, quotes, subscriptions, the product catalog, usage-based billing, entitlements and the portal.

Schema examples (10)
Examples (10)

Count alerts by status

SELECT status, count(*) AS n
FROM stripe.billing.alerts()
GROUP BY status
ORDER BY n DESC, status;

Count coupons by currency

SELECT currency, count(*) AS n
FROM stripe.billing.coupons()
GROUP BY currency
ORDER BY n DESC, currency;

Key fields of the credit balance summary (/v1/billing/credit_balance_summary)

SELECT customer_account, livemode
FROM stripe.billing.credit_balance_summary(filter_type := 'applicability_scope');

Count credit balance transactions by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_balance_transactions()
GROUP BY type
ORDER BY n DESC, type;
6 more examples

Count credit grants by category

SELECT category, count(*) AS n
FROM stripe.billing.credit_grants()
GROUP BY category
ORDER BY n DESC, category;

Count credit note lines by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_note_lines()
GROUP BY type
ORDER BY n DESC, type;

Key fields of the credit note preview (/v1/credit_notes/preview)

SELECT id, amount, amount_shipping, created
FROM stripe.billing.credit_note_preview(invoice := '…');

Count credit note preview lines by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_note_preview_lines(invoice := '…')
GROUP BY type
ORDER BY n DESC, type;

Count credit notes by status

SELECT status, count(*) AS n
FROM stripe.billing.credit_notes()
GROUP BY status
ORDER BY n DESC, status;

Count customer balance transactions by type

SELECT type, count(*) AS n
FROM stripe.billing.customer_balance_transactions()
GROUP BY type
ORDER BY n DESC, type;
Table functions
alerts (expand := VARCHAR[], meter := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists billing active and inactive alerts (GET /v1/billing/alerts)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
meter := VARCHAR
Filter results to only include alerts with the given meter. (Stripe parameter meter) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
alert_type VARCHAR
Defines the type of the alert. One of: usage_threshold.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
Status of the alert. One of: active, archived, inactive.
title VARCHAR
Title of the alert.
usage_threshold JSON
Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count alerts by status

SELECT status, count(*) AS n
FROM stripe.billing.alerts()
GROUP BY status
ORDER BY n DESC, status;
Link
coupons (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your coupons. (GET /v1/coupons)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount_off BIGINT
Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer. (minor units)
amount_off_decimal DECIMAL(38,3)
Same amount in major units (exact).
applies_to JSON
The applies to field of the coupon object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
currency_options JSON
Coupons defined in each available currency option.
duration VARCHAR
One of forever, once, or repeating. One of: forever, once, repeating.
duration_in_months BIGINT
If duration is repeating, the number of months the coupon applies.
livemode BOOLEAN
If the object exists in live mode, the value is true.
max_redemptions BIGINT
Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
Name of the coupon displayed to customers on for instance invoices or receipts.
percent_off DOUBLE
Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
redeem_by TIMESTAMP WITH TIME ZONE
Date after which the coupon can no longer be redeemed.
times_redeemed BIGINT
Number of times this coupon has been applied to a customer.
valid BOOLEAN
Taking account of the above properties, whether this coupon can still be applied to a customer.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count coupons by currency

SELECT currency, count(*) AS n
FROM stripe.billing.coupons()
GROUP BY currency
ORDER BY n DESC, currency;
Link
credit_balance_summary (customer := VARCHAR, customer_account := VARCHAR, filter_credit_grant := VARCHAR, filter_type := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves the credit balance summary for a customer. (GET /v1/billing/credit_balance_summary)

Named arguments
customer := VARCHAR
The customer whose credit balance summary you're retrieving. (Stripe parameter customer) · default null
customer_account := VARCHAR
The account representing the customer whose credit balance summary you're retrieving. (Stripe parameter customer_account) · default null
filter_credit_grant := VARCHAR
The filter criteria for the credit balance summary. (Stripe parameter filter[credit_grant]) · default null
filter_type := VARCHAR
The filter criteria for the credit balance summary. Required by Stripe. (Stripe parameter filter[type]) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
balances JSON
The billing credit balances.
customer VARCHAR
The customer the balance is for.
customer_account VARCHAR
The account the balance is for.
livemode BOOLEAN
If the object exists in live mode, the value is true.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the credit balance summary (/v1/billing/credit_balance_summary)

SELECT customer_account, livemode
FROM stripe.billing.credit_balance_summary(filter_type := 'applicability_scope');
Link
credit_balance_transactions (customer := VARCHAR, customer_account := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a list of credit balance transactions. (GET /v1/billing/credit_balance_transactions)

Named arguments
customer := VARCHAR
The customer whose credit balance transactions you're retrieving. (Stripe parameter customer) · default null
customer_account := VARCHAR
The account representing the customer whose credit balance transactions you're retrieving. (Stripe parameter customer_account) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
credit JSON
Credit details for this credit balance transaction.
credit_grant VARCHAR
The credit grant associated with this credit balance transaction.
debit JSON
Debit details for this credit balance transaction.
effective_at TIMESTAMP WITH TIME ZONE
The effective time of this credit balance transaction.
livemode BOOLEAN
If the object exists in live mode, the value is true.
test_clock VARCHAR
ID of the test clock this credit balance transaction belongs to.
type VARCHAR
The type of credit balance transaction (credit or debit). One of: credit, debit.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit balance transactions by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_balance_transactions()
GROUP BY type
ORDER BY n DESC, type;
Link
credit_grants (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a list of credit grants. (GET /v1/billing/credit_grants)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount JSON
The amount field of the billing.credit_grant object.
applicability_config JSON
The applicability config field of the billing.credit_grant object.
category VARCHAR
The category of this credit grant. One of: paid, promotional.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer VARCHAR
ID of the customer receiving the billing credits.
customer_account VARCHAR
ID of the account representing the customer receiving the billing credits
effective_at TIMESTAMP WITH TIME ZONE
The time when the billing credits become effective-when they're eligible for use.
expires_at TIMESTAMP WITH TIME ZONE
The time when the billing credits expire.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
A descriptive name shown in dashboard.
priority BIGINT
The priority for applying this credit grant.
test_clock VARCHAR
ID of the test clock this credit grant belongs to.
updated TIMESTAMP WITH TIME ZONE
Time at which the object was last updated.
voided_at TIMESTAMP WITH TIME ZONE
The time when this credit grant was voided.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit grants by category

SELECT category, count(*) AS n
FROM stripe.billing.credit_grants()
GROUP BY category
ORDER BY n DESC, category;
Link
credit_note_lines (credit_note_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

When retrieving a credit note, you’ll get a lines property containing the first handful of those items. (GET /v1/credit_notes/{credit_note}/lines)

Named arguments
credit_note_id := VARCHAR
Read only this parent's rows (credit_note id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
credit_note VARCHAR
Parent credit note id this row belongs to.
amount BIGINT
The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
description VARCHAR
Description of the item being credited.
discount_amount BIGINT
The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
discount_amounts JSON
The amount of discount calculated per discount for this line item
invoice_line_item VARCHAR
ID of the invoice line item being credited
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
pretax_credit_amounts JSON
The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
quantity BIGINT
The number of units of product being credited.
tax_rates JSON
The tax rates which apply to the line item.
taxes JSON
The tax information of the line item.
type VARCHAR
The type of the credit note line item, one of invoice_line_item or custom_line_item. One of: custom_line_item, invoice_line_item.
unit_amount BIGINT
The cost of each unit of product being credited.
unit_amount_decimal VARCHAR
Same as unit_amount, but contains a decimal value with at most 12 decimal places.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit note lines by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_note_lines()
GROUP BY type
ORDER BY n DESC, type;
Link
credit_note_preview (amount := BIGINT, credit_amount := BIGINT, effective_at := TIMESTAMP WITH TIME ZONE, email_type := VARCHAR, invoice := VARCHAR, memo := VARCHAR, out_of_band_amount := BIGINT, params := MAP(VARCHAR, VARCHAR), reason := VARCHAR, refund_amount := BIGINT, shipping_cost_shipping_rate := VARCHAR, stripe_account := VARCHAR) 1 example

Get a preview of a credit note without creating it. (GET /v1/credit_notes/preview)

Named arguments
amount := BIGINT
The whole number amount in cents (or local equivalent) representing the total amount of the credit note. (Stripe parameter amount) · default null
credit_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. (Stripe parameter credit_amount) · default null
effective_at := TIMESTAMP WITH TIME ZONE
The date when this credit note is in effect. (Stripe parameter effective_at) · default null
email_type := VARCHAR
Type of email to send to the customer, one of credit_note or none and the default is credit_note. (Stripe parameter email_type) · default null
invoice := VARCHAR
ID of the invoice. Required by Stripe. (Stripe parameter invoice) · default null
memo := VARCHAR
The credit note's memo appears on the credit note PDF. (Stripe parameter memo) · default null
out_of_band_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. (Stripe parameter out_of_band_amount) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
reason := VARCHAR
Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory (Stripe parameter reason) · default null
refund_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount to refund. (Stripe parameter refund_amount) · default null
shipping_cost_shipping_rate := VARCHAR
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. (Stripe parameter shipping_cost[shipping_rate]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The integer amount in cents (or local… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_shipping BIGINT
This is the sum of all the shipping… (minor units)
amount_shipping_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
ID of the customer.
customer_account VARCHAR
ID of the account representing the…
customer_balance_transaction VARCHAR
Customer balance transaction related…
discount_amount BIGINT
The integer amount in cents (or local…
discount_amounts JSON
The aggregate amounts calculated per…
effective_at TIMESTAMP WITH TIME ZONE
The date when this credit note is in…
invoice VARCHAR
ID of the invoice.
lines JSON
Line items that make up the credit note
livemode BOOLEAN
If the object exists in live mode, the…
memo VARCHAR
Customer-facing text that appears on…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
number VARCHAR
A unique number that identifies this…
out_of_band_amount BIGINT
Amount that was credited outside of… (minor units)
out_of_band_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
pdf VARCHAR
The link to download the PDF of the…
post_payment_amount BIGINT
The amount of the credit note that was… (minor units)
post_payment_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
pre_payment_amount BIGINT
The amount of the credit note by which… (minor units)
pre_payment_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
reason VARCHAR
Reason for issuing this credit note…
status VARCHAR
Status of this credit note, one of…
subtotal BIGINT
The integer amount in cents (or local… (minor units)
subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
subtotal_excluding_tax BIGINT
The integer amount in cents (or local… (minor units)
subtotal_excluding_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
total BIGINT
The integer amount in cents (or local… (minor units)
total_decimal DECIMAL(38,3)
Same amount in major units (exact).
total_excluding_tax BIGINT
The integer amount in cents (or local… (minor units)
total_excluding_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
type VARCHAR
Type of this credit note, one of…
voided_at TIMESTAMP WITH TIME ZONE
The time that the credit note was…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the credit note preview (/v1/credit_notes/preview)

SELECT id, amount, amount_shipping, created
FROM stripe.billing.credit_note_preview(invoice := '…');
Link
credit_note_preview_lines (amount := BIGINT, credit_amount := BIGINT, effective_at := TIMESTAMP WITH TIME ZONE, email_type := VARCHAR, expand := VARCHAR[], invoice := VARCHAR, memo := VARCHAR, out_of_band_amount := BIGINT, params := MAP(VARCHAR, VARCHAR), reason := VARCHAR, refund_amount := BIGINT, shipping_cost_shipping_rate := VARCHAR, stripe_account := VARCHAR) 1 example

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. (GET /v1/credit_notes/preview/lines)

Named arguments
amount := BIGINT
The whole number amount in cents (or local equivalent) representing the total amount of the credit note. (Stripe parameter amount) · default null
credit_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. (Stripe parameter credit_amount) · default null
effective_at := TIMESTAMP WITH TIME ZONE
The date when this credit note is in effect. (Stripe parameter effective_at) · default null
email_type := VARCHAR
Type of email to send to the customer, one of credit_note or none and the default is credit_note. (Stripe parameter email_type) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
invoice := VARCHAR
ID of the invoice. Required by Stripe. (Stripe parameter invoice) · default null
memo := VARCHAR
The credit note's memo appears on the credit note PDF. (Stripe parameter memo) · default null
out_of_band_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. (Stripe parameter out_of_band_amount) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
reason := VARCHAR
Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory (Stripe parameter reason) · default null
refund_amount := BIGINT
The whole number amount in cents (or local equivalent) representing the amount to refund. (Stripe parameter refund_amount) · default null
shipping_cost_shipping_rate := VARCHAR
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. (Stripe parameter shipping_cost[shipping_rate]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
description VARCHAR
Description of the item being credited.
discount_amount BIGINT
The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
discount_amounts JSON
The amount of discount calculated per discount for this line item
invoice_line_item VARCHAR
ID of the invoice line item being credited
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
pretax_credit_amounts JSON
The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
quantity BIGINT
The number of units of product being credited.
tax_rates JSON
The tax rates which apply to the line item.
taxes JSON
The tax information of the line item.
type VARCHAR
The type of the credit note line item, one of invoice_line_item or custom_line_item. One of: custom_line_item, invoice_line_item.
unit_amount BIGINT
The cost of each unit of product being credited.
unit_amount_decimal VARCHAR
Same as unit_amount, but contains a decimal value with at most 12 decimal places.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit note preview lines by type

SELECT type, count(*) AS n
FROM stripe.billing.credit_note_preview_lines(invoice := '…')
GROUP BY type
ORDER BY n DESC, type;
Link
credit_notes (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of credit notes. (GET /v1/credit_notes)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The integer amount in cents (or local… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_shipping BIGINT
This is the sum of all the shipping… (minor units)
amount_shipping_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
ID of the customer.
customer_account VARCHAR
ID of the account representing the…
customer_balance_transaction VARCHAR
Customer balance transaction related…
discount_amount BIGINT
The integer amount in cents (or local…
discount_amounts JSON
The aggregate amounts calculated per…
effective_at TIMESTAMP WITH TIME ZONE
The date when this credit note is in…
invoice VARCHAR
ID of the invoice.
lines JSON
Line items that make up the credit note
livemode BOOLEAN
If the object exists in live mode, the…
memo VARCHAR
Customer-facing text that appears on…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
number VARCHAR
A unique number that identifies this…
out_of_band_amount BIGINT
Amount that was credited outside of… (minor units)
out_of_band_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
pdf VARCHAR
The link to download the PDF of the…
post_payment_amount BIGINT
The amount of the credit note that was… (minor units)
post_payment_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
pre_payment_amount BIGINT
The amount of the credit note by which… (minor units)
pre_payment_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
reason VARCHAR
Reason for issuing this credit note…
status VARCHAR
Status of this credit note, one of…
subtotal BIGINT
The integer amount in cents (or local… (minor units)
subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
subtotal_excluding_tax BIGINT
The integer amount in cents (or local… (minor units)
subtotal_excluding_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
total BIGINT
The integer amount in cents (or local… (minor units)
total_decimal DECIMAL(38,3)
Same amount in major units (exact).
total_excluding_tax BIGINT
The integer amount in cents (or local… (minor units)
total_excluding_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
type VARCHAR
Type of this credit note, one of…
voided_at TIMESTAMP WITH TIME ZONE
The time that the credit note was…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit notes by status

SELECT status, count(*) AS n
FROM stripe.billing.credit_notes()
GROUP BY status
ORDER BY n DESC, status;
Link
customer_balance_transactions (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of transactions that updated the customer’s balances . (GET /v1/customers/{customer}/balance_transactions)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
amount BIGINT
The amount of the transaction. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
checkout_session VARCHAR
The ID of the checkout session (if any) that created the transaction.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
credit_note VARCHAR
The ID of the credit note (if any) related to the transaction.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer_account VARCHAR
The ID of an Account representing a customer that the transaction belongs to.
description VARCHAR
An arbitrary string attached to the object.
ending_balance BIGINT
The customer's balance after the transaction was applied. (minor units)
ending_balance_decimal DECIMAL(38,3)
Same amount in major units (exact).
invoice VARCHAR
The ID of the invoice (if any) related to the transaction.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
type VARCHAR
Transaction type: adjustment, applied_to_invoice, credit_note, initial, invoice_overpaid, invoice_too_large, invoice_too_small, unspent_receiver_credit…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer balance transactions by type

SELECT type, count(*) AS n
FROM stripe.billing.customer_balance_transactions()
GROUP BY type
ORDER BY n DESC, type;
Link
customer_bank_accounts (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

You can see a list of the bank accounts belonging to a Customer. (GET /v1/customers/{customer}/bank_accounts)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
account VARCHAR
The account this bank account belongs to.
account_holder_name VARCHAR
The name of the person or business that owns the bank account.
account_holder_type VARCHAR
The type of entity that holds the account.
account_type VARCHAR
The bank account type.
available_payout_methods VARCHAR[]
A set of available payout methods for this bank account.
bank_name VARCHAR
Name of the bank associated with the routing number (e.g., WELLS FARGO).
country VARCHAR
Two-letter ISO code representing the country the bank account is located in.
currency VARCHAR
Three-letter ISO code for the currency paid out to the bank account.
default_for_currency BOOLEAN
Whether this bank account is the default external account for its currency.
fingerprint VARCHAR
Uniquely identifies this particular bank account.
future_requirements JSON
Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.
last4 VARCHAR
The last four digits of the bank account number.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
requirements JSON
Information about the requirements for the bank account, including what information needs to be collected.
routing_number VARCHAR
The routing transit number for the bank account.
status VARCHAR
For bank accounts, possible values are new, validated, verified, verification_failed, tokenized_account_number_deactivated or errored.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer bank accounts by status

SELECT status, count(*) AS n
FROM stripe.billing.customer_bank_accounts()
GROUP BY status
ORDER BY n DESC, status;
Link
customer_cards (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

You can see a list of the cards belonging to a customer. (GET /v1/customers/{customer}/cards)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
account VARCHAR
The account field of the card object.
address_city VARCHAR
City/District/Suburb/Town/Village.
address_country VARCHAR
Billing address country, if provided when creating card.
address_line1 VARCHAR
Address line 1 (Street address/PO Box/Company name).
address_line1_check VARCHAR
If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.
address_line2 VARCHAR
Address line 2 (Apartment/Suite/Unit/Building).
address_state VARCHAR
State/County/Province/Region.
address_zip VARCHAR
ZIP or postal code.
address_zip_check VARCHAR
If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.
allow_redisplay VARCHAR
This field indicates whether this payment method can be shown again to its customer in a checkout flow. One of: always, limited, unspecified.
available_payout_methods VARCHAR[]
A set of available payout methods for this card.
brand VARCHAR
Card brand.
country VARCHAR
Two-letter ISO code representing the country of the card.
currency VARCHAR
Three-letter ISO code for currency in lowercase.
cvc_check VARCHAR
If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked.
default_for_currency BOOLEAN
Whether this card is the default external account for its currency.
dynamic_last4 VARCHAR
(For tokenized numbers only.) The last four digits of the device account number.
exp_month BIGINT
Two-digit number representing the card's expiration month.
exp_year BIGINT
Four-digit number representing the card's expiration year.
fingerprint VARCHAR
Uniquely identifies this particular card number.
funding VARCHAR
Card funding type.
last4 VARCHAR
The last four digits of the card.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
Cardholder name.
networks STRUCT("preferred" VARCHAR)
The networks field of the card object.
regulated_status VARCHAR
Status of a card based on the card issuer. One of: regulated, unregulated.
status VARCHAR
For external accounts that are cards, possible values are new and errored.
tokenization_method VARCHAR
If the card number is tokenized, this is the method that was used.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer cards by status

SELECT status, count(*) AS n
FROM stripe.billing.customer_cards()
GROUP BY status
ORDER BY n DESC, status;
Link
customer_cash_balance_transactions (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of transactions that modified the customer’s cash balance . (GET /v1/customers/{customer}/cash_balance_transactions)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
adjusted_for_overdraft JSON
The adjusted for overdraft field of the customer_cash_balance_transaction object.
applied_to_payment JSON
The applied to payment field of the customer_cash_balance_transaction object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer_account VARCHAR
The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.
ending_balance BIGINT
The total available cash balance for the specified currency after this transaction was applied. (minor units)
ending_balance_decimal DECIMAL(38,3)
Same amount in major units (exact).
funded JSON
The funded field of the customer_cash_balance_transaction object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
net_amount BIGINT
The amount by which the cash balance changed, represented in the smallest currency unit. (minor units)
net_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
refunded_from_payment JSON
The refunded from payment field of the customer_cash_balance_transaction object.
transferred_to_balance JSON
The transferred to balance field of the customer_cash_balance_transaction object.
type VARCHAR
The type of the cash balance transaction.
unapplied_from_payment JSON
The unapplied from payment field of the customer_cash_balance_transaction object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer cash balance transactions by type

SELECT type, count(*) AS n
FROM stripe.billing.customer_cash_balance_transactions()
GROUP BY type
ORDER BY n DESC, type;
Link
customer_cash_balances (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves a customer’s cash balance. (GET /v1/customers/{customer}/cash_balance)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
customer VARCHAR
Parent customer id this row belongs to.
available JSON
A hash of all cash balances available to this customer.
customer_account VARCHAR
The ID of an Account representing a customer whose cash balance this object represents.
livemode BOOLEAN
If the object exists in live mode, the value is true.
settings STRUCT of 2 fields
The settings field of the cash_balance object.
STRUCT 2 fields
  • reconciliation_modeVARCHAR
  • using_merchant_defaultBOOLEAN
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the customer cash balances (/v1/customers/{customer}/cash_balance)

SELECT customer, customer_account, livemode
FROM stripe.billing.customer_cash_balances();
Link
customer_discounts (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Rows of discount (GET /v1/customers/{customer}/discount)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
The ID of the discount object.
customer VARCHAR
Parent customer id this row belongs to.
checkout_session VARCHAR
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.
customer_account VARCHAR
The ID of the account representing the customer associated with this discount.
end TIMESTAMP WITH TIME ZONE
If the coupon has a duration of repeating, the date that this discount will end.
invoice VARCHAR
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
invoice_item VARCHAR
The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied…
promotion_code VARCHAR
The promotion code applied to create this discount.
source JSON
The source field of the discount object.
start TIMESTAMP WITH TIME ZONE
Date that the coupon was applied.
subscription VARCHAR
The subscription that this coupon is applied to, if it is applied to a particular subscription.
subscription_item VARCHAR
The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the customer discounts (/v1/customers/{customer}/discount)

SELECT id, customer, checkout_session, customer_account
FROM stripe.billing.customer_discounts();
Link
customer_payment_methods (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of PaymentMethods for a given Customer (GET /v1/customers/{customer}/payment_methods)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
acss_debit STRUCT of 5 fields
The acss debit field of the…
STRUCT 5 fields
  • bank_nameVARCHAR
  • fingerprintVARCHAR
  • institution_numberVARCHAR
  • last4VARCHAR
  • transit_numberVARCHAR
affirm JSON
The affirm field of the payment_method…
afterpay_clearpay JSON
The afterpay clearpay field of the…
alipay JSON
The alipay field of the payment_method…
allow_redisplay VARCHAR
This field indicates whether this…
alma JSON
The alma field of the payment_method…
amazon_pay JSON
The amazon pay field of the…
au_becs_debit STRUCT of 3 fields
The au becs debit field of the…
STRUCT 3 fields
  • bsb_numberVARCHAR
  • fingerprintVARCHAR
  • last4VARCHAR
bacs_debit STRUCT of 3 fields
The bacs debit field of the…
STRUCT 3 fields
  • fingerprintVARCHAR
  • last4VARCHAR
  • sort_codeVARCHAR
bancontact JSON
The bancontact field of the…
billie JSON
The billie field of the payment_method…
billing_details JSON
The billing details field of the…
bizum STRUCT("buyer_id" VARCHAR)
The bizum field of the payment_method…
blik STRUCT("buyer_id" VARCHAR)
The blik field of the payment_method…
boleto STRUCT("tax_id" VARCHAR)
The boleto field of the payment_method…
card JSON
The card field of the payment_method…
card_present JSON
The card present field of the…
cashapp STRUCT("buyer_id" VARCHAR, "cashtag" VARCHAR)
The cashapp field of the…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
crypto JSON
The crypto field of the payment_method…
custom JSON
The custom field of the payment_method…
customer_account VARCHAR
The customer account field of the…
customer_balance JSON
The customer balance field of the…
eps STRUCT("bank" VARCHAR)
The eps field of the payment_method…
fpx STRUCT("bank" VARCHAR)
The fpx field of the payment_method…
giropay JSON
The giropay field of the…
grabpay JSON
The grabpay field of the…
ideal STRUCT("bank" VARCHAR, "bic" VARCHAR)
The ideal field of the payment_method…
interac_present JSON
The interac present field of the…
kakao_pay JSON
The kakao pay field of the…
klarna JSON
The klarna field of the payment_method…
konbini JSON
The konbini field of the…
kr_card STRUCT("brand" VARCHAR, "last4" VARCHAR)
The kr card field of the…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
type VARCHAR
The type of the PaymentMethod. One of…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer payment methods by type

SELECT type, count(*) AS n
FROM stripe.billing.customer_payment_methods()
GROUP BY type
ORDER BY n DESC, type;
Link
customer_sources (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List sources for a specified customer. (GET /v1/customers/{customer}/sources)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
object VARCHAR
Object type of this row (the list mixes several types).
currency VARCHAR
Three-letter ISO code for the currency paid out to the bank account.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
status VARCHAR
For bank accounts, possible values are new, validated, verified, verification_failed, tokenized_account_number_deactivated or errored.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer sources by status

SELECT status, count(*) AS n
FROM stripe.billing.customer_sources()
GROUP BY status
ORDER BY n DESC, status;
Link
customer_subscriptions (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

You can see a list of the customer’s active subscriptions. (GET /v1/customers/{customer}/subscriptions)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
application VARCHAR
ID of the Connect Application that…
application_fee_percent DOUBLE
A non-negative decimal between 0 and…
automatic_tax JSON
The automatic tax field of the…
billing_cycle_anchor TIMESTAMP WITH TIME ZONE
The reference point that aligns future…
billing_cycle_anchor_config JSON
The fixed values used to calculate the…
billing_mode JSON
The billing mode of the subscription.
billing_schedules JSON
Billing schedules for this subscription.
billing_thresholds JSON
Define thresholds at which an invoice…
cancel_at TIMESTAMP WITH TIME ZONE
A date in the future at which the…
cancel_at_period_end BOOLEAN
Whether this subscription will (if…
canceled_at TIMESTAMP WITH TIME ZONE
If the subscription has been canceled…
cancellation_details JSON
Details about why this subscription…
collection_method VARCHAR
Either charge_automatically, or…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer_account VARCHAR
ID of the account representing the…
days_until_due BIGINT
Number of days a customer has to pay…
default_payment_method VARCHAR
ID of the default payment method for…
default_source VARCHAR
ID of the default payment source for…
default_tax_rates JSON
The tax rates that will apply to any…
description VARCHAR
The subscription's description, meant…
discounts JSON
The discounts applied to the…
ended_at TIMESTAMP WITH TIME ZONE
If the subscription has ended, the…
invoice_settings JSON
The invoice settings field of the…
latest_invoice VARCHAR
The most recent invoice this…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
next_pending_invoice_item_invoice TIMESTAMP WITH TIME ZONE
Specifies the approximate timestamp on…
on_behalf_of VARCHAR
The account (if any) the charge was…
pending_setup_intent VARCHAR
You can use this SetupIntent to…
schedule VARCHAR
The schedule attached to the…
start_date TIMESTAMP WITH TIME ZONE
Date when the subscription was first…
status VARCHAR
Possible values are incomplete…
test_clock VARCHAR
ID of the test clock this subscription…
trial_end TIMESTAMP WITH TIME ZONE
If the subscription has a trial, the…
trial_start TIMESTAMP WITH TIME ZONE
If the subscription has a trial, the…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer subscriptions by status

SELECT status, count(*) AS n
FROM stripe.billing.customer_subscriptions()
GROUP BY status
ORDER BY n DESC, status;
Link
customer_tax_ids (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of tax IDs for a customer. (GET /v1/customers/{customer}/tax_ids)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
country VARCHAR
Two-letter ISO code representing the country of the tax ID.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer_account VARCHAR
ID of the Account representing the customer.
livemode BOOLEAN
If the object exists in live mode, the value is true.
owner JSON
The account or customer the tax ID belongs to.
type VARCHAR
Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat…
value VARCHAR
Value of the tax ID.
verification JSON
Tax ID verification information.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customer tax ids by type

SELECT type, count(*) AS n
FROM stripe.billing.customer_tax_ids()
GROUP BY type
ORDER BY n DESC, type;
Link
customers (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), search := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of your customers. (GET /v1/customers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
address JSON
The customer's billing address.
balance BIGINT
The current balance, if any, that's stored on the customer in their default currency. (minor units)
balance_decimal DECIMAL(38,3)
Same amount in major units (exact).
business_name VARCHAR
The customer's business name.
cash_balance JSON
The current funds being held by Stripe on behalf of the customer.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
customer_account VARCHAR
The ID of an Account representing a customer.
default_source VARCHAR
ID of the default payment source for the customer.
delinquent BOOLEAN
Tracks the most recent state change on any invoice belonging to the customer.
description VARCHAR
An arbitrary string attached to the object.
discount JSON
Describes the current discount active on the customer, if there is one.
email VARCHAR
The customer's email address.
individual_name VARCHAR
The customer's individual name.
invoice_credit_balance JSON
The current multi-currency balances, if any, that's stored on the customer.
invoice_prefix VARCHAR
The prefix for the customer used to generate unique invoice numbers.
invoice_settings JSON
The invoice settings field of the customer object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The customer's full name or business name.
next_invoice_sequence BIGINT
The suffix of the customer's next invoice number (for example, 0001).
phone VARCHAR
The customer's phone number.
preferred_locales VARCHAR[]
The customer's preferred locales (languages), ordered by preference.
shipping JSON
Mailing and shipping address for the customer.
sources JSON
The customer's payment sources, if any.
subscriptions JSON
The customer's current subscriptions, if any.
tax JSON
The tax field of the customer object.
tax_exempt VARCHAR
Describes the customer's tax exemption status, which is none, exempt, or reverse. One of: exempt, none, reverse.
tax_ids JSON
The customer's tax IDs.
test_clock VARCHAR
ID of the test clock that this customer belongs to.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count customers by currency

SELECT currency, count(*) AS n
FROM stripe.billing.customers()
GROUP BY currency
ORDER BY n DESC, currency;
Link
entitlement_active_entitlements (customer_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a list of active entitlements for a customer (GET /v1/entitlements/active_entitlements)

Named arguments
customer_id := VARCHAR
Read only this parent's rows (customer id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer VARCHAR
Parent customer id this row belongs to.
feature VARCHAR
The Feature that the customer is entitled to.
livemode BOOLEAN
If the object exists in live mode, the value is true.
lookup_key VARCHAR
A unique key you provide as your own system identifier.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten entitlement active entitlements by id

SELECT id, customer, feature
FROM stripe.billing.entitlement_active_entitlements()
ORDER BY id
LIMIT 10;
Link
entitlement_features (archived := BOOLEAN, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a list of features (GET /v1/entitlements/features)

Named arguments
archived := BOOLEAN
If set, filter results to only include features with the given archive status. (Stripe parameter archived) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
livemode BOOLEAN
If the object exists in live mode, the value is true.
lookup_key VARCHAR
A unique key you provide as your own system identifier.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The feature's name, for your own purpose, not meant to be displayable to the customer.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten entitlement features by id

SELECT id, lookup_key, name
FROM stripe.billing.entitlement_features()
ORDER BY id
LIMIT 10;
Link
feedback_options (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your feedback options. (GET /v1/billing/feedback_options)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
description VARCHAR
An arbitrary string attached to the object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
The feedback option's status. One of: active, inactive.
status_transitions STRUCT("deactivated_at" TIMESTAMP WITH TIME ZONE)
The status transitions field of the billing.feedback_option object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count feedback options by status

SELECT status, count(*) AS n
FROM stripe.billing.feedback_options()
GROUP BY status
ORDER BY n DESC, status;
Link
invoice_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), pending := BOOLEAN, stripe_account := VARCHAR) 1 example

Returns a list of your invoice items. (GET /v1/invoiceitems)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
pending := BOOLEAN
Set to true to only show pending invoice items, which are not yet attached to any invoices. (Stripe parameter pending) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Amount (in the currency specified) of the invoice item. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
The ID of the customer to bill for this invoice item.
customer_account VARCHAR
The ID of the account to bill for this invoice item.
date TIMESTAMP WITH TIME ZONE
Time at which the object was created.
description VARCHAR
An arbitrary string attached to the object.
discountable BOOLEAN
If true, discounts will apply to this invoice item.
discounts JSON
The discounts which apply to the invoice item.
frozen_fields VARCHAR[]
Array of field names that can't be modified.
invoice VARCHAR
The ID of the invoice this invoice item belongs to.
invoicing_rules JSON
The rules that control when this invoice item is eligible for invoicing.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
net_amount BIGINT
The amount after discounts, but before credits and taxes. (minor units)
net_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
parent JSON
The parent that generated this invoice item.
period STRUCT of 2 fields
The period field of the invoiceitem object.
STRUCT 2 fields
  • endTIMESTAMP WITH TIME ZONE
  • startTIMESTAMP WITH TIME ZONE
pricing JSON
The pricing information of the invoice item.
proration BOOLEAN
Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
proration_details JSON
The proration details field of the invoiceitem object.
quantity BIGINT
Quantity of units for the invoice item in integer format, with any decimal precision truncated.
quantity_decimal VARCHAR
Non-negative decimal with at most 12 decimal places.
tax_rates JSON
The tax rates which apply to the invoice item.
test_clock VARCHAR
ID of the test clock this invoice item belongs to.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count invoice items by currency

SELECT currency, count(*) AS n
FROM stripe.billing.invoice_items()
GROUP BY currency
ORDER BY n DESC, currency;
Link
invoice_lines (expand := VARCHAR[], invoice_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. (GET /v1/invoices/{invoice}/lines)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
invoice_id := VARCHAR
Read only this parent's rows (invoice id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
invoice VARCHAR
Parent invoice id this row belongs to.
amount BIGINT
The amount, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
discount_amounts JSON
The amount of discount calculated per discount for this line item.
discountable BOOLEAN
If true, discounts will apply to this line item.
discounts JSON
The discounts applied to the invoice line item.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
parent JSON
The parent that generated this line item.
period STRUCT of 2 fields
The period field of the line_item object.
STRUCT 2 fields
  • endTIMESTAMP WITH TIME ZONE
  • startTIMESTAMP WITH TIME ZONE
pretax_credit_amounts JSON
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
pricing JSON
The pricing information of the line item.
quantity BIGINT
Quantity of units for the invoice line item in integer format, with any decimal precision truncated.
quantity_decimal VARCHAR
Non-negative decimal with at most 12 decimal places.
subscription VARCHAR
The subscription field of the line_item object.
subtotal BIGINT
The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes. (minor units)
subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
taxes JSON
The tax information of the line item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count invoice lines by currency

SELECT currency, count(*) AS n
FROM stripe.billing.invoice_lines()
GROUP BY currency
ORDER BY n DESC, currency;
Link
invoice_payments (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), payment_payment_intent := VARCHAR, payment_payment_record := VARCHAR, payment_type := VARCHAR, stripe_account := VARCHAR) 1 example

When retrieving an invoice, there is an includable payments property containing the first handful of those items. (GET /v1/invoice_payments)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
payment_payment_intent := VARCHAR
The payment details of the invoice payments to return. (Stripe parameter payment[payment_intent]) · default null
payment_payment_record := VARCHAR
The payment details of the invoice payments to return. (Stripe parameter payment[payment_record]) · default null
payment_type := VARCHAR
The payment details of the invoice payments to return. (Stripe parameter payment[type]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount_paid BIGINT
Amount that was actually paid for this invoice, in cents (or local equivalent). (minor units)
amount_paid_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_requested BIGINT
Amount intended to be paid toward this invoice, in cents (or local equivalent) (minor units)
amount_requested_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
invoice VARCHAR
The invoice that was paid.
is_default BOOLEAN
Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s amount_remaining.
livemode BOOLEAN
If the object exists in live mode, the value is true.
payment JSON
The payment field of the invoice_payment object.
status VARCHAR
The status of the payment, one of open, paid, or canceled.
status_transitions STRUCT of 2 fields
The status transitions field of the invoice_payment object.
STRUCT 2 fields
  • canceled_atTIMESTAMP WITH TIME ZONE
  • paid_atTIMESTAMP WITH TIME ZONE
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count invoice payments by status

SELECT status, count(*) AS n
FROM stripe.billing.invoice_payments()
GROUP BY status
ORDER BY n DESC, status;
Link
invoice_rendering_templates (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List all templates, ordered by creation date, with the most recently created template appearing first. (GET /v1/invoice_rendering_templates)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
nickname VARCHAR
A brief description of the template, hidden from customers
status VARCHAR
The status of the template, one of active or archived. One of: active, archived.
version BIGINT
Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count invoice rendering templates by status

SELECT status, count(*) AS n
FROM stripe.billing.invoice_rendering_templates()
GROUP BY status
ORDER BY n DESC, status;
Link
invoices (collection_method := VARCHAR, customer_account := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), search := VARCHAR, stripe_account := VARCHAR, subscription := VARCHAR) 1 example

You can list all invoices, or list the invoices for a specific customer. (GET /v1/invoices)

Named arguments
collection_method := VARCHAR
The collection method of the invoice to retrieve. (Stripe parameter collection_method) · default null
customer_account := VARCHAR
Only return invoices for the account representing the customer specified by this account ID. (Stripe parameter customer_account) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
subscription := VARCHAR
Only return invoices for the subscription specified by this subscription ID. (Stripe parameter subscription) · default null
Returns columns
id VARCHAR
Unique identifier for…
amount_due BIGINT
Final amount due at… (minor units)
amount_due_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_overpaid BIGINT
Amount that was… (minor units)
amount_overpaid_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_paid BIGINT
The amount, in cents… (minor units)
amount_paid_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_paid_off_stripe BIGINT
Amount, in cents (or… (minor units)
amount_paid_off_stripe_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_remaining BIGINT
The difference between… (minor units)
amount_remaining_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_shipping BIGINT
This is the sum of all… (minor units)
amount_shipping_decimal DECIMAL(38,3)
Same amount in major units (exact).
automatically_finalizes_at TIMESTAMP WITH TIME ZONE
The time when this…
created TIMESTAMP WITH TIME ZONE
Time at which the…
currency VARCHAR
Three-letter ISO…
customer VARCHAR
The ID of the customer…
due_date TIMESTAMP WITH TIME ZONE
The date on which…
effective_at TIMESTAMP WITH TIME ZONE
The date when this…
ending_balance BIGINT
Ending customer… (minor units)
ending_balance_decimal DECIMAL(38,3)
Same amount in major units (exact).
livemode BOOLEAN
If the object exists…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs…
next_payment_attempt TIMESTAMP WITH TIME ZONE
The time at which…
period_end TIMESTAMP WITH TIME ZONE
The latest timestamp…
period_start TIMESTAMP WITH TIME ZONE
The earliest timestamp…
post_payment_credit_notes_amount BIGINT
Total amount of all… (minor units)
post_payment_credit_notes_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
pre_payment_credit_notes_amount BIGINT
Total amount of all… (minor units)
pre_payment_credit_notes_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
starting_balance BIGINT
Starting customer… (minor units)
starting_balance_decimal DECIMAL(38,3)
Same amount in major units (exact).
status VARCHAR
The status of the…
subtotal BIGINT
Total of all… (minor units)
subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
subtotal_excluding_tax BIGINT
The integer amount in… (minor units)
subtotal_excluding_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
total BIGINT
Total after discounts… (minor units)
total_decimal DECIMAL(38,3)
Same amount in major units (exact).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count invoices by status

SELECT status, count(*) AS n
FROM stripe.billing.invoices()
GROUP BY status
ORDER BY n DESC, status;
Link
meter_event_summaries (customer := VARCHAR, end_time := TIMESTAMP WITH TIME ZONE, expand := VARCHAR[], meter_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), start_time := TIMESTAMP WITH TIME ZONE, stripe_account := VARCHAR, value_grouping_window := VARCHAR) 1 example

Retrieve a list of billing meter event summaries. (GET /v1/billing/meters/{id}/event_summaries)

Named arguments
customer := VARCHAR
The customer for which to fetch event summaries. Required by Stripe. (Stripe parameter customer) · default null
end_time := TIMESTAMP WITH TIME ZONE
The time from when to stop aggregating meter events (exclusive). Required by Stripe. (Stripe parameter end_time) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
meter_id := VARCHAR
Read only this parent's rows (meter id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
start_time := TIMESTAMP WITH TIME ZONE
The time from when to start aggregating meter events (inclusive). Required by Stripe. (Stripe parameter start_time) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
value_grouping_window := VARCHAR
Specifies what granularity to use when generating event summaries. (Stripe parameter value_grouping_window) · default null
Returns columns
id VARCHAR
Unique identifier for the object.
meter VARCHAR
Parent meter id this row belongs to.
aggregated_value DOUBLE
Aggregated value of all the events within start_time (inclusive) and end_time (inclusive).
end_time TIMESTAMP WITH TIME ZONE
End timestamp for this event summary (exclusive).
livemode BOOLEAN
If the object exists in live mode, the value is true.
start_time TIMESTAMP WITH TIME ZONE
Start timestamp for this event summary (inclusive).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten meter event summaries by id

SELECT id, meter, end_time
FROM stripe.billing.meter_event_summaries(customer := '…', end_time := TIMESTAMPTZ '2026-11-01', start_time := TIMESTAMPTZ '2026-11-01')
ORDER BY id
LIMIT 10;
Link
meters (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a list of billing meters. (GET /v1/billing/meters)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer_mapping STRUCT("event_payload_key" VARCHAR, "type" VARCHAR)
The customer mapping field of the billing.meter object.
default_aggregation STRUCT("formula" VARCHAR)
The default aggregation field of the billing.meter object.
display_name VARCHAR
The meter's name.
event_name VARCHAR
The name of the meter event to record usage for.
event_time_window VARCHAR
The time window which meter events have been pre-aggregated for, if any. One of: day, hour.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
The meter's status. One of: active, inactive.
status_transitions STRUCT("deactivated_at" TIMESTAMP WITH TIME ZONE)
The status transitions field of the billing.meter object.
updated TIMESTAMP WITH TIME ZONE
Time at which the object was last updated.
value_settings STRUCT("event_payload_key" VARCHAR)
The value settings field of the billing.meter object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count meters by status

SELECT status, count(*) AS n
FROM stripe.billing.meters()
GROUP BY status
ORDER BY n DESC, status;
Link
plans (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your plans. (GET /v1/plans)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the plan can be used for new purchases.
amount BIGINT
The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. (minor units)
amount_decimal VARCHAR
The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places.
billing_scheme VARCHAR
Describes how to compute the price per period. One of: per_unit, tiered.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
interval VARCHAR
The frequency at which a subscription is billed. One of: day, month, week, year.
interval_count BIGINT
The number of intervals (specified in the interval attribute) between subscription billings.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
meter VARCHAR
The meter tracking the usage of a metered price
nickname VARCHAR
A brief description of the plan, hidden from customers.
product VARCHAR
The product whose pricing this plan determines.
tiers JSON
Each element represents a pricing tier.
tiers_mode VARCHAR
Defines if the tiering price should be graduated or volume based. One of: graduated, volume.
transform_usage JSON
Apply a transformation to the reported usage or set quantity before computing the amount billed.
trial_period_days BIGINT
Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.
usage_type VARCHAR
Configures how the quantity per period should be determined. One of: licensed, metered.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count plans by currency

SELECT currency, count(*) AS n
FROM stripe.billing.plans()
GROUP BY currency
ORDER BY n DESC, currency;
Link
portal_configurations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of configurations that describe the functionality of the customer portal. (GET /v1/billing_portal/configurations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the configuration is active and can be used to create portal sessions.
application VARCHAR
ID of the Connect Application that created the configuration.
business_profile STRUCT of 3 fields
The business profile field of the billing_portal.configuration object.
STRUCT 3 fields
  • headlineVARCHAR
  • privacy_policy_urlVARCHAR
  • terms_of_service_urlVARCHAR
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
default_return_url VARCHAR
The default URL to redirect customers to when they click on the portal's link to return to your website.
features JSON
The features field of the billing_portal.configuration object.
is_default BOOLEAN
Whether the configuration is the default.
livemode BOOLEAN
If the object exists in live mode, the value is true.
login_page STRUCT("enabled" BOOLEAN, "url" VARCHAR)
The login page field of the billing_portal.configuration object.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The name of the configuration.
updated TIMESTAMP WITH TIME ZONE
Time at which the object was last updated.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent portal configurations

SELECT id, application, created
FROM stripe.billing.portal_configurations()
ORDER BY created DESC
LIMIT 10;
Link
prices (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), recurring_interval := VARCHAR, recurring_meter := VARCHAR, recurring_usage_type := VARCHAR, search := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of your active prices, excluding inline prices . (GET /v1/prices)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
recurring_interval := VARCHAR
Only return prices with these recurring fields. (Stripe parameter recurring[interval]) · default null
recurring_meter := VARCHAR
Only return prices with these recurring fields. (Stripe parameter recurring[meter]) · default null
recurring_usage_type := VARCHAR
Only return prices with these recurring fields. (Stripe parameter recurring[usage_type]) · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the price can be used for new purchases.
billing_scheme VARCHAR
Describes how to compute the price per period. One of: per_unit, tiered.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
currency_options JSON
Prices defined in each available currency option.
custom_unit_amount JSON
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
livemode BOOLEAN
If the object exists in live mode, the value is true.
lookup_key VARCHAR
A lookup key used to retrieve prices dynamically from a static string.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
nickname VARCHAR
A brief description of the price, hidden from customers.
product VARCHAR
The ID of the product this price is associated with.
recurring JSON
The recurring components of a price such as interval and usage_type.
tax_behavior VARCHAR
Only required if a default tax behavior) was not provided in the Stripe Tax settings. One of: exclusive, inclusive, unspecified.
tiers JSON
Each element represents a pricing tier.
tiers_mode VARCHAR
Defines if the tiering price should be graduated or volume based. One of: graduated, volume.
transform_quantity JSON
Apply a transformation to the reported usage or set quantity before computing the amount billed.
type VARCHAR
One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. One of: one_time, recurring.
unit_amount BIGINT
The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. (minor units)
unit_amount_decimal VARCHAR
The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count prices by type

SELECT type, count(*) AS n
FROM stripe.billing.prices()
GROUP BY type
ORDER BY n DESC, type;
Link
product_features (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), product_id := VARCHAR, stripe_account := VARCHAR) 1 example

Retrieve a list of features for a product (GET /v1/products/{product}/features)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
product_id := VARCHAR
Read only this parent's rows (product id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
product VARCHAR
Parent product id this row belongs to.
entitlement_feature JSON
A feature represents a monetizable ability or functionality in your system.
livemode BOOLEAN
If the object exists in live mode, the value is true.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten product features by id

SELECT id, product
FROM stripe.billing.product_features()
ORDER BY id
LIMIT 10;
Link
products (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), search := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of your products. (GET /v1/products)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the product is currently available for purchase.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
default_price VARCHAR
The ID of the Price object that is the default price for this product.
description VARCHAR
The product's description, meant to be displayable to the customer.
images VARCHAR[]
A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
livemode BOOLEAN
If the object exists in live mode, the value is true.
marketing_features JSON
A list of up to 15 marketing features for this product.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The product's name, meant to be displayable to the customer.
package_dimensions JSON
The dimensions of this product for shipping purposes.
shippable BOOLEAN
Whether this product is shipped (i.e., physical goods).
statement_descriptor VARCHAR
Extra information about a product which will appear on your customer's credit card statement.
tax_code VARCHAR
A tax code ID.
tax_details JSON
Tax details for this product, including the tax code and an optional performance location.
unit_label VARCHAR
A label that represents units of this product.
updated TIMESTAMP WITH TIME ZONE
Time at which the object was last updated.
url VARCHAR
A URL of a publicly-accessible webpage for this product.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent products

SELECT id, created, default_price
FROM stripe.billing.products()
ORDER BY created DESC
LIMIT 10;
Link
promotion_codes (coupon := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your promotion codes. (GET /v1/promotion_codes)

Named arguments
coupon := VARCHAR
Only return promotion codes for this coupon. (Stripe parameter coupon) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the promotion code is currently active.
code VARCHAR
The customer-facing code.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer VARCHAR
The customer who can use this promotion code.
customer_account VARCHAR
The account representing the customer who can use this promotion code.
expires_at TIMESTAMP WITH TIME ZONE
Date at which the promotion code can no longer be redeemed.
livemode BOOLEAN
If the object exists in live mode, the value is true.
max_redemptions BIGINT
Maximum number of times this promotion code can be redeemed.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
promotion JSON
The promotion field of the promotion_code object.
restrictions JSON
The restrictions field of the promotion_code object.
times_redeemed BIGINT
Number of times this promotion code has been used.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent promotion codes

SELECT id, code, created
FROM stripe.billing.promotion_codes()
ORDER BY created DESC
LIMIT 10;
Link
quote_line_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), quote_id := VARCHAR, stripe_account := VARCHAR) 1 example

When retrieving a quote, there is an includable line_items property containing the first handful of those items. (GET /v1/quotes/{quote}/line_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
quote_id := VARCHAR
Read only this parent's rows (quote id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
quote VARCHAR
Parent quote id this row belongs to.
adjustable_quantity JSON
The adjustable quantity field of the item object.
amount_discount BIGINT
Total discount amount applied.
amount_subtotal BIGINT
Total before any discounts or taxes are applied. (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_tax BIGINT
Total tax amount applied. (minor units)
amount_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total after discounts and taxes. (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
discounts JSON
The discounts applied to the line item.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
price JSON
The price used to generate the line item.
quantity BIGINT
The quantity of products being purchased.
taxes JSON
The taxes applied to the line item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count quote line items by currency

SELECT currency, count(*) AS n
FROM stripe.billing.quote_line_items()
GROUP BY currency
ORDER BY n DESC, currency;
Link
quote_upfront_line_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), quote_id := VARCHAR, stripe_account := VARCHAR) 1 example

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. (GET /v1/quotes/{quote}/computed_upfront_line_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
quote_id := VARCHAR
Read only this parent's rows (quote id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
quote VARCHAR
Parent quote id this row belongs to.
adjustable_quantity JSON
The adjustable quantity field of the item object.
amount_discount BIGINT
Total discount amount applied.
amount_subtotal BIGINT
Total before any discounts or taxes are applied. (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_tax BIGINT
Total tax amount applied. (minor units)
amount_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total after discounts and taxes. (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
discounts JSON
The discounts applied to the line item.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
price JSON
The price used to generate the line item.
quantity BIGINT
The quantity of products being purchased.
taxes JSON
The taxes applied to the line item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count quote upfront line items by currency

SELECT currency, count(*) AS n
FROM stripe.billing.quote_upfront_line_items()
GROUP BY currency
ORDER BY n DESC, currency;
Link
quotes (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your quotes. (GET /v1/quotes)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount_subtotal BIGINT
Total before any discounts or taxes… (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total after discounts and taxes are… (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
application VARCHAR
ID of the Connect Application that…
application_fee_amount BIGINT
The amount of the application fee (if… (minor units)
application_fee_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
application_fee_percent DOUBLE
A non-negative decimal between 0 and…
automatic_tax JSON
The automatic tax field of the quote…
collection_method VARCHAR
Either charge_automatically, or…
computed JSON
The computed field of the quote object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
The customer who received this quote.
customer_account VARCHAR
The account representing the customer…
default_tax_rates JSON
The tax rates applied to this quote.
description VARCHAR
A description that will be displayed…
discounts JSON
The discounts applied to this quote.
expires_at TIMESTAMP WITH TIME ZONE
The date on which the quote will be…
footer VARCHAR
A footer that will be displayed on the…
from_quote JSON
Details of the quote that was cloned.
header VARCHAR
A header that will be displayed on the…
invoice VARCHAR
The invoice that was created from this…
invoice_settings JSON
The invoice settings field of the…
line_items JSON
A list of items the customer is being…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
number VARCHAR
A unique number that identifies this…
on_behalf_of VARCHAR
The account on behalf of which to…
status VARCHAR
The status of the quote. One of…
status_transitions STRUCT of 3 fields
The status transitions field of the…
STRUCT 3 fields
  • accepted_atTIMESTAMP WITH TIME ZONE
  • canceled_atTIMESTAMP WITH TIME ZONE
  • finalized_atTIMESTAMP WITH TIME ZONE
subscription VARCHAR
The subscription that was created or…
subscription_data JSON
The subscription data field of the…
subscription_schedule VARCHAR
The subscription schedule that was…
test_clock VARCHAR
ID of the test clock this quote…
total_details JSON
The total details field of the quote…
transfer_data JSON
The account (if any) the payments will…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count quotes by status

SELECT status, count(*) AS n
FROM stripe.billing.quotes()
GROUP BY status
ORDER BY n DESC, status;
Link
shipping_rates (currency := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your shipping rates. (GET /v1/shipping_rates)

Named arguments
currency := VARCHAR
Only return shipping rates for the given currency. (Stripe parameter currency) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the shipping rate can be used for new purchases.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
delivery_estimate JSON
The estimated range for how long shipping will take, meant to be displayable to the customer.
display_name VARCHAR
The name of the shipping rate, meant to be displayable to the customer.
fixed_amount JSON
The fixed amount field of the shipping_rate object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
tax_behavior VARCHAR
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of: exclusive, inclusive, unspecified.
tax_code VARCHAR
A tax code ID.
type VARCHAR
The type of calculation to use on the shipping rate. One of: fixed_amount.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count shipping rates by type

SELECT type, count(*) AS n
FROM stripe.billing.shipping_rates()
GROUP BY type
ORDER BY n DESC, type;
Link
subscription_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, subscription_id := VARCHAR) 1 example

Returns a list of your subscription items for a given subscription. (GET /v1/subscription_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
subscription_id := VARCHAR
Read only this parent's rows (subscription id); NULL fans out over every parent. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
subscription VARCHAR
Parent subscription id this row belongs to.
billed_until TIMESTAMP WITH TIME ZONE
The time period the subscription item has been billed for.
billing_thresholds JSON
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
created BIGINT
Time at which the object was created.
current_period_end TIMESTAMP WITH TIME ZONE
The end time of this subscription item's current billing period.
current_period_start TIMESTAMP WITH TIME ZONE
The start time of this subscription item's current billing period.
current_trial JSON
The current trial that is applied to this subscription item.
discounts JSON
The discounts applied to the subscription item.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
price JSON
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
quantity BIGINT
The quantity of the plan to which the customer should be subscribed.
tax_rates JSON
The tax rates which apply to this subscription_item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent subscription items

SELECT id, subscription, billed_until
FROM stripe.billing.subscription_items()
ORDER BY created DESC
LIMIT 10;
Link
subscription_schedules (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), scheduled := BOOLEAN, stripe_account := VARCHAR) 1 example

Retrieves the list of your subscription schedules. (GET /v1/subscription_schedules)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
scheduled := BOOLEAN
Only return subscription schedules that have not started yet. (Stripe parameter scheduled) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
application VARCHAR
ID of the Connect Application that created the schedule.
billing_mode JSON
The billing mode of the subscription.
canceled_at TIMESTAMP WITH TIME ZONE
Time at which the subscription schedule was canceled.
completed_at TIMESTAMP WITH TIME ZONE
Time at which the subscription schedule was completed.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
current_phase JSON
Object representing the start and end dates for the current phase of the subscription schedule, if it is active.
customer VARCHAR
ID of the customer who owns the subscription schedule.
customer_account VARCHAR
ID of the account who owns the subscription schedule.
default_settings JSON
The default settings field of the subscription_schedule object.
end_behavior VARCHAR
Behavior of the subscription schedule and underlying subscription when it ends. One of: cancel, none, release, renew.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
pause_schedules JSON
The pause schedules for this subscription schedule.
phases JSON
Configuration for the subscription schedule's phases.
released_at TIMESTAMP WITH TIME ZONE
Time at which the subscription schedule was released.
released_subscription VARCHAR
ID of the subscription once managed by the subscription schedule (if it is released).
status VARCHAR
The present status of the subscription schedule. One of: active, canceled, completed, not_started, released.
subscription VARCHAR
ID of the subscription managed by the subscription schedule.
test_clock VARCHAR
ID of the test clock this subscription schedule belongs to.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count subscription schedules by status

SELECT status, count(*) AS n
FROM stripe.billing.subscription_schedules()
GROUP BY status
ORDER BY n DESC, status;
Link
subscriptions (automatic_tax_enabled := BOOLEAN, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), price := VARCHAR, search := VARCHAR, stripe_account := VARCHAR) 1 example

By default, returns a list of subscriptions that have not been canceled. (GET /v1/subscriptions)

Named arguments
automatic_tax_enabled := BOOLEAN
Filter subscriptions by their automatic tax settings. (Stripe parameter automatic_tax[enabled]) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
price := VARCHAR
Filter for subscriptions that contain this recurring price ID. (Stripe parameter price) · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
application VARCHAR
ID of the Connect Application that…
application_fee_percent DOUBLE
A non-negative decimal between 0 and…
automatic_tax JSON
The automatic tax field of the…
billing_cycle_anchor TIMESTAMP WITH TIME ZONE
The reference point that aligns future…
billing_cycle_anchor_config JSON
The fixed values used to calculate the…
billing_mode JSON
The billing mode of the subscription.
billing_schedules JSON
Billing schedules for this subscription.
billing_thresholds JSON
Define thresholds at which an invoice…
cancel_at TIMESTAMP WITH TIME ZONE
A date in the future at which the…
cancel_at_period_end BOOLEAN
Whether this subscription will (if…
canceled_at TIMESTAMP WITH TIME ZONE
If the subscription has been canceled…
cancellation_details JSON
Details about why this subscription…
collection_method VARCHAR
Either charge_automatically, or…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
ID of the customer who owns the…
customer_account VARCHAR
ID of the account representing the…
days_until_due BIGINT
Number of days a customer has to pay…
default_payment_method VARCHAR
ID of the default payment method for…
default_source VARCHAR
ID of the default payment source for…
default_tax_rates JSON
The tax rates that will apply to any…
description VARCHAR
The subscription's description, meant…
discounts JSON
The discounts applied to the…
ended_at TIMESTAMP WITH TIME ZONE
If the subscription has ended, the…
invoice_settings JSON
The invoice settings field of the…
items JSON
List of subscription items, each with…
latest_invoice VARCHAR
The most recent invoice this…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
next_pending_invoice_item_invoice TIMESTAMP WITH TIME ZONE
Specifies the approximate timestamp on…
on_behalf_of VARCHAR
The account (if any) the charge was…
pending_setup_intent VARCHAR
You can use this SetupIntent to…
schedule VARCHAR
The schedule attached to the…
start_date TIMESTAMP WITH TIME ZONE
Date when the subscription was first…
status VARCHAR
Possible values are incomplete…
test_clock VARCHAR
ID of the test clock this subscription…
trial_end TIMESTAMP WITH TIME ZONE
If the subscription has a trial, the…
trial_start TIMESTAMP WITH TIME ZONE
If the subscription has a trial, the…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count subscriptions by status

SELECT status, count(*) AS n
FROM stripe.billing.subscriptions()
GROUP BY status
ORDER BY n DESC, status;
Link
test_clocks (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your test clocks. (GET /v1/test_helpers/test_clocks)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
deletes_after TIMESTAMP WITH TIME ZONE
Time at which this clock is scheduled to auto delete.
frozen_time TIMESTAMP WITH TIME ZONE
Time at which all objects belonging to this clock are frozen.
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
The custom name supplied at creation.
status VARCHAR
The status of the Test Clock. One of: advancing, internal_failure, ready.
status_details JSON
The status details field of the test_helpers.test_clock object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count test clocks by status

SELECT status, count(*) AS n
FROM stripe.billing.test_clocks()
GROUP BY status
ORDER BY n DESC, status;
Link
trial_offers (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of trial offers. (GET /v1/product_catalog/trial_offers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Whether the trial offer is active.
duration JSON
The duration field of the product_catalog.trial_offer object.
end_behavior JSON
The end behavior field of the product_catalog.trial_offer object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
nickname VARCHAR
A brief description of the trial offer, hidden from customers.
price VARCHAR
The price during the trial offer.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten trial offers by id

SELECT id, nickname, price
FROM stripe.billing.trial_offers()
ORDER BY id
LIMIT 10;
Link
climate 3 functions

Stripe Climate endpoints: carbon removal products, suppliers and your orders.

Schema examples (3)
Examples (3)

Count orders by status

SELECT status, count(*) AS n
FROM stripe.climate.orders()
GROUP BY status
ORDER BY n DESC, status;

The ten most recent products

SELECT id, created, delivery_year
FROM stripe.climate.products()
ORDER BY created DESC
LIMIT 10;

The first ten suppliers by id

SELECT id, info_url, name
FROM stripe.climate.suppliers()
ORDER BY id
LIMIT 10;
Table functions
orders (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all Climate order objects. (GET /v1/climate/orders)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount_fees BIGINT
Total amount of Frontier's service fees in the currency's smallest unit. (minor units)
amount_fees_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_subtotal BIGINT
Total amount of the carbon removal in the currency's smallest unit. (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total amount of the order including fees in the currency's smallest unit. (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
beneficiary STRUCT("public_name" VARCHAR)
The beneficiary field of the climate.order object.
canceled_at TIMESTAMP WITH TIME ZONE
Time at which the order was canceled.
cancellation_reason VARCHAR
Reason for the cancellation of this order. One of: expired, product_unavailable, requested.
certificate VARCHAR
For delivered orders, a URL to a delivery certificate for the order.
confirmed_at TIMESTAMP WITH TIME ZONE
Time at which the order was confirmed.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase, representing the currency for this order.
delayed_at TIMESTAMP WITH TIME ZONE
Time at which the order's expected_delivery_year was delayed.
delivered_at TIMESTAMP WITH TIME ZONE
Time at which the order was delivered.
delivery_details JSON
Details about the delivery of carbon removal for this order.
expected_delivery_year BIGINT
The year this order is expected to be delivered.
livemode BOOLEAN
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
metric_tons VARCHAR
Quantity of carbon removal that is included in this order.
product VARCHAR
Unique ID for the Climate Product this order is purchasing.
product_substituted_at TIMESTAMP WITH TIME ZONE
Time at which the order's product was substituted for a different product.
status VARCHAR
The current status of this order. One of: awaiting_funds, canceled, confirmed, delivered, open.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count orders by status

SELECT status, count(*) AS n
FROM stripe.climate.orders()
GROUP BY status
ORDER BY n DESC, status;
Link
products (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all available Climate product objects. (GET /v1/climate/products)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
current_prices_per_metric_ton JSON
Current prices for a metric ton of carbon removal in a currency's smallest unit.
delivery_year BIGINT
The year in which the carbon removal is expected to be delivered.
livemode BOOLEAN
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
metric_tons_available VARCHAR
The quantity of metric tons available for reservation.
name VARCHAR
The Climate product's name.
suppliers JSON
The carbon removal suppliers that fulfill orders for this Climate product.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent products

SELECT id, created, delivery_year
FROM stripe.climate.products()
ORDER BY created DESC
LIMIT 10;
Link
suppliers (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all available Climate supplier objects. (GET /v1/climate/suppliers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
info_url VARCHAR
Link to a webpage to learn more about the supplier.
livemode BOOLEAN
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
locations JSON
The locations in which this supplier operates.
name VARCHAR
Name of this carbon removal supplier.
removal_pathway VARCHAR
The scientific pathway used for carbon removal. One of: biomass_carbon_removal_and_storage, direct_air_capture, enhanced_weathering, marine_carbon_removal.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten suppliers by id

SELECT id, info_url, name
FROM stripe.climate.suppliers()
ORDER BY id
LIMIT 10;
Link
connect 9 functions

Connect endpoints of the Stripe API: your account, connected accounts and their people, capabilities and external accounts, transfers and reversals, application fees and fee refunds.

Schema examples (9)
Examples (9)

Key fields of the account (/v1/account)

SELECT id, business_type, charges_enabled, country
FROM stripe.connect.account();

Count account capabilities by status

SELECT status, count(*) AS n
FROM stripe.connect.account_capabilities()
GROUP BY status
ORDER BY n DESC, status;

Count account external accounts by status

SELECT status, count(*) AS n
FROM stripe.connect.account_external_accounts()
GROUP BY status
ORDER BY n DESC, status;

The ten most recent account persons

SELECT id, account, created
FROM stripe.connect.account_persons()
ORDER BY created DESC
LIMIT 10;
5 more examples

Count accounts by type

SELECT type, count(*) AS n
FROM stripe.connect.accounts()
GROUP BY type
ORDER BY n DESC, type;

Count application fee refunds by currency

SELECT currency, count(*) AS n
FROM stripe.connect.application_fee_refunds()
GROUP BY currency
ORDER BY n DESC, currency;

Count application fees by currency

SELECT currency, count(*) AS n
FROM stripe.connect.application_fees()
GROUP BY currency
ORDER BY n DESC, currency;

Count transfer reversals by currency

SELECT currency, count(*) AS n
FROM stripe.connect.transfer_reversals()
GROUP BY currency
ORDER BY n DESC, currency;

Count transfers by currency

SELECT currency, count(*) AS n
FROM stripe.connect.transfers()
GROUP BY currency
ORDER BY n DESC, currency;
Table functions
account (params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves the details of an account. (GET /v1/account)

Named arguments
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
business_profile JSON
Business information about the account.
business_type VARCHAR
The business type. One of: company, government_entity, individual, non_profit.
capabilities JSON
The capabilities field of the account object.
charges_enabled BOOLEAN
Whether the account can process charges.
company JSON
The company field of the account object.
controller JSON
The controller field of the account object.
country VARCHAR
The account's country.
created TIMESTAMP WITH TIME ZONE
Time at which the account was connected.
default_currency VARCHAR
Three-letter ISO currency code representing the default currency for the account.
details_submitted BOOLEAN
Whether account details have been submitted.
email VARCHAR
An email address associated with the account.
external_accounts JSON
External accounts (bank accounts and debit cards) currently attached to this account.
future_requirements JSON
The future requirements field of the account object.
groups JSON
The groups associated with the account.
individual JSON
This is an object representing a person associated with a Stripe account.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payouts_enabled BOOLEAN
Whether the funds in this account can be paid out.
requirements JSON
The requirements field of the account object.
settings JSON
Options for customizing how the account functions within Stripe.
tos_acceptance STRUCT of 4 fields
The tos acceptance field of the account object.
STRUCT 4 fields
  • dateTIMESTAMP WITH TIME ZONE
  • ipVARCHAR
  • service_agreementVARCHAR
  • user_agentVARCHAR
type VARCHAR
The Stripe account type. One of: custom, express, none, standard.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the account (/v1/account)

SELECT id, business_type, charges_enabled, country
FROM stripe.connect.account();
Link
account_capabilities (account_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of capabilities associated with the account. (GET /v1/accounts/{account}/capabilities)

Named arguments
account_id := VARCHAR
Read only this parent's rows (account id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
The identifier for the capability.
account VARCHAR
Parent account id this row belongs to.
future_requirements JSON
The future requirements field of the capability object.
requested BOOLEAN
Whether the capability has been requested.
requested_at TIMESTAMP WITH TIME ZONE
Time at which the capability was requested.
requirements JSON
The requirements field of the capability object.
status VARCHAR
The status of the capability. One of: active, inactive, pending, unrequested.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count account capabilities by status

SELECT status, count(*) AS n
FROM stripe.connect.account_capabilities()
GROUP BY status
ORDER BY n DESC, status;
Link
account_external_accounts (account_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List external accounts for an account. (GET /v1/accounts/{account}/external_accounts)

Named arguments
account_id := VARCHAR
Read only this parent's rows (account id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
Parent account id this row belongs to.
object VARCHAR
Object type of this row (the list mixes several types).
available_payout_methods VARCHAR[]
A set of available payout methods for this bank account.
country VARCHAR
Two-letter ISO code representing the country the bank account is located in.
currency VARCHAR
Three-letter ISO code for the currency paid out to the bank account.
customer VARCHAR
The ID of the customer that the bank account is associated with.
default_for_currency BOOLEAN
Whether this bank account is the default external account for its currency.
fingerprint VARCHAR
Uniquely identifies this particular bank account.
last4 VARCHAR
The last four digits of the bank account number.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
status VARCHAR
For bank accounts, possible values are new, validated, verified, verification_failed, tokenized_account_number_deactivated or errored.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count account external accounts by status

SELECT status, count(*) AS n
FROM stripe.connect.account_external_accounts()
GROUP BY status
ORDER BY n DESC, status;
Link
account_persons (account_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), relationship_authorizer := BOOLEAN, relationship_director := BOOLEAN, relationship_executive := BOOLEAN, relationship_legal_guardian := BOOLEAN, relationship_owner := BOOLEAN, relationship_representative := BOOLEAN, stripe_account := VARCHAR) 1 example

Returns a list of people associated with the account’s legal entity. (GET /v1/accounts/{account}/persons)

Named arguments
account_id := VARCHAR
Read only this parent's rows (account id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
relationship_authorizer := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[authorizer]) · default null
relationship_director := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[director]) · default null
relationship_executive := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[executive]) · default null
relationship_legal_guardian := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[legal_guardian]) · default null
relationship_owner := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[owner]) · default null
relationship_representative := BOOLEAN
Filters on the list of people returned based on the person's relationship to the account's company. (Stripe parameter relationship[representative]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
Parent account id this row belongs to.
additional_tos_acceptances JSON
The additional tos acceptances field of the person object.
address STRUCT of 6 fields
The address field of the person object.
STRUCT 6 fields
  • cityVARCHAR
  • countryVARCHAR
  • line1VARCHAR
  • line2VARCHAR
  • postal_codeVARCHAR
  • stateVARCHAR
address_kana JSON
The address kana field of the person object.
address_kanji JSON
The address kanji field of the person object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
dob STRUCT("day" BIGINT, "month" BIGINT, "year" BIGINT)
The dob field of the person object.
email VARCHAR
The person's email address.
first_name VARCHAR
The person's first name.
first_name_kana VARCHAR
The Kana variation of the person's first name (Japan only).
first_name_kanji VARCHAR
The Kanji variation of the person's first name (Japan only).
full_name_aliases VARCHAR[]
A list of alternate names or aliases that the person is known by.
future_requirements JSON
The future requirements field of the person object.
gender VARCHAR
The person's gender.
id_number_provided BOOLEAN
Whether the person's id_number was provided.
id_number_secondary_provided BOOLEAN
Whether the person's id_number_secondary was provided.
last_name VARCHAR
The person's last name.
last_name_kana VARCHAR
The Kana variation of the person's last name (Japan only).
last_name_kanji VARCHAR
The Kanji variation of the person's last name (Japan only).
maiden_name VARCHAR
The person's maiden name.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
nationality VARCHAR
The country where the person is a national.
phone VARCHAR
The person's phone number.
political_exposure VARCHAR
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important. One of: existing, none.
registered_address STRUCT of 6 fields
The registered address field of the person object.
STRUCT 6 fields
  • cityVARCHAR
  • countryVARCHAR
  • line1VARCHAR
  • line2VARCHAR
  • postal_codeVARCHAR
  • stateVARCHAR
relationship JSON
The relationship field of the person object.
requirements JSON
The requirements field of the person object.
ssn_last_4_provided BOOLEAN
Whether the last four digits of the person's Social Security number have been provided (U.S.
us_cfpb_data JSON
Demographic data related to the person.
verification JSON
The verification field of the person object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent account persons

SELECT id, account, created
FROM stripe.connect.account_persons()
ORDER BY created DESC
LIMIT 10;
Link
accounts (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of accounts connected to your platform via Connect . (GET /v1/accounts)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
business_profile JSON
Business information about the account.
business_type VARCHAR
The business type. One of: company, government_entity, individual, non_profit.
capabilities JSON
The capabilities field of the account object.
charges_enabled BOOLEAN
Whether the account can process charges.
company JSON
The company field of the account object.
controller JSON
The controller field of the account object.
country VARCHAR
The account's country.
created TIMESTAMP WITH TIME ZONE
Time at which the account was connected.
default_currency VARCHAR
Three-letter ISO currency code representing the default currency for the account.
details_submitted BOOLEAN
Whether account details have been submitted.
email VARCHAR
An email address associated with the account.
external_accounts JSON
External accounts (bank accounts and debit cards) currently attached to this account.
future_requirements JSON
The future requirements field of the account object.
groups JSON
The groups associated with the account.
individual JSON
This is an object representing a person associated with a Stripe account.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payouts_enabled BOOLEAN
Whether the funds in this account can be paid out.
requirements JSON
The requirements field of the account object.
settings JSON
Options for customizing how the account functions within Stripe.
tos_acceptance STRUCT of 4 fields
The tos acceptance field of the account object.
STRUCT 4 fields
  • dateTIMESTAMP WITH TIME ZONE
  • ipVARCHAR
  • service_agreementVARCHAR
  • user_agentVARCHAR
type VARCHAR
The Stripe account type. One of: custom, express, none, standard.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count accounts by type

SELECT type, count(*) AS n
FROM stripe.connect.accounts()
GROUP BY type
ORDER BY n DESC, type;
Link
application_fee_refunds (application_fee_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

You can see a list of the refunds belonging to a specific application fee. (GET /v1/application_fees/{id}/refunds)

Named arguments
application_fee_id := VARCHAR
Read only this parent's rows (application_fee id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
application_fee VARCHAR
Parent application fee id this row belongs to.
amount BIGINT
Amount, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
Balance transaction that describes the impact on your account balance.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
fee VARCHAR
ID of the application fee that was refunded.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count application fee refunds by currency

SELECT currency, count(*) AS n
FROM stripe.connect.application_fee_refunds()
GROUP BY currency
ORDER BY n DESC, currency;
Link
application_fees (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of application fees you’ve previously collected. (GET /v1/application_fees)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
ID of the Stripe account this fee was taken from.
amount BIGINT
Amount earned, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_refunded BIGINT
Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) (minor units)
amount_refunded_decimal DECIMAL(38,3)
Same amount in major units (exact).
application VARCHAR
ID of the Connect application that earned the fee.
balance_transaction VARCHAR
Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
charge VARCHAR
ID of the charge that the application fee was taken from.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
fee_source JSON
Polymorphic source of the application fee.
livemode BOOLEAN
If the object exists in live mode, the value is true.
originating_transaction VARCHAR
ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter.
refunded BOOLEAN
Whether the fee has been fully refunded.
refunds JSON
A list of refunds that have been applied to the fee.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count application fees by currency

SELECT currency, count(*) AS n
FROM stripe.connect.application_fees()
GROUP BY currency
ORDER BY n DESC, currency;
Link
transfer_reversals (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, transfer_id := VARCHAR) 1 example

You can see a list of the reversals belonging to a specific transfer. (GET /v1/transfers/{id}/reversals)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
transfer_id := VARCHAR
Read only this parent's rows (transfer id); NULL fans out over every parent. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
transfer VARCHAR
Parent transfer id this row belongs to.
amount BIGINT
Amount, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
Balance transaction that describes the impact on your account balance.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
destination_payment_refund VARCHAR
Linked payment refund for the transfer reversal.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
source_refund VARCHAR
ID of the refund responsible for the transfer reversal.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transfer reversals by currency

SELECT currency, count(*) AS n
FROM stripe.connect.transfer_reversals()
GROUP BY currency
ORDER BY n DESC, currency;
Link
transfers (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of existing transfers sent to connected accounts. (GET /v1/transfers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Amount in cents (or local equivalent) to be transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_reversed BIGINT
Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). (minor units)
amount_reversed_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
Balance transaction that describes the impact of this transfer on your account balance.
created TIMESTAMP WITH TIME ZONE
Time that this record of the transfer was first created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
destination VARCHAR
ID of the Stripe account the transfer was sent to.
destination_payment VARCHAR
If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
reversals JSON
A list of reversals that have been applied to the transfer.
reversed BOOLEAN
Whether the transfer has been fully reversed.
source_transaction VARCHAR
ID of the charge that was used to fund the transfer.
source_type VARCHAR
The source balance this transfer came from.
transfer_group VARCHAR
A string that identifies this transaction as part of a group.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transfers by currency

SELECT currency, count(*) AS n
FROM stripe.connect.transfers()
GROUP BY currency
ORDER BY n DESC, currency;
Link
financial_connections 4 functions

Stripe Financial Connections endpoints: linked bank accounts, their owners and transactions, and authentication sessions.

Schema examples (4)
Examples (4)

The first ten account owners by id

SELECT id, account, email
FROM stripe.financial_connections.account_owners()
ORDER BY id
LIMIT 10;

Count accounts by status

SELECT status, count(*) AS n
FROM stripe.financial_connections.accounts()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the sessions (/v1/financial_connections/sessions/{session})

SELECT id, livemode, return_url
FROM stripe.financial_connections.sessions(session_id := 'id_…');

Count transactions by status

SELECT status, count(*) AS n
FROM stripe.financial_connections.transactions()
GROUP BY status
ORDER BY n DESC, status;
Table functions
account_owners (account_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all owners for a given Account (GET /v1/financial_connections/accounts/{account}/owners)

Named arguments
account_id := VARCHAR
Read only this parent's rows (account id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
Parent account id this row belongs to.
email VARCHAR
The email address of the owner.
name VARCHAR
The full name of the owner.
ownership VARCHAR
The ownership object that this owner belongs to.
phone VARCHAR
The raw phone number of the owner.
raw_address VARCHAR
The raw physical address of the owner.
refreshed_at TIMESTAMP WITH TIME ZONE
The timestamp of the refresh that updated this owner.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten account owners by id

SELECT id, account, email
FROM stripe.financial_connections.account_owners()
ORDER BY id
LIMIT 10;
Link
accounts (account_holder_account := VARCHAR, account_holder_customer := VARCHAR, account_holder_customer_account := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), session := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of Financial Connections Account objects. (GET /v1/financial_connections/accounts)

Named arguments
account_holder_account := VARCHAR
If present, only return accounts that belong to the specified account holder. (Stripe parameter account_holder[account]) · default null
account_holder_customer := VARCHAR
If present, only return accounts that belong to the specified account holder. (Stripe parameter account_holder[customer]) · default null
account_holder_customer_account := VARCHAR
If present, only return accounts that belong to the specified account holder. (Stripe parameter account_holder[customer_account]) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
session := VARCHAR
If present, only return accounts that were collected as part of the given session. (Stripe parameter session) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account_holder JSON
The account holder that this account belongs to.
account_numbers JSON
Details about the account numbers.
balance JSON
The most recent information about the account's balance.
balance_refresh JSON
The state of the most recent attempt to refresh the account balance.
category VARCHAR
The type of the account. One of: cash, credit, investment, other.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
display_name VARCHAR
A human-readable name that has been assigned to this account, either by the account holder or by the institution.
institution_name VARCHAR
The name of the institution that holds this account.
last4 VARCHAR
The last 4 digits of the account number.
livemode BOOLEAN
If the object exists in live mode, the value is true.
ownership VARCHAR
The most recent information about the account's owners.
ownership_refresh JSON
The state of the most recent attempt to refresh the account owners.
permissions VARCHAR[]
The list of permissions granted by this account.
status VARCHAR
The status of the link to the account. One of: active, disconnected, inactive.
status_details JSON
The status details field of the financial_connections.account object.
subcategory VARCHAR
If category is cash, one of: - checking - savings - other If category is credit, one of: - mortgage - line_of_credit - credit_card - other If category is…
subscriptions VARCHAR[]
The list of data refresh subscriptions requested on this account.
supported_payment_method_types VARCHAR[]
The PaymentMethod type(s) that can be created from this account.
transaction_refresh JSON
The state of the most recent attempt to refresh the account transactions.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count accounts by status

SELECT status, count(*) AS n
FROM stripe.financial_connections.accounts()
GROUP BY status
ORDER BY n DESC, status;
Link
sessions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), session_id := VARCHAR, stripe_account := VARCHAR) 1 example

Retrieves the details of a Financial Connections Session (GET /v1/financial_connections/sessions/{session})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
session_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account_holder JSON
The account holder for whom accounts are collected in this session.
accounts JSON
The accounts that were collected as part of this Session.
filters JSON
The filters field of the financial_connections.session object.
limits STRUCT("accounts" BIGINT)
The limits field of the financial_connections.session object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
manual_entry STRUCT("mode" VARCHAR)
The manual entry field of the financial_connections.session object.
permissions VARCHAR[]
Permissions requested for accounts collected during this session.
prefetch VARCHAR[]
Data features requested to be retrieved upon account creation.
return_url VARCHAR
For webview integrations only.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the sessions (/v1/financial_connections/sessions/{session})

SELECT id, livemode, return_url
FROM stripe.financial_connections.sessions(session_id := 'id_…');
Link
transactions (account_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, transaction_refresh_after := VARCHAR) 1 example

Returns a list of Financial Connections Transaction objects. (GET /v1/financial_connections/transactions)

Named arguments
account_id := VARCHAR
Read only this parent's rows (account id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
transaction_refresh_after := VARCHAR
A filter on the list based on the object transaction_refresh field. (Stripe parameter transaction_refresh[after]) · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
Parent account id this row belongs to.
amount BIGINT
The amount of this transaction, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
The description of this transaction.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
The status of the transaction. One of: pending, posted, void.
status_transitions STRUCT of 2 fields
The status transitions field of the financial_connections.transaction object.
STRUCT 2 fields
  • posted_atTIMESTAMP WITH TIME ZONE
  • void_atTIMESTAMP WITH TIME ZONE
transacted_at TIMESTAMP WITH TIME ZONE
Time at which the transaction was transacted.
transaction_refresh VARCHAR
The token of the transaction refresh that last updated or created this transaction.
updated TIMESTAMP WITH TIME ZONE
Time at which the object was last updated.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transactions by status

SELECT status, count(*) AS n
FROM stripe.financial_connections.transactions()
GROUP BY status
ORDER BY n DESC, status;
Link
identity 2 functions

Stripe Identity endpoints: verification sessions and verification reports (document, selfie, id number checks).

Schema examples (2)
Examples (2)

Count verification reports by type

SELECT type, count(*) AS n
FROM stripe.identity.verification_reports()
GROUP BY type
ORDER BY n DESC, type;

Count verification sessions by status

SELECT status, count(*) AS n
FROM stripe.identity.verification_sessions()
GROUP BY status
ORDER BY n DESC, status;
Table functions
verification_reports (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List all verification reports. (GET /v1/identity/verification_reports)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
client_reference_id VARCHAR
A string to reference this user.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
document JSON
Result from a document check
email JSON
Result from a email check
livemode BOOLEAN
If the object exists in live mode, the value is true.
options JSON
The options field of the identity.verification_report object.
phone JSON
Result from a phone check
selfie JSON
Result from a selfie check
type VARCHAR
Type of report. One of: document, id_number, verification_flow.
verification_flow VARCHAR
The configuration token of a verification flow from the dashboard.
verification_session VARCHAR
ID of the VerificationSession that created this report.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count verification reports by type

SELECT type, count(*) AS n
FROM stripe.identity.verification_reports()
GROUP BY type
ORDER BY n DESC, type;
Link
verification_sessions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of VerificationSessions (GET /v1/identity/verification_sessions)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
client_reference_id VARCHAR
A string to reference this user.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
last_error JSON
If present, this property tells you the last error encountered when processing the verification.
last_verification_report VARCHAR
ID of the most recent VerificationReport.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
options JSON
A set of options for the session’s verification checks.
provided_details JSON
Details provided about the user being verified.
redaction JSON
Redaction status of this VerificationSession.
related_customer VARCHAR
Customer ID
related_customer_account VARCHAR
The ID of the Account representing a customer.
related_person STRUCT("account" VARCHAR, "person" VARCHAR)
The related person field of the identity.verification_session object.
status VARCHAR
Status of this VerificationSession. One of: canceled, processing, requires_input, verified.
type VARCHAR
The type of verification check to be performed. One of: document, id_number, verification_flow.
url VARCHAR
The short-lived URL that you use to redirect a user to Stripe to submit their identity information.
verification_flow VARCHAR
The configuration token of a verification flow from the dashboard.
verified_outputs JSON
The user’s verified data.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count verification sessions by status

SELECT status, count(*) AS n
FROM stripe.identity.verification_sessions()
GROUP BY status
ORDER BY n DESC, status;
Link
issuing 9 functions

Stripe Issuing endpoints: cards, cardholders, authorizations, transactions, disputes, tokens, settlements, personalization designs and physical bundles. Needs Issuing enabled on the account.

Schema examples (9)
Examples (9)

Count authorizations by status

SELECT status, count(*) AS n
FROM stripe.issuing.authorizations()
GROUP BY status
ORDER BY n DESC, status;

Count cardholders by status

SELECT status, count(*) AS n
FROM stripe.issuing.cardholders()
GROUP BY status
ORDER BY n DESC, status;

Count cards by status

SELECT status, count(*) AS n
FROM stripe.issuing.cards()
GROUP BY status
ORDER BY n DESC, status;

Count disputes by status

SELECT status, count(*) AS n
FROM stripe.issuing.disputes()
GROUP BY status
ORDER BY n DESC, status;
5 more examples

Count personalization designs by status

SELECT status, count(*) AS n
FROM stripe.issuing.personalization_designs()
GROUP BY status
ORDER BY n DESC, status;

Count physical bundles by status

SELECT status, count(*) AS n
FROM stripe.issuing.physical_bundles()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the settlements (/v1/issuing/settlements/{settlement})

SELECT id, bin, clearing_date, created
FROM stripe.issuing.settlements(settlement_id := 'id_…');

Count tokens by status

SELECT status, count(*) AS n
FROM stripe.issuing.tokens()
GROUP BY status
ORDER BY n DESC, status;

Count transactions by type

SELECT type, count(*) AS n
FROM stripe.issuing.transactions()
GROUP BY type
ORDER BY n DESC, type;
Table functions
authorizations (card := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Issuing Authorization objects. (GET /v1/issuing/authorizations)

Named arguments
card := VARCHAR
Only return authorizations that belong to the given card. (Stripe parameter card) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The total amount that was authorized or rejected. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_details JSON
Detailed breakdown of amount components.
approved BOOLEAN
Whether the authorization has been approved.
authorization_method VARCHAR
How the card details were provided. One of: chip, contactless, keyed_in, online, swipe.
balance_transactions JSON
List of balance transactions associated with this authorization.
card JSON
You can create physical or virtual cards that are issued to cardholders.
card_presence VARCHAR
Whether the card was present at the point of sale for the authorization. One of: not_present, present.
cardholder VARCHAR
The cardholder to whom this authorization belongs.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
The currency of the cardholder.
fleet JSON
Fleet-specific information for authorizations using Fleet cards.
fraud_challenges JSON
Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
fuel JSON
Information about fuel that was purchased with this transaction.
livemode BOOLEAN
If the object exists in live mode, the value is true.
merchant_amount BIGINT
The total amount that was authorized or rejected. (minor units)
merchant_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
merchant_currency VARCHAR
The local currency that was presented to the cardholder for the authorization.
merchant_data JSON
The merchant data field of the issuing.authorization object.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
network_data JSON
Details about the authorization, such as identifiers, set by the card network.
pending_request JSON
The pending authorization request.
request_history JSON
History of every time a pending_request authorization was approved/declined, either by you directly or by Stripe (e.g.
status VARCHAR
The current status of the authorization in its lifecycle. One of: closed, expired, pending, reversed.
token VARCHAR
Token object used for this authorization.
transactions JSON
List of transactions associated with this authorization.
treasury JSON
Treasury details related to this authorization if it was created on a FinancialAccount.
verification_data JSON
The verification data field of the issuing.authorization object.
verified_by_fraud_challenge BOOLEAN
Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization…
wallet VARCHAR
The digital wallet used for this transaction.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count authorizations by status

SELECT status, count(*) AS n
FROM stripe.issuing.authorizations()
GROUP BY status
ORDER BY n DESC, status;
Link
cardholders (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Issuing Cardholder objects. (GET /v1/issuing/cardholders)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
billing JSON
The billing field of the issuing.cardholder object.
company JSON
Additional information about a company cardholder.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
email VARCHAR
The cardholder's email address.
individual JSON
Additional information about an individual cardholder.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The cardholder's name.
phone_number VARCHAR
The cardholder's phone number.
preferred_locales VARCHAR[]
The cardholder’s preferred locales (languages), ordered by preference.
requirements JSON
The requirements field of the issuing.cardholder object.
spending_controls JSON
Rules that control spending across this cardholder's cards.
status VARCHAR
Specifies whether to permit authorizations on this cardholder's cards. One of: active, blocked, inactive.
type VARCHAR
One of individual or company. One of: company, individual.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count cardholders by status

SELECT status, count(*) AS n
FROM stripe.issuing.cardholders()
GROUP BY status
ORDER BY n DESC, status;
Link
cards (cardholder := VARCHAR, exp_month := BIGINT, exp_year := BIGINT, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Issuing Card objects. (GET /v1/issuing/cards)

Named arguments
cardholder := VARCHAR
Only return cards belonging to the Cardholder with the provided ID. (Stripe parameter cardholder) · default null
exp_month := BIGINT
Only return cards that have the given expiration month. (Stripe parameter exp_month) · default null
exp_year := BIGINT
Only return cards that have the given expiration year. (Stripe parameter exp_year) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
brand VARCHAR
The brand of the card.
cancellation_reason VARCHAR
The reason why the card was canceled. One of: design_rejected, fulfillment_error, lost, stolen.
cardholder JSON
An Issuing Cardholder object represents an individual or business entity who is issued cards.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
exp_month BIGINT
The expiration month of the card.
exp_year BIGINT
The expiration year of the card.
financial_account VARCHAR
The financial account this card is attached to.
last4 VARCHAR
The last 4 digits of the card number.
latest_fraud_warning JSON
Stripe’s assessment of whether this card’s details have been compromised.
lifecycle_controls JSON
Rules that control the lifecycle of this card, such as automatic cancellation.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
personalization_design VARCHAR
The personalization design object belonging to this card.
replaced_by VARCHAR
The latest card that replaces this card, if any.
replacement_for VARCHAR
The card this card replaces, if any.
replacement_reason VARCHAR
The reason why the previous card needed to be replaced. One of: damaged, expired, fulfillment_error, lost, stolen.
second_line VARCHAR
Text separate from cardholder name, printed on the card.
shipping JSON
Where and how the card will be shipped.
spending_controls JSON
The spending controls field of the issuing.card object.
status VARCHAR
Whether authorizations can be approved on this card. One of: active, canceled, inactive.
type VARCHAR
The type of the card. One of: physical, virtual.
wallets JSON
Information relating to digital wallets (like Apple Pay and Google Pay).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count cards by status

SELECT status, count(*) AS n
FROM stripe.issuing.cards()
GROUP BY status
ORDER BY n DESC, status;
Link
disputes (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Issuing Dispute objects. (GET /v1/issuing/disputes)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Disputed amount in the card's currency and in the smallest currency unit. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transactions JSON
List of balance transactions associated with the dispute.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
The currency the transaction was made in.
evidence JSON
The evidence field of the issuing.dispute object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
loss_reason VARCHAR
The enum that describes the dispute loss outcome.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
status VARCHAR
Current status of the dispute. One of: expired, lost, submitted, unsubmitted, won.
transaction VARCHAR
The transaction being disputed.
treasury JSON
Treasury details related to this dispute if it was created on a FinancialAccount
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count disputes by status

SELECT status, count(*) AS n
FROM stripe.issuing.disputes()
GROUP BY status
ORDER BY n DESC, status;
Link
personalization_designs (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), preferences_is_default := BOOLEAN, preferences_is_platform_default := BOOLEAN, stripe_account := VARCHAR) 1 example

Returns a list of personalization design objects. (GET /v1/issuing/personalization_designs)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
preferences_is_default := BOOLEAN
Only return personalization designs with the given preferences. (Stripe parameter preferences[is_default]) · default null
preferences_is_platform_default := BOOLEAN
Only return personalization designs with the given preferences. (Stripe parameter preferences[is_platform_default]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
card_logo VARCHAR
The file for the card logo to use with physical bundles that support card logos.
carrier_text JSON
Hash containing carrier text, for use with physical bundles that support carrier text.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
livemode BOOLEAN
If the object exists in live mode, the value is true.
lookup_key VARCHAR
A lookup key used to retrieve personalization designs dynamically from a static string.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
Friendly display name.
physical_bundle VARCHAR
The physical bundle object belonging to this personalization design.
preferences STRUCT of 2 fields
The preferences field of the issuing.personalization_design object.
STRUCT 2 fields
  • is_defaultBOOLEAN
  • is_platform_defaultBOOLEAN
rejection_reasons JSON
The rejection reasons field of the issuing.personalization_design object.
status VARCHAR
Whether this personalization design can be used to create cards. One of: active, inactive, rejected, review.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count personalization designs by status

SELECT status, count(*) AS n
FROM stripe.issuing.personalization_designs()
GROUP BY status
ORDER BY n DESC, status;
Link
physical_bundles (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of physical bundle objects. (GET /v1/issuing/physical_bundles)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
features STRUCT of 3 fields
The features field of the issuing.physical_bundle object.
STRUCT 3 fields
  • card_logoVARCHAR
  • carrier_textVARCHAR
  • second_lineVARCHAR
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
Friendly display name.
status VARCHAR
Whether this physical bundle can be used to create cards. One of: active, inactive, review.
type VARCHAR
Whether this physical bundle is a standard Stripe offering or custom-made for you. One of: custom, standard.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count physical bundles by status

SELECT status, count(*) AS n
FROM stripe.issuing.physical_bundles()
GROUP BY status
ORDER BY n DESC, status;
Link
settlements (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), settlement_id := VARCHAR, stripe_account := VARCHAR) 1 example

Retrieves an Issuing Settlement object. (GET /v1/issuing/settlements/{settlement})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
settlement_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
bin VARCHAR
The Bank Identification Number reflecting this settlement record.
clearing_date TIMESTAMP WITH TIME ZONE
The date that the transactions are cleared and posted to user's accounts.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
interchange_fees_amount BIGINT
The total interchange received as reimbursement for the transactions. (minor units)
interchange_fees_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
net_total_amount BIGINT
The total net amount required to settle with the network. (minor units)
net_total_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
network VARCHAR
The card network for this settlement report. One of: maestro, mastercard, visa.
network_fees_amount BIGINT
The total amount of fees owed to the network. (minor units)
network_fees_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
network_settlement_identifier VARCHAR
The Settlement Identification Number assigned by the network.
settlement_service VARCHAR
One of international or uk_national_net.
status VARCHAR
The current processing status of this settlement. One of: complete, pending.
transaction_amount BIGINT
The total transaction amount reflected in this settlement. (minor units)
transaction_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
transaction_count BIGINT
The total number of transactions reflected in this settlement.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the settlements (/v1/issuing/settlements/{settlement})

SELECT id, bin, clearing_date, created
FROM stripe.issuing.settlements(settlement_id := 'id_…');
Link
tokens (card_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all Issuing Token objects for a given card. (GET /v1/issuing/tokens)

Named arguments
card_id := VARCHAR
Read only this parent's rows (card id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
card VARCHAR
Parent card id this row belongs to.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
device_fingerprint VARCHAR
The hashed ID derived from the device ID from the card network associated with the token.
last4 VARCHAR
The last four digits of the token.
livemode BOOLEAN
If the object exists in live mode, the value is true.
network VARCHAR
The token service provider / card network associated with the token. One of: mastercard, visa.
network_data JSON
The network data field of the issuing.token object.
network_updated_at TIMESTAMP WITH TIME ZONE
Time at which the token was last updated by the card network.
status VARCHAR
The usage state of the token. One of: active, deleted, requested, suspended.
wallet_provider VARCHAR
The digital wallet for this token, if one was used. One of: apple_pay, google_pay, samsung_pay.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count tokens by status

SELECT status, count(*) AS n
FROM stripe.issuing.tokens()
GROUP BY status
ORDER BY n DESC, status;
Link
transactions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Issuing Transaction objects. (GET /v1/issuing/transactions)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
The transaction amount, which will be reflected in your balance. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_details JSON
Detailed breakdown of amount components.
authorization VARCHAR
The Authorization object that led to this transaction.
balance_transaction VARCHAR
ID of the balance transaction associated with this transaction.
card VARCHAR
The card used to make this transaction.
cardholder VARCHAR
The cardholder to whom this transaction belongs.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
dispute VARCHAR
If you've disputed the transaction, the ID of the dispute.
livemode BOOLEAN
If the object exists in live mode, the value is true.
merchant_amount BIGINT
The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. (minor units)
merchant_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
merchant_currency VARCHAR
The currency with which the merchant is taking payment.
merchant_data JSON
The merchant data field of the issuing.transaction object.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
network_data JSON
Details about the transaction, such as processing dates, set by the card network.
purchase_details JSON
Additional purchase information that is optionally provided by the merchant.
token VARCHAR
Token object used for this transaction.
treasury JSON
Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
type VARCHAR
The nature of the transaction. One of: capture, refund.
wallet VARCHAR
The digital wallet used for this transaction. One of: apple_pay, google_pay, samsung_pay.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transactions by type

SELECT type, count(*) AS n
FROM stripe.issuing.transactions()
GROUP BY type
ORDER BY n DESC, type;
Link
main 31 functions

Curated Stripe tables for everyday analysis: payments, balance and payouts, customers, billing, the product catalog, Connect and the event feed.

Schema examples (12)
Examples (12)

Funds available to pay out, per currency

SELECT currency, amount_decimal
FROM stripe.main.balance()
WHERE bucket = 'available'
ORDER BY currency;

Fees and net by transaction type since 1 November (the date range is pushed down)

SELECT type, currency, sum(fee_decimal) AS fees, sum(net_decimal) AS net
FROM stripe.main.balance_transactions()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY ALL
ORDER BY type, currency;

Paid payouts arriving since 1 November (both filters push down)

SELECT id, amount_decimal, currency, arrival_date
FROM stripe.main.payouts()
WHERE status = 'paid' AND arrival_date >= TIMESTAMPTZ '2026-11-01'
ORDER BY arrival_date;

Gross volume per currency (status uses Stripe Search)

SELECT currency, count(*) AS charges, sum(amount_decimal) AS gross
FROM stripe.main.charges()
WHERE status = 'succeeded'
GROUP BY currency
ORDER BY currency;
8 more examples

Charges with Stripe fee and net (projecting fee expands the balance transaction)

SELECT id, amount_decimal, fee_decimal, net_decimal
FROM stripe.main.charges()
WHERE created >= TIMESTAMPTZ '2026-11-01'
ORDER BY id;

PaymentIntent funnel since 1 November

SELECT status, count(*) AS intents
FROM stripe.main.payment_intents()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY status
ORDER BY intents DESC;

Refunded amount by reason and currency

SELECT reason, currency, sum(amount_decimal) AS refunded
FROM stripe.main.refunds()
WHERE status = 'succeeded'
GROUP BY ALL
ORDER BY reason, currency;

Disputes awaiting a response, by deadline

SELECT id, reason, amount_decimal, currency, evidence_due_by
FROM stripe.main.disputes()
WHERE status IN ('needs_response', 'warning_needs_response')
ORDER BY evidence_due_by;

Actionable early fraud warnings by fraud type

SELECT fraud_type, count(*) AS warnings
FROM stripe.main.early_fraud_warnings()
WHERE actionable
GROUP BY fraud_type
ORDER BY fraud_type;

Checkout conversion: complete vs expired sessions

SELECT status, count(*) AS sessions
FROM stripe.main.checkout_sessions()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY status
ORDER BY status;

Look a customer up by exact email (list API email parameter)

SELECT id, name, created
FROM stripe.main.customers()
WHERE email = '[email protected]';

Customers by country

SELECT address_country, count(*) AS customers
FROM stripe.main.customers()
GROUP BY address_country
ORDER BY customers DESC;
Table functions
accounts (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Connect connected accounts with onboarding and capability state

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Account id (acct_…).
type VARCHAR
standard, express, custom or none.
business_type VARCHAR
individual, company, non_profit or government_entity.
country VARCHAR
Account country (ISO 2).
default_currency VARCHAR
Default settlement currency.
email VARCHAR
Account email.
business_name VARCHAR
Public business name.
business_url VARCHAR
Business website.
mcc VARCHAR
Merchant category code.
charges_enabled BOOLEAN
Whether it can create charges.
payouts_enabled BOOLEAN
Whether Stripe can pay it out.
details_submitted BOOLEAN
Whether onboarding details were submitted.
requirements_currently_due VARCHAR[]
Requirement fields due now.
requirements_disabled_reason VARCHAR
Why the account is disabled, if it is.
created TIMESTAMP WITH TIME ZONE
When the account was created.
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Connected accounts that cannot be paid out yet

SELECT id, business_name, country
FROM stripe.main.accounts()
WHERE NOT payouts_enabled
ORDER BY id;
Link
application_fees (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Connect application fees collected by the platform on connected-account charges

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Application fee id (fee_…).
account VARCHAR
Connected account id (acct_…) charged the fee.
charge VARCHAR
Charge id the fee was taken from.
amount BIGINT
Fee amount. (minor units)
amount_decimal DECIMAL(38,3)
Fee amount. (major units, exact)
amount_refunded BIGINT
Amount of the fee refunded. (minor units)
amount_refunded_decimal DECIMAL(38,3)
Amount of the fee refunded. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
refunded BOOLEAN
Whether fully refunded.
application VARCHAR
Connect application id (ca_…).
originating_transaction VARCHAR
Charge on the connected account that created the fee.
balance_transaction VARCHAR
Balance transaction id (txn_…).
created TIMESTAMP WITH TIME ZONE
When the fee was created.
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Net platform fees per connected account

SELECT account, currency,
  sum(amount_decimal - amount_refunded_decimal) AS net_fees
FROM stripe.main.application_fees()
GROUP BY ALL
ORDER BY account;
Link
balance (stripe_account := VARCHAR) 1 example

The account's current Stripe balance, one row per balance bucket and currency

Named arguments
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
bucket VARCHAR
available, pending, connect_reserved, instant_available, issuing_available or refund_and_dispute_prefunding_available/pending.
currency VARCHAR
Three-letter ISO currency code, lowercase.
amount BIGINT
Balance in this bucket and currency. (minor units)
amount_decimal DECIMAL(38,3)
Balance in this bucket and currency. (major units, exact)
source_card BIGINT
Portion of the amount from card payments (minor units).
source_bank_account BIGINT
Portion of the amount from bank debits (minor units).
source_fpx BIGINT
Portion of the amount from FPX payments (minor units).
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Funds available to pay out, per currency

SELECT currency, amount_decimal
FROM stripe.main.balance()
WHERE bucket = 'available'
ORDER BY currency;
Link
balance_transactions (expand := VARCHAR[], payout := VARCHAR, stripe_account := VARCHAR) 1 example

Balance transactions: every movement of funds with its amount, Stripe fee and net

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
payout := VARCHAR
Only transactions paid out in this automatic payout (po_…). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Balance transaction id (txn_…).
type VARCHAR
Transaction type: charge, refund, payout, transfer, application_fee, stripe_fee, adjustment, payment …
reporting_category VARCHAR
Stripe's reporting category (charge, refund, fee, payout, transfer …), for summaries.
status VARCHAR
available or pending.
amount BIGINT
Gross amount of the transaction. (minor units)
amount_decimal DECIMAL(38,3)
Gross amount of the transaction. (major units, exact)
fee BIGINT
Fees paid for this transaction. (minor units)
fee_decimal DECIMAL(38,3)
Fees paid for this transaction. (major units, exact)
net BIGINT
Net impact on the balance (amount - fee). (minor units)
net_decimal DECIMAL(38,3)
Net impact on the balance (amount - fee). (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
exchange_rate DOUBLE
Exchange rate used when the transaction converted currencies.
description VARCHAR
Description of the transaction.
source VARCHAR
Id of the object that caused it (ch_…, re_…, po_…, tr_…).
balance_type VARCHAR
Which balance it affects: payments, issuing, refund_and_dispute_prefunding or risk_reserved.
fee_details JSON
Fee breakdown: list of {amount, currency, type, description, application}.
created TIMESTAMP WITH TIME ZONE
When the balance transaction was created.
available_on TIMESTAMP WITH TIME ZONE
When the funds become available.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Fees and net by transaction type since 1 November (the date range is pushed down)

SELECT type, currency, sum(fee_decimal) AS fees, sum(net_decimal) AS net
FROM stripe.main.balance_transactions()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY ALL
ORDER BY type, currency;
Link
billing_meters (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Billing meters: usage events aggregated for usage-based prices

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Meter id (mtr_…).
display_name VARCHAR
Meter name.
event_name VARCHAR
Meter event name your integration sends.
status VARCHAR
active or inactive.
aggregation_formula VARCHAR
sum, count or last.
event_time_window VARCHAR
day or hour pre-aggregation window, if set.
customer_payload_key VARCHAR
Event payload key holding the customer id.
value_payload_key VARCHAR
Event payload key holding the value.
created TIMESTAMP WITH TIME ZONE
When the meter was created.
updated TIMESTAMP WITH TIME ZONE
When the meter last changed.
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Active billing meters

SELECT display_name, event_name, aggregation_formula
FROM stripe.main.billing_meters()
WHERE status = 'active'
ORDER BY display_name;
Link
charges (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 2 examples

Charges: card and other payments with amounts, outcome, card brand/last4 and refunds

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Charge id (ch_…/py_…).
status VARCHAR
succeeded, pending or failed.
amount BIGINT
Charge amount. (minor units)
amount_decimal DECIMAL(38,3)
Charge amount. (major units, exact)
amount_captured BIGINT
Captured. (minor units)
amount_captured_decimal DECIMAL(38,3)
Captured. (major units, exact)
amount_refunded BIGINT
Refunded. (minor units)
amount_refunded_decimal DECIMAL(38,3)
Refunded. (major units, exact)
currency VARCHAR
ISO currency, lowercase.
customer VARCHAR
Customer id.
payment_intent VARCHAR
PaymentIntent id.
payment_method VARCHAR
PaymentMethod id.
payment_method_type VARCHAR
card, sepa_debit, link …
description VARCHAR
Description.
captured BOOLEAN
Captured?
paid BOOLEAN
Succeeded or authorized?
refunded BOOLEAN
Fully refunded?
disputed BOOLEAN
Disputed?
failure_code VARCHAR
Decline code (card_declined …).
failure_message VARCHAR
Failure reason.
outcome_type VARCHAR
authorized, manual_review, issuer_declined, blocked, invalid.
outcome_risk_level VARCHAR
Radar risk: normal, elevated, highest.
outcome_risk_score BIGINT
Radar risk score 0-100.
outcome_seller_message VARCHAR
Outcome explanation.
card_brand VARCHAR
Card brand (visa, amex …).
card_last4 VARCHAR
Card last four digits.
card_exp_month BIGINT
Card expiry month.
card_exp_year BIGINT
Card expiry year.
card_funding VARCHAR
credit, debit, prepaid.
card_country VARCHAR
Card issuer country.
billing_email VARCHAR
Billing email.
billing_country VARCHAR
Billing country.
billing_postal_code VARCHAR
Billing postal code.
receipt_url VARCHAR
Hosted receipt.
transfer_group VARCHAR
Connect transfer group.
balance_transaction VARCHAR
Balance transaction id.
fee BIGINT
Stripe fee (settlement currency). (minor units)
fee_decimal DECIMAL(38,3)
Stripe fee (settlement currency). (major units, exact)
net BIGINT
Net to balance (settlement currency). (minor units)
net_decimal DECIMAL(38,3)
Net to balance (settlement currency). (major units, exact)
settlement_currency VARCHAR
Currency of fee and net.
available_on TIMESTAMP WITH TIME ZONE
When funds become available.
created TIMESTAMP WITH TIME ZONE
When the charge was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your metadata.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Examples (2)

Gross volume per currency (status uses Stripe Search)

SELECT currency, count(*) AS charges, sum(amount_decimal) AS gross
FROM stripe.main.charges()
WHERE status = 'succeeded'
GROUP BY currency
ORDER BY currency;

Charges with Stripe fee and net (projecting fee expands the balance transaction)

SELECT id, amount_decimal, fee_decimal, net_decimal
FROM stripe.main.charges()
WHERE created >= TIMESTAMPTZ '2026-11-01'
ORDER BY id;
Link
checkout_sessions (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Checkout Sessions: hosted checkout attempts with status, mode and totals

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Checkout Session id (cs_…).
status VARCHAR
open, complete or expired.
mode VARCHAR
payment, subscription or setup.
payment_status VARCHAR
paid, unpaid or no_payment_required.
customer VARCHAR
Customer id (cus_…), if any.
customer_email VARCHAR
Customer email collected or prefilled.
customer_name VARCHAR
Customer name collected.
amount_subtotal BIGINT
Total before discounts and taxes. (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Total before discounts and taxes. (major units, exact)
amount_total BIGINT
Total after discounts and taxes. (minor units)
amount_total_decimal DECIMAL(38,3)
Total after discounts and taxes. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
payment_intent VARCHAR
PaymentIntent id (pi_…) for payment mode.
subscription VARCHAR
Subscription id (sub_…) for subscription mode.
invoice VARCHAR
Invoice id (in_…), if one was created.
payment_link VARCHAR
Payment Link id (plink_…) that created the session.
client_reference_id VARCHAR
Your reference passed to Checkout.
locale VARCHAR
Checkout locale.
expires_at TIMESTAMP WITH TIME ZONE
When the session expires.
created TIMESTAMP WITH TIME ZONE
When the session was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Checkout conversion: complete vs expired sessions

SELECT status, count(*) AS sessions
FROM stripe.main.checkout_sessions()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY status
ORDER BY status;
Link
coupons (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Coupons: percent or amount discounts with duration and redemption counts

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Coupon id (your code or generated).
name VARCHAR
Name shown to customers.
percent_off DOUBLE
Percent discount (0-100), if a percentage coupon.
amount_off BIGINT
Fixed discount, if an amount coupon. (minor units)
amount_off_decimal DECIMAL(38,3)
Fixed discount, if an amount coupon. (major units, exact)
currency VARCHAR
Currency of amount_off.
duration VARCHAR
once, repeating or forever.
duration_in_months BIGINT
Months a repeating coupon applies.
max_redemptions BIGINT
Maximum redemptions.
times_redeemed BIGINT
Redemptions so far.
redeem_by TIMESTAMP WITH TIME ZONE
Last date it can be redeemed.
valid BOOLEAN
Whether it can still be applied.
created TIMESTAMP WITH TIME ZONE
When the coupon was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Valid coupons by popularity

SELECT id, name, percent_off, times_redeemed
FROM stripe.main.coupons()
WHERE valid
ORDER BY times_redeemed DESC;
Link
credit_notes (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Credit notes: adjustments and refunds against finalized invoices

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Credit note id (cn_…).
number VARCHAR
Credit note number.
status VARCHAR
issued or void.
type VARCHAR
pre_payment, post_payment or mixed.
reason VARCHAR
duplicate, fraudulent, order_change or product_unsatisfactory.
customer VARCHAR
Customer id (cus_…).
invoice VARCHAR
Invoice id (in_…).
currency VARCHAR
Three-letter ISO currency code, lowercase.
amount BIGINT
Credit amount (incl. tax). (minor units)
amount_decimal DECIMAL(38,3)
Credit amount (incl. tax). (major units, exact)
subtotal BIGINT
Amount before tax and discounts. (minor units)
subtotal_decimal DECIMAL(38,3)
Amount before tax and discounts. (major units, exact)
total BIGINT
Total amount credited. (minor units)
total_decimal DECIMAL(38,3)
Total amount credited. (major units, exact)
out_of_band_amount BIGINT
Amount credited outside Stripe. (minor units)
out_of_band_amount_decimal DECIMAL(38,3)
Amount credited outside Stripe. (major units, exact)
memo VARCHAR
Customer-facing memo.
effective_at TIMESTAMP WITH TIME ZONE
When the credit note took effect.
voided_at TIMESTAMP WITH TIME ZONE
When it was voided.
pdf VARCHAR
Credit note PDF link.
created TIMESTAMP WITH TIME ZONE
When the credit note was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Credited amount by reason

SELECT reason, currency, sum(total_decimal) AS credited
FROM stripe.main.credit_notes()
WHERE status = 'issued'
GROUP BY ALL
ORDER BY reason;
Link
customers (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 2 examples

Customers with contact details, balance, delinquency and address

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Customer id (cus_…).
email VARCHAR
Customer email.
name VARCHAR
Customer or business name.
phone VARCHAR
Phone number.
description VARCHAR
Description.
currency VARCHAR
Default currency for recurring billing.
balance BIGINT
Customer credit balance applied to future invoices (negative = credit). (minor units)
balance_decimal DECIMAL(38,3)
Customer credit balance applied to future invoices (negative = credit). (major units, exact)
delinquent BOOLEAN
True if the latest invoice payment failed or is overdue.
default_source VARCHAR
Default legacy payment source id.
default_payment_method VARCHAR
Default PaymentMethod for invoices (pm_…).
invoice_prefix VARCHAR
Prefix for invoice numbers.
tax_exempt VARCHAR
none, exempt or reverse.
address_country VARCHAR
Address country (ISO 2).
address_state VARCHAR
Address state or region.
address_city VARCHAR
Address city.
address_postal_code VARCHAR
Address postal code.
preferred_locales VARCHAR[]
Preferred locales for emails and invoices.
test_clock VARCHAR
Test clock id, for test-mode simulations.
created TIMESTAMP WITH TIME ZONE
When the customer was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Examples (2)

Look a customer up by exact email (list API email parameter)

SELECT id, name, created
FROM stripe.main.customers()
WHERE email = '[email protected]';

Customers by country

SELECT address_country, count(*) AS customers
FROM stripe.main.customers()
GROUP BY address_country
ORDER BY customers DESC;
Link
disputes (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Disputes (chargebacks) with status, reason, amount and evidence deadline

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Dispute id (dp_… or du_…).
status VARCHAR
warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, lost or prevented.
reason VARCHAR
fraudulent, product_not_received, duplicate, subscription_canceled, credit_not_processed, general …
amount BIGINT
Disputed amount (usually the full charge). (minor units)
amount_decimal DECIMAL(38,3)
Disputed amount (usually the full charge). (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
charge VARCHAR
Disputed charge id (ch_…).
payment_intent VARCHAR
PaymentIntent id (pi_…).
evidence_due_by TIMESTAMP WITH TIME ZONE
Deadline to submit evidence.
has_evidence BOOLEAN
Whether evidence has been staged.
past_due BOOLEAN
Whether the evidence deadline has passed.
submission_count BIGINT
Times evidence has been submitted.
is_charge_refundable BOOLEAN
Whether the charge can still be refunded instead.
card_brand VARCHAR
Card brand of the disputed payment.
network_reason_code VARCHAR
Card network's reason code.
created TIMESTAMP WITH TIME ZONE
When the dispute was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Disputes awaiting a response, by deadline

SELECT id, reason, amount_decimal, currency, evidence_due_by
FROM stripe.main.disputes()
WHERE status IN ('needs_response', 'warning_needs_response')
ORDER BY evidence_due_by;
Link
early_fraud_warnings (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Radar early fraud warnings: issuer fraud reports that often precede a dispute

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Early fraud warning id (issfr_…).
fraud_type VARCHAR
card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc or unauthorized_use_of_card.
actionable BOOLEAN
Whether refunding the charge can still avert a dispute.
charge VARCHAR
Charge id (ch_…).
payment_intent VARCHAR
PaymentIntent id (pi_…).
created TIMESTAMP WITH TIME ZONE
When the warning was created.
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Actionable early fraud warnings by fraud type

SELECT fraud_type, count(*) AS warnings
FROM stripe.main.early_fraud_warnings()
WHERE actionable
GROUP BY fraud_type
ORDER BY fraud_type;
Link
events (expand := VARCHAR[], stripe_account := VARCHAR) 2 examples

Events: the account's change and audit feed (last 30 days)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Event id (evt_…).
type VARCHAR
Event type, e.g. charge.succeeded or customer.subscription.deleted.
created TIMESTAMP WITH TIME ZONE
When the event was created.
object_type VARCHAR
Type of the affected object (charge, invoice, customer …).
object_id VARCHAR
Id of the affected object.
data_object JSON
The affected object as of the event (secrets redacted).
previous_attributes JSON
For *.updated events, the changed fields' previous values.
api_version VARCHAR
API version used to render the event data.
request_id VARCHAR
API request id that caused the event (NULL for automatic events).
idempotency_key VARCHAR
Idempotency key of that request.
pending_webhooks BIGINT
Webhook deliveries not yet successful.
account VARCHAR
Connected account the event is for (Connect).
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Examples (2)

Event volume by type since 1 November

SELECT type, count(*) AS events
FROM stripe.main.events()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY type
ORDER BY events DESC;

Invoice events only (pushed down as the invoice.* wildcard)

SELECT created, type, object_id
FROM stripe.main.events()
WHERE starts_with(type, 'invoice.')
ORDER BY created;
Link
files (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Files uploaded to or generated by Stripe (metadata only, not contents)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
File id (file_…).
purpose VARCHAR
dispute_evidence, identity_document, finance_report_run, …
filename VARCHAR
Original file name.
title VARCHAR
Title.
type VARCHAR
File type: pdf, csv, png, jpg, …
size BIGINT
Size in bytes.
expires_at TIMESTAMP WITH TIME ZONE
When the file expires.
url VARCHAR
API URL for the contents (requires your key).
created TIMESTAMP WITH TIME ZONE
When the file was created.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Files by purpose and total size

SELECT purpose, count(*) AS files, sum(size) AS bytes
FROM stripe.main.files()
GROUP BY purpose
ORDER BY purpose;
Link
invoice_items (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Invoice items: one-off and pending charges added to a customer's next invoice

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Invoice item id (ii_…).
customer VARCHAR
Customer id (cus_…).
invoice VARCHAR
Invoice id (in_…), NULL while pending.
pending BOOLEAN
True while the item is not yet on an invoice.
amount BIGINT
Amount (quantity × unit price). (minor units)
amount_decimal DECIMAL(38,3)
Amount (quantity × unit price). (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
description VARCHAR
Description.
quantity BIGINT
Quantity.
price VARCHAR
Price id (price_…).
subscription VARCHAR
Subscription id (sub_…), if any.
proration BOOLEAN
Whether it is a proration.
discountable BOOLEAN
Whether discounts apply.
date TIMESTAMP WITH TIME ZONE
When the invoice item was created.
period_start TIMESTAMP WITH TIME ZONE
Start of the period.
period_end TIMESTAMP WITH TIME ZONE
End of the period.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Pending (not yet invoiced) items per customer

SELECT customer, sum(amount_decimal) AS pending_total, currency
FROM stripe.main.invoice_items()
WHERE pending
GROUP BY ALL
ORDER BY customer;
Link
invoice_line_items (expand := VARCHAR[], invoice_id := VARCHAR, stripe_account := VARCHAR) 1 example

Invoice line items: each charge on an invoice with price, product, period and amount

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
invoice_id := VARCHAR
Read only this invoice's lines (in_…). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Line item id (il_…).
invoice_id VARCHAR
Invoice id (in_…) the line belongs to.
description VARCHAR
Line description.
amount BIGINT
Line amount (quantity × unit price, before discounts and taxes). (minor units)
amount_decimal DECIMAL(38,3)
Line amount (quantity × unit price, before discounts and taxes). (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
quantity BIGINT
Quantity billed.
price VARCHAR
Price id (price_…).
product VARCHAR
Product id (prod_…).
unit_amount_decimal DECIMAL(38,12)
Unit price in the major unit with sub-minor-unit precision (DECIMAL(38,12)).
period_start TIMESTAMP WITH TIME ZONE
Start of the billed period.
period_end TIMESTAMP WITH TIME ZONE
End of the billed period.
subscription VARCHAR
Subscription id (sub_…), if any.
subscription_item VARCHAR
Subscription item id (si_…), if any.
invoice_item VARCHAR
Invoice item id (ii_…), if the line came from one.
proration BOOLEAN
Whether the line is a proration.
discountable BOOLEAN
Whether discounts apply to the line.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Billed amount per product across all invoices

SELECT product, currency, sum(amount_decimal) AS billed
FROM stripe.main.invoice_line_items()
GROUP BY ALL
ORDER BY product, currency;
Link
invoices (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 1 example

Invoices with status, totals, amounts due and paid, and lifecycle timestamps

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Invoice id (in_…).
number VARCHAR
Invoice number shown to the customer.
status VARCHAR
draft, open, paid, uncollectible or void.
collection_method VARCHAR
charge_automatically or send_invoice.
billing_reason VARCHAR
subscription_cycle, subscription_create, subscription_update, manual, upcoming …
customer VARCHAR
Customer id (cus_…).
customer_email VARCHAR
Customer email at finalization.
customer_name VARCHAR
Customer name at finalization.
subscription VARCHAR
Subscription id (sub_…) that produced the invoice, if any.
currency VARCHAR
Three-letter ISO currency code, lowercase.
total BIGINT
Total after discounts and taxes. (minor units)
total_decimal DECIMAL(38,3)
Total after discounts and taxes. (major units, exact)
subtotal BIGINT
Total before discounts and taxes. (minor units)
subtotal_decimal DECIMAL(38,3)
Total before discounts and taxes. (major units, exact)
amount_due BIGINT
Final amount due. (minor units)
amount_due_decimal DECIMAL(38,3)
Final amount due. (major units, exact)
amount_paid BIGINT
Amount paid. (minor units)
amount_paid_decimal DECIMAL(38,3)
Amount paid. (major units, exact)
amount_remaining BIGINT
Amount still due. (minor units)
amount_remaining_decimal DECIMAL(38,3)
Amount still due. (major units, exact)
attempt_count BIGINT
Payment attempts made.
attempted BOOLEAN
Whether payment was attempted.
auto_advance BOOLEAN
Whether Stripe automatically advances the invoice.
due_date TIMESTAMP WITH TIME ZONE
When payment is due (send_invoice).
period_start TIMESTAMP WITH TIME ZONE
Start of the usage period.
period_end TIMESTAMP WITH TIME ZONE
End of the usage period.
finalized_at TIMESTAMP WITH TIME ZONE
When it was finalized.
paid_at TIMESTAMP WITH TIME ZONE
When it was paid.
voided_at TIMESTAMP WITH TIME ZONE
When it was voided.
marked_uncollectible_at TIMESTAMP WITH TIME ZONE
When it was marked uncollectible.
next_payment_attempt TIMESTAMP WITH TIME ZONE
Next automatic payment attempt.
hosted_invoice_url VARCHAR
Hosted invoice page.
invoice_pdf VARCHAR
Invoice PDF link.
receipt_number VARCHAR
Receipt number.
description VARCHAR
Memo.
created TIMESTAMP WITH TIME ZONE
When the invoice was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Open invoices and what is still due

SELECT number, customer_email, amount_remaining_decimal, currency, due_date
FROM stripe.main.invoices()
WHERE status = 'open'
ORDER BY due_date;
Link
meter_event_summaries (meter_id VARCHAR, customer VARCHAR, start_time TIMESTAMP WITH TIME ZONE, end_time TIMESTAMP WITH TIME ZONE, expand := VARCHAR[], stripe_account := VARCHAR, value_grouping_window := VARCHAR) 1 example

Aggregated usage for one customer on one billing meter over a time window

Positional arguments
meter_id VARCHAR
Billing meter id (mtr_…).
customer VARCHAR
Customer id (cus_…) whose usage to sum.
start_time TIMESTAMP WITH TIME ZONE
Start of the window (inclusive), on a minute boundary.
end_time TIMESTAMP WITH TIME ZONE
End of the window (exclusive), on a minute boundary.
Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
value_grouping_window := VARCHAR
Split into 'hour' or 'day' buckets; NULL returns one total. · default null
Returns columns
id VARCHAR
Summary id.
meter VARCHAR
Meter id (mtr_…).
start_time TIMESTAMP WITH TIME ZONE
Start of this window (inclusive).
end_time TIMESTAMP WITH TIME ZONE
End of this window (exclusive).
aggregated_value DOUBLE
Aggregated usage in the window (sum, count or last per the meter).
livemode BOOLEAN
Live mode (false = test mode).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Daily API-call usage for one customer

SELECT start_time, aggregated_value
FROM stripe.main.meter_event_summaries('mtr_api_calls', 'cus_ada', TIMESTAMPTZ '2026-11-01', TIMESTAMPTZ '2026-11-04', value_grouping_window := 'day')
ORDER BY start_time;
Link
payment_intents (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 1 example

PaymentIntents: the lifecycle of each payment attempt, with status, amounts and last error

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
PaymentIntent id (pi_…).
status VARCHAR
requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled or succeeded.
amount BIGINT
Amount intended to be collected. (minor units)
amount_decimal DECIMAL(38,3)
Amount intended to be collected. (major units, exact)
amount_received BIGINT
Amount received. (minor units)
amount_received_decimal DECIMAL(38,3)
Amount received. (major units, exact)
amount_capturable BIGINT
Amount that can still be captured. (minor units)
amount_capturable_decimal DECIMAL(38,3)
Amount that can still be captured. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
customer VARCHAR
Customer id (cus_…), if any.
latest_charge VARCHAR
Latest charge id (ch_…).
payment_method VARCHAR
PaymentMethod id (pm_…).
payment_method_types VARCHAR[]
Payment method types this PaymentIntent may use.
capture_method VARCHAR
automatic, automatic_async or manual.
confirmation_method VARCHAR
automatic or manual.
setup_future_usage VARCHAR
on_session or off_session when the method is saved for reuse.
cancellation_reason VARCHAR
Why it was canceled (abandoned, duplicate, requested_by_customer, …).
canceled_at TIMESTAMP WITH TIME ZONE
When it was canceled.
last_payment_error_code VARCHAR
Error code of the last failed attempt.
last_payment_error_decline_code VARCHAR
Issuer decline code of the last failed attempt.
last_payment_error_message VARCHAR
Message of the last failed attempt.
description VARCHAR
Description.
receipt_email VARCHAR
Where the receipt is sent.
statement_descriptor VARCHAR
Statement descriptor.
application_fee_amount BIGINT
Connect application fee (minor units).
transfer_group VARCHAR
Connect transfer group.
created TIMESTAMP WITH TIME ZONE
When the PaymentIntent was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

PaymentIntent funnel since 1 November

SELECT status, count(*) AS intents
FROM stripe.main.payment_intents()
WHERE created >= TIMESTAMPTZ '2026-11-01'
GROUP BY status
ORDER BY intents DESC;
Link
payment_methods (customer_id := VARCHAR, expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Customers' saved payment methods: type, card brand, last4 and expiry (never full numbers)

Named arguments
customer_id := VARCHAR
Read only this customer's payment methods (cus_…). · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
PaymentMethod id (pm_…).
customer VARCHAR
Customer id (cus_…) the method is attached to.
type VARCHAR
card, us_bank_account, sepa_debit, link, …
card_brand VARCHAR
Card brand: visa, mastercard, amex, discover, jcb, diners, unionpay …
card_last4 VARCHAR
Last four digits of the card (Stripe never returns full card numbers).
card_exp_month BIGINT
Card expiry month (1-12).
card_exp_year BIGINT
Card expiry year (four digits).
card_funding VARCHAR
Card funding: credit, debit, prepaid or unknown.
card_country VARCHAR
Two-letter ISO country of the card issuer.
card_wallet VARCHAR
Wallet used for the card: apple_pay, google_pay, link …
card_display_brand VARCHAR
Brand shown to the customer (e.g. cartes_bancaires).
billing_name VARCHAR
Billing name.
billing_email VARCHAR
Billing email.
billing_postal_code VARCHAR
Billing postal code.
allow_redisplay VARCHAR
always, limited or unspecified.
created TIMESTAMP WITH TIME ZONE
When the payment method was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Saved cards that expire by the end of 2026

SELECT customer, card_brand, card_last4, card_exp_month, card_exp_year
FROM stripe.main.payment_methods()
WHERE type = 'card' AND card_exp_year <= 2026
ORDER BY customer;
Link
payouts (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Payouts to your bank account or debit card, with status and arrival date

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Payout id (po_…).
status VARCHAR
paid, pending, in_transit, canceled or failed.
amount BIGINT
Amount paid out. (minor units)
amount_decimal DECIMAL(38,3)
Amount paid out. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
arrival_date TIMESTAMP WITH TIME ZONE
Date the payout is expected to arrive.
automatic BOOLEAN
True for scheduled automatic payouts.
method VARCHAR
standard or instant.
type VARCHAR
bank_account or card.
destination VARCHAR
Bank account or card id (ba_… / card_…).
balance_transaction VARCHAR
Balance transaction id (txn_…).
failure_code VARCHAR
Why it failed (account_closed, insufficient_funds …).
failure_message VARCHAR
Failure explanation.
reconciliation_status VARCHAR
completed, in_progress or not_applicable.
source_type VARCHAR
Balance it came from: card, bank_account or fpx.
statement_descriptor VARCHAR
Descriptor on the bank statement.
description VARCHAR
Description.
created TIMESTAMP WITH TIME ZONE
When the payout was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Paid payouts arriving since 1 November (both filters push down)

SELECT id, amount_decimal, currency, arrival_date
FROM stripe.main.payouts()
WHERE status = 'paid' AND arrival_date >= TIMESTAMPTZ '2026-11-01'
ORDER BY arrival_date;
Link
prices (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 1 example

Prices: unit amounts, currency, one-time or recurring interval, per product

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Price id (price_…).
product VARCHAR
Product id (prod_…).
active BOOLEAN
Whether new purchases can use it.
currency VARCHAR
Three-letter ISO currency code, lowercase.
unit_amount BIGINT
Unit amount (NULL for tiered or custom prices). (minor units)
unit_amount_decimal DECIMAL(38,3)
Unit amount (NULL for tiered or custom prices). (major units, exact)
unit_amount_precise DECIMAL(38,12)
Unit amount in the major unit with sub-minor-unit precision.
type VARCHAR
one_time or recurring.
billing_scheme VARCHAR
per_unit or tiered.
recurring_interval VARCHAR
day, week, month or year.
recurring_interval_count BIGINT
Intervals between billings.
recurring_usage_type VARCHAR
licensed or metered.
recurring_meter VARCHAR
Billing meter id for metered prices.
lookup_key VARCHAR
Your lookup key for the price.
nickname VARCHAR
Internal nickname.
tax_behavior VARCHAR
inclusive, exclusive or unspecified.
tiers_mode VARCHAR
graduated or volume, for tiered prices.
created TIMESTAMP WITH TIME ZONE
When the price was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Monthly prices with their product names

SELECT p.id, pr.name, p.unit_amount_decimal, p.currency
FROM stripe.main.prices() p
JOIN stripe.main.products() pr ON pr.id = p.product
WHERE p.recurring_interval = 'month'
ORDER BY p.id;
Link
products (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 1 example

Products in the catalog: name, active state, default price and tax code

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Product id (prod_…).
name VARCHAR
Product name.
active BOOLEAN
Whether it can be sold.
description VARCHAR
Description.
default_price VARCHAR
Default price id (price_…).
shippable BOOLEAN
Whether it is a shipped good.
unit_label VARCHAR
Unit label shown on receipts and invoices (e.g. seat).
url VARCHAR
Product URL.
tax_code VARCHAR
Stripe Tax code id (txcd_…).
statement_descriptor VARCHAR
Statement descriptor.
images VARCHAR[]
Image URLs.
created TIMESTAMP WITH TIME ZONE
When the product was created.
updated TIMESTAMP WITH TIME ZONE
When the product last changed.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Active products

SELECT id, name FROM stripe.main.products() WHERE active ORDER BY name;
Link
promotion_codes (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Promotion codes: customer-facing codes for coupons, with restrictions

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Promotion code id (promo_…).
code VARCHAR
The code customers enter.
coupon VARCHAR
Coupon id the code applies.
active BOOLEAN
Whether it can be redeemed.
customer VARCHAR
Only this customer may redeem it.
expires_at TIMESTAMP WITH TIME ZONE
When it expires.
max_redemptions BIGINT
Maximum redemptions.
times_redeemed BIGINT
Redemptions so far.
first_time_transaction BOOLEAN
Only for a customer's first purchase.
minimum_amount BIGINT
Minimum order amount. (minor units)
minimum_amount_decimal DECIMAL(38,3)
Minimum order amount. (major units, exact)
minimum_amount_currency VARCHAR
Currency of minimum_amount.
created TIMESTAMP WITH TIME ZONE
When the promotion code was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Active promotion codes and their usage

SELECT code, coupon, times_redeemed
FROM stripe.main.promotion_codes()
WHERE active
ORDER BY code;
Link
refunds (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Refunds of charges and PaymentIntents, with status and reason

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Refund id (re_…).
status VARCHAR
pending, requires_action, succeeded, failed or canceled.
amount BIGINT
Amount refunded. (minor units)
amount_decimal DECIMAL(38,3)
Amount refunded. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
reason VARCHAR
duplicate, fraudulent, requested_by_customer or expired_uncaptured_charge.
charge VARCHAR
Refunded charge id (ch_…).
payment_intent VARCHAR
Refunded PaymentIntent id (pi_…).
failure_reason VARCHAR
Why the refund failed, if it did.
receipt_number VARCHAR
Refund receipt number.
description VARCHAR
Description.
balance_transaction VARCHAR
Balance transaction id (txn_…).
fee BIGINT
Stripe fees for this movement (from the expanded balance transaction), in the settlement currency. (minor units)
fee_decimal DECIMAL(38,3)
Stripe fees for this movement (from the expanded balance transaction), in the settlement currency. (major units, exact)
net BIGINT
Net amount credited or debited to your balance (from the expanded balance transaction), in the settlement currency. (minor units)
net_decimal DECIMAL(38,3)
Net amount credited or debited to your balance (from the expanded balance transaction), in the settlement currency. (major units, exact)
settlement_currency VARCHAR
Currency of fee and net (the balance transaction's currency).
available_on TIMESTAMP WITH TIME ZONE
When the funds become available in your balance (balance transaction).
created TIMESTAMP WITH TIME ZONE
When the refund was created.
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Refunded amount by reason and currency

SELECT reason, currency, sum(amount_decimal) AS refunded
FROM stripe.main.refunds()
WHERE status = 'succeeded'
GROUP BY ALL
ORDER BY reason, currency;
Link
subscription_items (expand := VARCHAR[], stripe_account := VARCHAR, subscription_id := VARCHAR) 1 example

Subscription items: each price on a subscription with quantity and current period

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
subscription_id := VARCHAR
Read only this subscription's items (sub_…). · default null
Returns columns
id VARCHAR
Subscription item id (si_…).
subscription_id VARCHAR
Subscription id (sub_…).
price VARCHAR
Price id (price_…).
product VARCHAR
Product id (prod_…).
quantity BIGINT
Quantity (e.g. seats).
unit_amount BIGINT
Price per unit. (minor units)
unit_amount_decimal DECIMAL(38,3)
Price per unit. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
interval VARCHAR
Billing interval: day, week, month or year.
interval_count BIGINT
Intervals between billings.
current_period_start TIMESTAMP WITH TIME ZONE
Start of the item's current period.
current_period_end TIMESTAMP WITH TIME ZONE
End of the item's current period.
created TIMESTAMP WITH TIME ZONE
When the subscription item was created.
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Recurring amount per product and interval

SELECT product, interval, sum(quantity * unit_amount_decimal) AS recurring,
  currency
FROM stripe.main.subscription_items()
GROUP BY ALL
ORDER BY product;
Link
subscription_schedules (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Subscription schedules: planned phase changes to subscriptions

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Schedule id (sub_sched_…).
status VARCHAR
not_started, active, completed, released or canceled.
customer VARCHAR
Customer id (cus_…).
subscription VARCHAR
Subscription id (sub_…) managed by the schedule.
end_behavior VARCHAR
release or cancel when the last phase ends.
current_phase_start TIMESTAMP WITH TIME ZONE
Start of the current phase.
current_phase_end TIMESTAMP WITH TIME ZONE
End of the current phase.
phase_count BIGINT
Number of phases.
phases JSON
The phases (items, dates, proration behaviour) as JSON.
canceled_at TIMESTAMP WITH TIME ZONE
When it was canceled.
completed_at TIMESTAMP WITH TIME ZONE
When it completed.
released_at TIMESTAMP WITH TIME ZONE
When it was released.
released_subscription VARCHAR
Subscription id released from the schedule.
created TIMESTAMP WITH TIME ZONE
When the schedule was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Schedules by status

SELECT status, count(*) AS schedules
FROM stripe.main.subscription_schedules()
GROUP BY status
ORDER BY status;
Link
subscriptions (expand := VARCHAR[], search := VARCHAR, stripe_account := VARCHAR) 1 example

Subscriptions (all statuses, canceled included) with periods, trial and cancellation

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Subscription id (sub_…).
status VARCHAR
active, trialing, past_due, unpaid, canceled, incomplete, incomplete_expired or paused.
customer VARCHAR
Customer id (cus_…).
collection_method VARCHAR
charge_automatically or send_invoice.
currency VARCHAR
Three-letter ISO currency code, lowercase.
current_period_start TIMESTAMP WITH TIME ZONE
Start of the current billing period.
current_period_end TIMESTAMP WITH TIME ZONE
End of the current billing period.
billing_cycle_anchor TIMESTAMP WITH TIME ZONE
Reference point for billing periods.
start_date TIMESTAMP WITH TIME ZONE
When the subscription started.
trial_start TIMESTAMP WITH TIME ZONE
Trial start.
trial_end TIMESTAMP WITH TIME ZONE
Trial end.
cancel_at_period_end BOOLEAN
Whether it cancels at the end of the period.
cancel_at TIMESTAMP WITH TIME ZONE
Scheduled cancellation time.
canceled_at TIMESTAMP WITH TIME ZONE
When cancellation was requested.
ended_at TIMESTAMP WITH TIME ZONE
When it ended.
cancellation_reason VARCHAR
cancellation_requested, payment_failed or payment_disputed.
cancellation_feedback VARCHAR
Customer feedback on cancellation.
days_until_due BIGINT
Days until due for send_invoice subscriptions.
default_payment_method VARCHAR
Default PaymentMethod id (pm_…).
latest_invoice VARCHAR
Most recent invoice id (in_…).
schedule VARCHAR
Subscription schedule id (sub_sched_…), if any.
price_ids VARCHAR[]
Price ids of the subscription's items.
item_count BIGINT
Number of items.
description VARCHAR
Description.
test_clock VARCHAR
Test clock id.
created TIMESTAMP WITH TIME ZONE
When the subscription was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Subscriptions by status (canceled included)

SELECT status, count(*) AS subscriptions
FROM stripe.main.subscriptions()
GROUP BY status
ORDER BY subscriptions DESC;
Link
tax_rates (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Tax rates: manually configured percentages by jurisdiction

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Tax rate id (txr_…).
display_name VARCHAR
Name shown on invoices (e.g. VAT).
description VARCHAR
Internal description.
percentage DOUBLE
Rate in percent.
effective_percentage DOUBLE
Rate actually applied (0 when not applicable).
inclusive BOOLEAN
Whether prices include this tax.
active BOOLEAN
Whether it can be applied to new objects.
country VARCHAR
Two-letter country.
state VARCHAR
State/region code.
jurisdiction VARCHAR
Jurisdiction label.
jurisdiction_level VARCHAR
country, state, county, city, district or multiple.
tax_type VARCHAR
vat, gst, sales_tax, hst, pst, qst, … or NULL.
rate_type VARCHAR
percentage or flat_amount.
created TIMESTAMP WITH TIME ZONE
When the tax rate was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Active tax rates by country

SELECT display_name, country, percentage
FROM stripe.main.tax_rates()
WHERE active
ORDER BY country;
Link
transfers (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Connect transfers from the platform balance to connected accounts

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Transfer id (tr_…).
destination VARCHAR
Connected account id (acct_…).
amount BIGINT
Amount transferred. (minor units)
amount_decimal DECIMAL(38,3)
Amount transferred. (major units, exact)
amount_reversed BIGINT
Amount reversed. (minor units)
amount_reversed_decimal DECIMAL(38,3)
Amount reversed. (major units, exact)
currency VARCHAR
Three-letter ISO currency code, lowercase.
reversed BOOLEAN
Whether fully reversed.
description VARCHAR
Description.
source_transaction VARCHAR
Charge id the transfer was funded from, if any.
destination_payment VARCHAR
Payment id created on the connected account (py_…).
source_type VARCHAR
card, bank_account or fpx.
transfer_group VARCHAR
Transfer group.
balance_transaction VARCHAR
Balance transaction id (txn_…).
created TIMESTAMP WITH TIME ZONE
When the transfer was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Net amount transferred to each connected account

SELECT destination, currency,
  sum(amount_decimal - amount_reversed_decimal) AS sent
FROM stripe.main.transfers()
GROUP BY ALL
ORDER BY destination;
Link
webhook_endpoints (expand := VARCHAR[], stripe_account := VARCHAR) 1 example

Webhook endpoints: host, status and subscribed event types (no secrets, no URL paths)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Webhook endpoint id (we_…).
url_host VARCHAR
Host of the endpoint URL (path and query dropped).
status VARCHAR
enabled or disabled.
enabled_events VARCHAR[]
Event types sent ('*' = all).
api_version VARCHAR
API version events are rendered with.
application VARCHAR
Connect application id, for Connect endpoints.
description VARCHAR
Description.
created TIMESTAMP WITH TIME ZONE
When the webhook endpoint was created.
livemode BOOLEAN
Live mode (false = test mode).
metadata MAP(VARCHAR, VARCHAR)
Your key/value metadata on the object (Stripe metadata), as a MAP.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Webhook endpoints and how many event types each receives

SELECT url_host, status, len(enabled_events) AS event_types
FROM stripe.main.webhook_endpoints()
ORDER BY url_host;
Link
payments 30 functions

Every payments read endpoint of the Stripe API: charges, PaymentIntents, SetupIntents, payment methods and their configuration, Checkout, Payment Links, Radar and payment records.

Schema examples (10)
Examples (10)

The ten most recent apple pay domains

SELECT id, created, domain_name
FROM stripe.payments.apple_pay_domains()
ORDER BY created DESC
LIMIT 10;

Key fields of the charge disputes (/v1/charges/{charge}/dispute)

SELECT id, charge, amount, created FROM stripe.payments.charge_disputes();

Count charge refunds by status

SELECT status, count(*) AS n
FROM stripe.payments.charge_refunds()
GROUP BY status
ORDER BY n DESC, status;

Count charges by status

SELECT status, count(*) AS n
FROM stripe.payments.charges()
GROUP BY status
ORDER BY n DESC, status;
6 more examples

Count checkout session line items by currency

SELECT currency, count(*) AS n
FROM stripe.payments.checkout_session_line_items()
GROUP BY currency
ORDER BY n DESC, currency;

Count checkout sessions by status

SELECT status, count(*) AS n
FROM stripe.payments.checkout_sessions()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the confirmation tokens (/v1/confirmation_tokens/{confirmation_token})

SELECT id, created, expires_at, livemode
FROM stripe.payments.confirmation_tokens(confirmation_token_id := 'id_…');

Count disputes by status

SELECT status, count(*) AS n
FROM stripe.payments.disputes()
GROUP BY status
ORDER BY n DESC, status;

The ten most recent forwarding requests

SELECT id, created, payment_method
FROM stripe.payments.forwarding_requests()
ORDER BY created DESC
LIMIT 10;

Key fields of the mandates (/v1/mandates/{mandate})

SELECT id, livemode, on_behalf_of, status
FROM stripe.payments.mandates(mandate_id := 'id_…');
Table functions
apple_pay_domains (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List apple pay domains. (GET /v1/apple_pay/domains)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
domain_name VARCHAR
The domain name field of the apple_pay_domain object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent apple pay domains

SELECT id, created, domain_name
FROM stripe.payments.apple_pay_domains()
ORDER BY created DESC
LIMIT 10;
Link
charge_disputes (charge_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieve a dispute for a specified charge. (GET /v1/charges/{charge}/dispute)

Named arguments
charge_id := VARCHAR
Read only this parent's rows (charge id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
charge VARCHAR
Parent charge id this row belongs to.
amount BIGINT
Disputed amount. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transactions JSON
List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
enhanced_eligibility_types VARCHAR[]
List of eligibility types that are included in enhanced_evidence.
evidence JSON
The evidence field of the dispute object.
evidence_details JSON
The evidence details field of the dispute object.
is_charge_refundable BOOLEAN
If true, it's still possible to refund the disputed payment.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_intent VARCHAR
ID of the PaymentIntent that's disputed.
payment_method_details JSON
The payment method details field of the dispute object.
reason VARCHAR
Reason given by cardholder for dispute.
status VARCHAR
The current status of a dispute. One of: lost, needs_response, prevented, under_review, warning_closed, warning_needs_response, warning_under_review, won.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the charge disputes (/v1/charges/{charge}/dispute)

SELECT id, charge, amount, created FROM stripe.payments.charge_disputes();
Link
charge_refunds (charge_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

You can see a list of the refunds belonging to a specific charge. (GET /v1/charges/{charge}/refunds)

Named arguments
charge_id := VARCHAR
Read only this parent's rows (charge id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
charge VARCHAR
Parent charge id this row belongs to.
amount BIGINT
Amount, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
Balance transaction that describes the impact on your account balance.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
ID of the customer of this refund.
customer_account VARCHAR
ID of the account of this refund.
description VARCHAR
An arbitrary string attached to the object.
destination_details JSON
The destination details field of the refund object.
failure_balance_transaction VARCHAR
After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
failure_reason VARCHAR
Provides the reason for the refund failure.
instructions_email VARCHAR
For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
next_action JSON
The next action field of the refund object.
payment_intent VARCHAR
ID of the PaymentIntent that's refunded.
payment_method VARCHAR
ID of the payment method associated with this refund.
pending_reason VARCHAR
Provides the reason for why the refund is pending. One of: charge_pending, insufficient_funds, processing.
presentment_details STRUCT of 2 fields
The presentment details field of the refund object.
STRUCT 2 fields
  • presentment_amountBIGINT
  • presentment_currencyVARCHAR
reason VARCHAR
Reason for the refund, which is either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally…
receipt_number VARCHAR
This is the transaction number that appears on email receipts sent for this refund.
source_transfer_reversal VARCHAR
The transfer reversal that's associated with the refund.
status VARCHAR
Status of the refund.
transfer_reversal VARCHAR
This refers to the transfer reversal object if the accompanying transfer reverses.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count charge refunds by status

SELECT status, count(*) AS n
FROM stripe.payments.charge_refunds()
GROUP BY status
ORDER BY n DESC, status;
Link
charges (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), search := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of charges you’ve previously created. (GET /v1/charges)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Amount intended to be collected by… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_captured BIGINT
Amount in cents (or local equivalent)… (minor units)
amount_captured_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_refunded BIGINT
Amount in cents (or local equivalent)… (minor units)
amount_refunded_decimal DECIMAL(38,3)
Same amount in major units (exact).
application VARCHAR
ID of the Connect application that…
application_fee VARCHAR
The application fee (if any) for the…
application_fee_amount BIGINT
The amount of the application fee (if… (minor units)
application_fee_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
ID of the balance transaction that…
calculated_statement_descriptor VARCHAR
The full statement descriptor that is…
captured BOOLEAN
If the charge was created without…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
ID of the customer this charge is for…
description VARCHAR
An arbitrary string attached to the…
disputed BOOLEAN
Whether the charge has been disputed.
failure_balance_transaction VARCHAR
ID of the balance transaction that…
failure_code VARCHAR
Error code explaining reason for…
failure_message VARCHAR
Message to user further explaining…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
on_behalf_of VARCHAR
The account (if any) the charge was…
paid BOOLEAN
true if the charge succeeded, or was…
payment_intent VARCHAR
ID of the PaymentIntent associated…
payment_method VARCHAR
ID of the payment method used in this…
receipt_email VARCHAR
This is the email address that the…
receipt_number VARCHAR
This is the transaction number that…
receipt_url VARCHAR
This is the URL to view the receipt…
refunded BOOLEAN
Whether the charge has been fully…
review VARCHAR
ID of the review associated with this…
source_transfer VARCHAR
The transfer ID which created this…
statement_descriptor VARCHAR
For a non-card charge, text that…
statement_descriptor_suffix VARCHAR
Provides information about a card…
status VARCHAR
The status of the payment is either…
transfer VARCHAR
ID of the transfer to the destination…
transfer_group VARCHAR
A string that identifies this…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count charges by status

SELECT status, count(*) AS n
FROM stripe.payments.charges()
GROUP BY status
ORDER BY n DESC, status;
Link
checkout_session_line_items (checkout_session_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. (GET /v1/checkout/sessions/{session}/line_items)

Named arguments
checkout_session_id := VARCHAR
Read only this parent's rows (checkout_session id); NULL fans out over every parent. · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
checkout_session VARCHAR
Parent checkout session id this row belongs to.
adjustable_quantity JSON
The adjustable quantity field of the item object.
amount_discount BIGINT
Total discount amount applied.
amount_subtotal BIGINT
Total before any discounts or taxes are applied. (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_tax BIGINT
Total tax amount applied. (minor units)
amount_tax_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total after discounts and taxes. (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
discounts JSON
The discounts applied to the line item.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
price JSON
The price used to generate the line item.
quantity BIGINT
The quantity of products being purchased.
taxes JSON
The taxes applied to the line item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count checkout session line items by currency

SELECT currency, count(*) AS n
FROM stripe.payments.checkout_session_line_items()
GROUP BY currency
ORDER BY n DESC, currency;
Link
checkout_sessions (customer_details_email := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Checkout Sessions. (GET /v1/checkout/sessions)

Named arguments
customer_details_email := VARCHAR
Only return the Checkout Sessions for the Customer details specified. (Stripe parameter customer_details[email]) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
adaptive_pricing JSON
Settings for price localization with…
after_expiration JSON
When set, provides configuration for…
allow_promotion_codes BOOLEAN
Enables user redeemable promotion codes.
amount_subtotal BIGINT
Total of all items before discounts or… (minor units)
amount_subtotal_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_total BIGINT
Total of all items after discounts and… (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
billing_address_collection VARCHAR
Describes whether Checkout should…
cancel_url VARCHAR
If set, Checkout displays a back…
client_reference_id VARCHAR
A unique string to reference the…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
The ID of the customer for this Session.
customer_account VARCHAR
The ID of the account for this Session.
customer_creation VARCHAR
Configure whether a Checkout Session…
customer_email VARCHAR
If provided, this value will be used…
expires_at TIMESTAMP WITH TIME ZONE
The timestamp at which the Checkout…
integration_identifier VARCHAR
The integration identifier for this…
invoice VARCHAR
ID of the invoice created by the…
livemode BOOLEAN
If the object exists in live mode, the…
locale VARCHAR
The IETF language tag of the locale…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
mode VARCHAR
The mode of the Checkout Session. One…
origin_context VARCHAR
Where the user is coming from. One of…
payment_intent VARCHAR
The ID of the PaymentIntent for…
payment_link VARCHAR
The ID of the Payment Link that…
payment_method_collection VARCHAR
Configure whether a Checkout Session…
payment_status VARCHAR
The payment status of the Checkout…
recovered_from VARCHAR
The ID of the original expired…
redirect_on_completion VARCHAR
This parameter applies to ui_mode…
return_url VARCHAR
Applies to Checkout Sessions with…
setup_intent VARCHAR
The ID of the SetupIntent for Checkout…
status VARCHAR
The status of the Checkout Session…
submit_type VARCHAR
Describes the type of transaction…
subscription VARCHAR
The ID of the Subscription for…
success_url VARCHAR
The URL the customer will be directed…
ui_mode VARCHAR
The UI mode of the Session. One of…
url VARCHAR
The URL to the Checkout Session.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count checkout sessions by status

SELECT status, count(*) AS n
FROM stripe.payments.checkout_sessions()
GROUP BY status
ORDER BY n DESC, status;
Link
confirmation_tokens (confirmation_token_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves an existing ConfirmationToken object (GET /v1/confirmation_tokens/{confirmation_token})

Named arguments
confirmation_token_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
expires_at TIMESTAMP WITH TIME ZONE
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
livemode BOOLEAN
If the object exists in live mode, the value is true.
mandate_data JSON
Data used for generating a Mandate.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_intent VARCHAR
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
payment_method_options JSON
Payment-method-specific configuration for this ConfirmationToken.
payment_method_preview JSON
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
return_url VARCHAR
Return URL used to confirm the Intent.
setup_future_usage VARCHAR
Indicates that you intend to make future payments with this ConfirmationToken's payment method. One of: off_session, on_session.
setup_intent VARCHAR
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
shipping JSON
Shipping information collected on this ConfirmationToken.
use_stripe_sdk BOOLEAN
Indicates whether the Stripe SDK is used to handle confirmation flow.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the confirmation tokens (/v1/confirmation_tokens/{confirmation_token})

SELECT id, created, expires_at, livemode
FROM stripe.payments.confirmation_tokens(confirmation_token_id := 'id_…');
Link
disputes (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your disputes. (GET /v1/disputes)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Disputed amount. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transactions JSON
List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
charge VARCHAR
ID of the charge that's disputed.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
enhanced_eligibility_types VARCHAR[]
List of eligibility types that are included in enhanced_evidence.
evidence JSON
The evidence field of the dispute object.
evidence_details JSON
The evidence details field of the dispute object.
is_charge_refundable BOOLEAN
If true, it's still possible to refund the disputed payment.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_intent VARCHAR
ID of the PaymentIntent that's disputed.
payment_method_details JSON
The payment method details field of the dispute object.
reason VARCHAR
Reason given by cardholder for dispute.
status VARCHAR
The current status of a dispute. One of: lost, needs_response, prevented, under_review, warning_closed, warning_needs_response, warning_under_review, won.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count disputes by status

SELECT status, count(*) AS n
FROM stripe.payments.disputes()
GROUP BY status
ORDER BY n DESC, status;
Link
forwarding_requests (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists all ForwardingRequest objects. (GET /v1/forwarding/requests)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_method VARCHAR
The PaymentMethod to insert into the forwarded request.
replacements VARCHAR[]
The field kinds to be replaced in the forwarded request.
request_context JSON
Context about the request from Stripe's servers to the destination endpoint.
request_details JSON
The request that was sent to the destination endpoint.
response_details JSON
The response that the destination endpoint returned to us.
url VARCHAR
The destination URL for the forwarded request.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent forwarding requests

SELECT id, created, payment_method
FROM stripe.payments.forwarding_requests()
ORDER BY created DESC
LIMIT 10;
Link
mandates (expand := VARCHAR[], mandate_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves a Mandate object. (GET /v1/mandates/{mandate})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
mandate_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
customer_acceptance JSON
The customer acceptance field of the mandate object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
multi_use STRUCT("amount" BIGINT, "currency" VARCHAR)
The multi use field of the mandate object.
on_behalf_of VARCHAR
The account (if any) that the mandate is intended for.
payment_method VARCHAR
ID of the payment method associated with this mandate.
payment_method_details JSON
The payment method details field of the mandate object.
single_use STRUCT("amount" BIGINT, "currency" VARCHAR)
The single use field of the mandate object.
status VARCHAR
The mandate status indicates whether or not you can use it to initiate a payment. One of: active, inactive, pending.
type VARCHAR
The type of the mandate. One of: multi_use, single_use.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the mandates (/v1/mandates/{mandate})

SELECT id, livemode, on_behalf_of, status
FROM stripe.payments.mandates(mandate_id := 'id_…');
Link
payment_attempt_records (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), payment_record_id := VARCHAR, stripe_account := VARCHAR) 1 example

List all the Payment Attempt Records attached to the specified Payment Record. (GET /v1/payment_attempt_records)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
payment_record_id := VARCHAR
Read only this parent's rows (payment_record id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
payment_record VARCHAR
Parent payment record id this row belongs to.
amount STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_authorized STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_canceled STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_failed STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_guaranteed STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_refunded STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_requested STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
application VARCHAR
ID of the Connect application that created the PaymentAttemptRecord.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer_details JSON
Customer information for this payment.
customer_presence VARCHAR
Indicates whether the customer was present in your checkout flow during this payment. One of: off_session, on_session.
description VARCHAR
An arbitrary string attached to the object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_method_details JSON
Information about the Payment Method debited for this payment.
processor_details JSON
Processor information associated with this payment.
reported_by VARCHAR
Indicates who reported the payment. One of: self, stripe.
shipping_details JSON
Shipping information for this payment.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent payment attempt records

SELECT id, payment_record, application
FROM stripe.payments.payment_attempt_records()
ORDER BY created DESC
LIMIT 10;
Link
payment_intent_line_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), payment_intent_id := VARCHAR, stripe_account := VARCHAR) 1 example

Lists all LineItems of a given PaymentIntent. (GET /v1/payment_intents/{intent}/amount_details_line_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
payment_intent_id := VARCHAR
Read only this parent's rows (payment_intent id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
payment_intent VARCHAR
Parent payment intent id this row belongs to.
discount_amount BIGINT
The discount applied on this line item represented in the smallest currency unit.
payment_method_options JSON
Payment method-specific information for line items.
product_code VARCHAR
The product code of the line item, such as an SKU.
product_name VARCHAR
The product name of the line item.
quantity BIGINT
The quantity of items.
tax JSON
Contains information about the tax on the item.
unit_cost BIGINT
The unit cost of the line item represented in the smallest currency unit.
unit_of_measure VARCHAR
A unit of measure for the line item, such as gallons, feet, meters, etc.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten payment intent line items by id

SELECT id, payment_intent, discount_amount
FROM stripe.payments.payment_intent_line_items()
ORDER BY id
LIMIT 10;
Link
payment_intents (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), search := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of PaymentIntents. (GET /v1/payment_intents)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
search := VARCHAR
Raw Stripe Search query (e.g. 'metadata["plan"]:"pro"'), ANDed with pushed filters. Uses the eventually consistent Search API. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
allowed_payment_method_types VARCHAR[]
The list of payment method types…
amount BIGINT
Amount intended to be collected by… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_capturable BIGINT
Amount that can be captured from this… (minor units)
amount_capturable_decimal DECIMAL(38,3)
Same amount in major units (exact).
amount_details JSON
The amount details field of the…
amount_received BIGINT
Amount that this PaymentIntent collects. (minor units)
amount_received_decimal DECIMAL(38,3)
Same amount in major units (exact).
application VARCHAR
ID of the Connect application that…
application_fee_amount BIGINT
The amount of the application fee (if… (minor units)
application_fee_amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
automatic_payment_methods JSON
Settings to configure compatible…
canceled_at TIMESTAMP WITH TIME ZONE
Populated when status is canceled…
cancellation_reason VARCHAR
Reason for cancellation of this…
capture_method VARCHAR
Controls when the funds will be…
confirmation_method VARCHAR
Describes whether we can confirm this…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in…
customer VARCHAR
ID of the Customer this PaymentIntent…
customer_account VARCHAR
ID of the Account representing the…
description VARCHAR
An arbitrary string attached to the…
excluded_payment_method_types VARCHAR[]
The list of payment method types to…
hooks JSON
The hooks field of the payment_intent…
last_payment_error JSON
The payment error encountered in the…
latest_charge VARCHAR
ID of the latest Charge object created…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
on_behalf_of VARCHAR
You can specify the settlement…
payment_method VARCHAR
ID of the payment method used in this…
payment_record VARCHAR
ID of the Payment Record object…
receipt_email VARCHAR
Email address that the receipt for the…
review VARCHAR
ID of the review associated with this…
setup_future_usage VARCHAR
Indicates that you intend to make…
statement_descriptor VARCHAR
Text that appears on the customer's…
statement_descriptor_suffix VARCHAR
Provides information about a card…
status VARCHAR
Status of this PaymentIntent, one of…
transfer_group VARCHAR
A string that identifies the resulting…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count payment intents by status

SELECT status, count(*) AS n
FROM stripe.payments.payment_intents()
GROUP BY status
ORDER BY n DESC, status;
Link
payment_method_configurations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List payment method configurations (GET /v1/payment_method_configurations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
acss_debit JSON
The acss debit field of the…
active BOOLEAN
Whether the configuration can be used…
affirm JSON
The affirm field of the…
afterpay_clearpay JSON
The afterpay clearpay field of the…
alipay JSON
The alipay field of the…
alma JSON
The alma field of the…
amazon_pay JSON
The amazon pay field of the…
apple_pay JSON
The apple pay field of the…
application VARCHAR
For child configs, the Connect…
au_becs_debit JSON
The au becs debit field of the…
bacs_debit JSON
The bacs debit field of the…
bancontact JSON
The bancontact field of the…
billie JSON
The billie field of the…
bizum JSON
The bizum field of the…
blik JSON
The blik field of the…
boleto JSON
The boleto field of the…
card JSON
The card field of the…
cartes_bancaires JSON
The cartes bancaires field of the…
cashapp JSON
The cashapp field of the…
crypto JSON
The crypto field of the…
customer_balance JSON
The customer balance field of the…
eps JSON
The eps field of the…
fpx JSON
The fpx field of the…
giropay JSON
The giropay field of the…
google_pay JSON
The google pay field of the…
grabpay JSON
The grabpay field of the…
ideal JSON
The ideal field of the…
is_default BOOLEAN
The default configuration is used…
jcb JSON
The jcb field of the…
kakao_pay JSON
The kakao pay field of the…
klarna JSON
The klarna field of the…
konbini JSON
The konbini field of the…
kr_card JSON
The kr card field of the…
link JSON
The link field of the…
livemode BOOLEAN
If the object exists in live mode, the…
mb_way JSON
The mb way field of the…
mobilepay JSON
The mobilepay field of the…
multibanco JSON
The multibanco field of the…
name VARCHAR
The configuration's name.
naver_pay JSON
The naver pay field of the…
nz_bank_account JSON
The nz bank account field of the…
oxxo JSON
The oxxo field of the…
p24 JSON
The p24 field of the…
parent VARCHAR
For child configs, the configuration's…
pay_by_bank JSON
The pay by bank field of the…
payco JSON
The payco field of the…
paynow JSON
The paynow field of the…
paypal JSON
The paypal field of the…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten payment method configurations by id

SELECT id, application, name
FROM stripe.payments.payment_method_configurations()
ORDER BY id
LIMIT 10;
Link
payment_method_domains (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Lists the details of existing payment method domains. (GET /v1/payment_method_domains)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amazon_pay JSON
Indicates the status of a specific payment method on a payment method domain.
apple_pay JSON
Indicates the status of a specific payment method on a payment method domain.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
domain_name VARCHAR
The domain name that this payment method domain object represents.
enabled BOOLEAN
Whether this payment method domain is enabled.
google_pay JSON
Indicates the status of a specific payment method on a payment method domain.
klarna JSON
Indicates the status of a specific payment method on a payment method domain.
link JSON
Indicates the status of a specific payment method on a payment method domain.
livemode BOOLEAN
If the object exists in live mode, the value is true.
paypal JSON
Indicates the status of a specific payment method on a payment method domain.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent payment method domains

SELECT id, created, domain_name
FROM stripe.payments.payment_method_domains()
ORDER BY created DESC
LIMIT 10;
Link
payment_methods (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of all PaymentMethods. (GET /v1/payment_methods)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
acss_debit STRUCT of 5 fields
The acss debit field of the…
STRUCT 5 fields
  • bank_nameVARCHAR
  • fingerprintVARCHAR
  • institution_numberVARCHAR
  • last4VARCHAR
  • transit_numberVARCHAR
affirm JSON
The affirm field of the payment_method…
afterpay_clearpay JSON
The afterpay clearpay field of the…
alipay JSON
The alipay field of the payment_method…
allow_redisplay VARCHAR
This field indicates whether this…
alma JSON
The alma field of the payment_method…
amazon_pay JSON
The amazon pay field of the…
au_becs_debit STRUCT of 3 fields
The au becs debit field of the…
STRUCT 3 fields
  • bsb_numberVARCHAR
  • fingerprintVARCHAR
  • last4VARCHAR
bacs_debit STRUCT of 3 fields
The bacs debit field of the…
STRUCT 3 fields
  • fingerprintVARCHAR
  • last4VARCHAR
  • sort_codeVARCHAR
bancontact JSON
The bancontact field of the…
billie JSON
The billie field of the payment_method…
billing_details JSON
The billing details field of the…
bizum STRUCT("buyer_id" VARCHAR)
The bizum field of the payment_method…
blik STRUCT("buyer_id" VARCHAR)
The blik field of the payment_method…
boleto STRUCT("tax_id" VARCHAR)
The boleto field of the payment_method…
card JSON
The card field of the payment_method…
card_present JSON
The card present field of the…
cashapp STRUCT("buyer_id" VARCHAR, "cashtag" VARCHAR)
The cashapp field of the…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
crypto JSON
The crypto field of the payment_method…
custom JSON
The custom field of the payment_method…
customer VARCHAR
The ID of the Customer to which this…
customer_account VARCHAR
The customer account field of the…
customer_balance JSON
The customer balance field of the…
eps STRUCT("bank" VARCHAR)
The eps field of the payment_method…
fpx STRUCT("bank" VARCHAR)
The fpx field of the payment_method…
giropay JSON
The giropay field of the…
grabpay JSON
The grabpay field of the…
ideal STRUCT("bank" VARCHAR, "bic" VARCHAR)
The ideal field of the payment_method…
interac_present JSON
The interac present field of the…
kakao_pay JSON
The kakao pay field of the…
klarna JSON
The klarna field of the payment_method…
konbini JSON
The konbini field of the…
kr_card STRUCT("brand" VARCHAR, "last4" VARCHAR)
The kr card field of the…
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
type VARCHAR
The type of the PaymentMethod. One of…
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count payment methods by type

SELECT type, count(*) AS n
FROM stripe.payments.payment_methods()
GROUP BY type
ORDER BY n DESC, type;
Link
payment_records (created_after := TIMESTAMP WITH TIME ZONE, created_before := TIMESTAMP WITH TIME ZONE, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List all the Payment Records for a given merchant. (GET /v1/payment_records)

Named arguments
created_after := TIMESTAMP WITH TIME ZONE
Only return Payment Records that were created after this unix time. (Stripe parameter created_after) · default null
created_before := TIMESTAMP WITH TIME ZONE
Only return Payment Records that were created before this unix time. (Stripe parameter created_before) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_authorized STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_canceled STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_failed STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_guaranteed STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_refunded STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
amount_requested STRUCT("currency" VARCHAR, "value" BIGINT)
A representation of an amount of money, consisting of an amount and a currency.
application VARCHAR
ID of the Connect application that created the PaymentRecord.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer_details JSON
Customer information for this payment.
customer_presence VARCHAR
Indicates whether the customer was present in your checkout flow during this payment. One of: off_session, on_session.
description VARCHAR
An arbitrary string attached to the object.
latest_payment_attempt_record VARCHAR
ID of the latest Payment Attempt Record attached to this Payment Record.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
payment_method_details JSON
Information about the Payment Method debited for this payment.
processor_details JSON
Processor information associated with this payment.
reported_by VARCHAR
Indicates who reported the payment. One of: self, stripe.
shipping_details JSON
Shipping information for this payment.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent payment records

SELECT id, application, created
FROM stripe.payments.payment_records()
ORDER BY created DESC
LIMIT 10;
Link
radar_early_fraud_warnings (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of early fraud warnings. (GET /v1/radar/early_fraud_warnings)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
actionable BOOLEAN
An EFW is actionable if it has not received a dispute and has not been fully refunded.
charge VARCHAR
ID of the charge this early fraud warning is for, optionally expanded.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
fraud_type VARCHAR
The type of fraud labelled by the issuer.
livemode BOOLEAN
If the object exists in live mode, the value is true.
payment_intent VARCHAR
ID of the Payment Intent this early fraud warning is for, optionally expanded.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent radar early fraud warnings

SELECT id, charge, created
FROM stripe.payments.radar_early_fraud_warnings()
ORDER BY created DESC
LIMIT 10;
Link
radar_value_list_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, value_list_id := VARCHAR) 1 example

Returns a list of ValueListItem objects. (GET /v1/radar/value_list_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
value_list_id := VARCHAR
Read only this parent's rows (value_list id); NULL fans out over every parent. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
value_list VARCHAR
Parent value list id this row belongs to.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
created_by VARCHAR
The name or email address of the user who added this item to the value list.
livemode BOOLEAN
If the object exists in live mode, the value is true.
value VARCHAR
The value of the item.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent radar value list items

SELECT id, value_list, created
FROM stripe.payments.radar_value_list_items()
ORDER BY created DESC
LIMIT 10;
Link
radar_value_lists (contains := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of ValueList objects. (GET /v1/radar/value_lists)

Named arguments
contains := VARCHAR
A value contained within a value list - returns all value lists containing this value. (Stripe parameter contains) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
alias VARCHAR
The name of the value list for use in rules.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
created_by VARCHAR
The name or email address of the user who created this value list.
item_type VARCHAR
The type of items in the value list. One of: account, card_bin, card_fingerprint, case_sensitive_string, country, crypto_fingerprint, customer_id, email, ….
list_items JSON
List of items contained within this value list.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
name VARCHAR
The name of the value list.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent radar value lists

SELECT id, alias, created
FROM stripe.payments.radar_value_lists()
ORDER BY created DESC
LIMIT 10;
Link
refunds (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of all refunds you created. (GET /v1/refunds)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
amount BIGINT
Amount, in cents (or local equivalent). (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_transaction VARCHAR
Balance transaction that describes the impact on your account balance.
charge VARCHAR
ID of the charge that's refunded.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
ID of the customer of this refund.
customer_account VARCHAR
ID of the account of this refund.
description VARCHAR
An arbitrary string attached to the object.
destination_details JSON
The destination details field of the refund object.
failure_balance_transaction VARCHAR
After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
failure_reason VARCHAR
Provides the reason for the refund failure.
instructions_email VARCHAR
For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
next_action JSON
The next action field of the refund object.
payment_intent VARCHAR
ID of the PaymentIntent that's refunded.
payment_method VARCHAR
ID of the payment method associated with this refund.
pending_reason VARCHAR
Provides the reason for why the refund is pending. One of: charge_pending, insufficient_funds, processing.
presentment_details STRUCT of 2 fields
The presentment details field of the refund object.
STRUCT 2 fields
  • presentment_amountBIGINT
  • presentment_currencyVARCHAR
reason VARCHAR
Reason for the refund, which is either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally…
receipt_number VARCHAR
This is the transaction number that appears on email receipts sent for this refund.
source_transfer_reversal VARCHAR
The transfer reversal that's associated with the refund.
status VARCHAR
Status of the refund.
transfer_reversal VARCHAR
This refers to the transfer reversal object if the accompanying transfer reverses.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count refunds by status

SELECT status, count(*) AS n
FROM stripe.payments.refunds()
GROUP BY status
ORDER BY n DESC, status;
Link
reviews (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Review objects that have open set to true . (GET /v1/reviews)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
billing_zip VARCHAR
The ZIP or postal code of the card used, if applicable.
charge VARCHAR
The charge associated with this review.
closed_reason VARCHAR
The reason the review was closed, or null if it has not yet been closed. One of: acknowledged, approved, canceled, disputed, payment_never_settled, redacted, refunded, refunded_as_fraud.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
ip_address VARCHAR
The IP address where the payment originated.
ip_address_location JSON
Information related to the location of the payment.
livemode BOOLEAN
If the object exists in live mode, the value is true.
open BOOLEAN
If true, the review needs action.
opened_reason VARCHAR
The reason the review was opened. One of: manual, rule.
payment_intent VARCHAR
The PaymentIntent ID associated with this review, if one exists.
reason VARCHAR
The reason the review is currently open or closed.
session JSON
Information related to the browsing session of the user who initiated the payment.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent reviews

SELECT id, billing_zip, charge
FROM stripe.payments.reviews()
ORDER BY created DESC
LIMIT 10;
Link
setup_attempts (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), setup_intent_id := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of SetupAttempts that associate with a provided SetupIntent. (GET /v1/setup_attempts)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
setup_intent_id := VARCHAR
Read only this parent's rows (setup_intent id); NULL fans out over every parent. · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
setup_intent VARCHAR
Parent setup intent id this row belongs to.
application VARCHAR
The value of application on the SetupIntent at the time of this confirmation.
attach_to_self BOOLEAN
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer VARCHAR
The value of customer on the SetupIntent at the time of this confirmation.
customer_account VARCHAR
The value of customer_account on the SetupIntent at the time of this confirmation.
flow_directions VARCHAR[]
Indicates the directions of money movement for which this payment method is intended to be used.
livemode BOOLEAN
If the object exists in live mode, the value is true.
on_behalf_of VARCHAR
The value of on_behalf_of on the SetupIntent at the time of this confirmation.
payment_method VARCHAR
ID of the payment method used with this SetupAttempt.
payment_method_details JSON
The payment method details field of the setup_attempt object.
setup_error JSON
The error encountered during this attempt to confirm the SetupIntent, if any.
status VARCHAR
Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned.
usage VARCHAR
The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count setup attempts by status

SELECT status, count(*) AS n
FROM stripe.payments.setup_attempts()
GROUP BY status
ORDER BY n DESC, status;
Link
setup_intents (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of SetupIntents. (GET /v1/setup_intents)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
allowed_payment_method_types VARCHAR[]
The list of payment method types to allow for this SetupIntent.
application VARCHAR
ID of the Connect application that created the SetupIntent.
attach_to_self BOOLEAN
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
automatic_payment_methods JSON
Settings for dynamic payment methods compatible with this Setup Intent
cancellation_reason VARCHAR
Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate. One of: abandoned, duplicate, requested_by_customer.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer VARCHAR
ID of the Customer this SetupIntent belongs to, if one exists.
customer_account VARCHAR
ID of the Account this SetupIntent belongs to, if one exists.
description VARCHAR
An arbitrary string attached to the object.
excluded_payment_method_types VARCHAR[]
Payment method types that are excluded from this SetupIntent.
flow_directions VARCHAR[]
Indicates the directions of money movement for which this payment method is intended to be used.
last_setup_error JSON
The error encountered in the previous SetupIntent confirmation.
latest_attempt VARCHAR
The most recent SetupAttempt for this SetupIntent.
livemode BOOLEAN
If the object exists in live mode, the value is true.
managed_payments JSON
The managed payments field of the setup_intent object.
mandate VARCHAR
ID of the multi use Mandate generated by the SetupIntent.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
next_action JSON
If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
on_behalf_of VARCHAR
The account (if any) for which the setup is intended.
payment_method VARCHAR
ID of the payment method used with this SetupIntent.
payment_method_configuration_details JSON
Information about the payment method configuration used for this Setup Intent.
payment_method_options JSON
Payment method-specific configuration for this SetupIntent.
payment_method_types VARCHAR[]
The list of payment method types (e.g.
single_use_mandate VARCHAR
ID of the single_use Mandate generated by the SetupIntent.
status VARCHAR
Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
usage VARCHAR
Indicates how the payment method is intended to be used in the future.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count setup intents by status

SELECT status, count(*) AS n
FROM stripe.payments.setup_intents()
GROUP BY status
ORDER BY n DESC, status;
Link
source_source_transactions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), source_id := VARCHAR, stripe_account := VARCHAR) 1 example

List source transactions for a given source. (GET /v1/sources/{source}/source_transactions)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
source_id := VARCHAR
The source id to read (required unless WHERE source = / IN names them). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
source VARCHAR
Parent source id this row belongs to.
ach_credit_transfer STRUCT of 4 fields
The ach credit transfer field of the source_transaction object.
STRUCT 4 fields
  • customer_dataVARCHAR
  • fingerprintVARCHAR
  • last4VARCHAR
  • routing_numberVARCHAR
amount BIGINT
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
chf_credit_transfer STRUCT of 5 fields
The chf credit transfer field of the source_transaction object.
STRUCT 5 fields
  • referenceVARCHAR
  • sender_address_countryVARCHAR
  • sender_address_line1VARCHAR
  • sender_ibanVARCHAR
  • sender_nameVARCHAR
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
gbp_credit_transfer JSON
The gbp credit transfer field of the source_transaction object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
paper_check STRUCT("available_at" VARCHAR, "invoices" VARCHAR)
The paper check field of the source_transaction object.
sepa_credit_transfer STRUCT of 3 fields
The sepa credit transfer field of the source_transaction object.
STRUCT 3 fields
  • referenceVARCHAR
  • sender_ibanVARCHAR
  • sender_nameVARCHAR
status VARCHAR
The status of the transaction, one of succeeded, pending, or failed.
type VARCHAR
The type of source this transaction is attached to. One of: ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ….
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count source source transactions by status

SELECT status, count(*) AS n
FROM stripe.payments.source_source_transactions(source_id := 'id_…')
GROUP BY status
ORDER BY n DESC, status;
Link
sources (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), source_id := VARCHAR, stripe_account := VARCHAR) 1 example

Retrieves an existing source object. (GET /v1/sources/{source})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
source_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
ach_credit_transfer JSON
The ach credit transfer field of the…
ach_debit STRUCT of 6 fields
The ach debit field of the source…
STRUCT 6 fields
  • bank_nameVARCHAR
  • countryVARCHAR
  • fingerprintVARCHAR
  • last4VARCHAR
  • routing_numberVARCHAR
  • typeVARCHAR
acss_debit JSON
The acss debit field of the source…
alipay STRUCT of 3 fields
The alipay field of the source object.
STRUCT 3 fields
  • data_stringVARCHAR
  • native_urlVARCHAR
  • statement_descriptorVARCHAR
allow_redisplay VARCHAR
This field indicates whether this…
amount BIGINT
A positive integer in the smallest… (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
au_becs_debit STRUCT of 3 fields
The au becs debit field of the source…
STRUCT 3 fields
  • bsb_numberVARCHAR
  • fingerprintVARCHAR
  • last4VARCHAR
bancontact STRUCT of 6 fields
The bancontact field of the source…
STRUCT 6 fields
  • bank_codeVARCHAR
  • bank_nameVARCHAR
  • bicVARCHAR
  • iban_last4VARCHAR
  • preferred_languageVARCHAR
  • statement_descriptorVARCHAR
card JSON
The card field of the source object.
card_present JSON
The card present field of the source…
code_verification STRUCT("attempts_remaining" BIGINT, "status" VARCHAR)
The code verification field of the…
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO code for the currency…
customer VARCHAR
The ID of the customer to which this…
eps STRUCT of 2 fields
The eps field of the source object.
STRUCT 2 fields
  • referenceVARCHAR
  • statement_descriptorVARCHAR
flow VARCHAR
The authentication flow of the source.
giropay STRUCT of 4 fields
The giropay field of the source object.
STRUCT 4 fields
  • bank_codeVARCHAR
  • bank_nameVARCHAR
  • bicVARCHAR
  • statement_descriptorVARCHAR
ideal STRUCT of 4 fields
The ideal field of the source object.
STRUCT 4 fields
  • bankVARCHAR
  • bicVARCHAR
  • iban_last4VARCHAR
  • statement_descriptorVARCHAR
klarna JSON
The klarna field of the source object.
livemode BOOLEAN
If the object exists in live mode, the…
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can…
multibanco JSON
The multibanco field of the source…
owner JSON
Information about the owner of the…
p24 STRUCT("reference" VARCHAR)
The p24 field of the source object.
receiver STRUCT of 6 fields
The receiver field of the source object.
STRUCT 6 fields
  • addressVARCHAR
  • amount_chargedBIGINT
  • amount_receivedBIGINT
  • amount_returnedBIGINT
  • refund_attributes_methodVARCHAR
  • refund_attributes_statusVARCHAR
statement_descriptor VARCHAR
Extra information about a source.
status VARCHAR
The status of the source, one of…
type VARCHAR
The type of the source. One of…
usage VARCHAR
Either reusable or single_use.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the sources (/v1/sources/{source})

SELECT id, allow_redisplay, amount, created
FROM stripe.payments.sources(source_id := 'id_…');
Link
three_d_secure_authentications (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of 3D Secure Authentications. (GET /v1/three_d_secure/authentications)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
acquirer_details STRUCT of 6 fields
Contains additional details about the acquirer for a 3DS Authentication.
STRUCT 6 fields
  • acquirer_binVARCHAR
  • acquirer_countryVARCHAR
  • acquirer_merchant_idVARCHAR
  • mccVARCHAR
  • merchant_nameVARCHAR
  • requestor_idVARCHAR
amount BIGINT
The amount for this 3DS Authentication. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
challenge_url VARCHAR
The URL for presenting a challenge to your cardholder, present if status is requires_challenge.
channel JSON
Contains details on the channel used (browser, 3RI) for a standalone 3DS Authentication.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
directory_server VARCHAR
The 3DS directory server with which this 3DS Authentication was processed. One of: american_express, cartes_bancaires, discover, mastercard, visa.
fingerprinting_url VARCHAR
The URL for performing issuer fingerprinting, present if fingerprinting is supported for the given payment method.
flow_preference JSON
Contains details of the flow preference used for a standalone 3DS Authentication.
future_usage JSON
Contains information about the future authorisations related to this authentication
livemode BOOLEAN
If the object exists in live mode, the value is true.
message_category VARCHAR
Indicates whether this 3DS Authentication is being performed for a payment or non-payment use case. One of: non_payment_authentication, payment_authentication.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
outcome VARCHAR
The outcome of this 3DS Authentication. One of: abandoned, attempt_acknowledged, authenticated, canceled, denied, informational, internal_error, not_supported, ….
outcome_details JSON
Contains details on the result for a standalone 3DS Authentication.
payment_method VARCHAR
ID of the payment method (a PaymentMethod object) to attach to this 3DS Authentication.
reason VARCHAR
The reason for invoking this 3DS Authentication. One of: cardholder_authentication, issuer_requested, liability_shift, processing_costs, regulatory_compliance.
shipping_address STRUCT of 6 fields
Contains details about the shipping address for a 3DS Authentication.
STRUCT 6 fields
  • cityVARCHAR
  • countryVARCHAR
  • line1VARCHAR
  • line2VARCHAR
  • postal_codeVARCHAR
  • stateVARCHAR
status VARCHAR
Status of this Authentication. One of: canceled, error, failed, requires_challenge, requires_submission, succeeded.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count three d secure authentications by status

SELECT status, count(*) AS n
FROM stripe.payments.three_d_secure_authentications()
GROUP BY status
ORDER BY n DESC, status;
Link
tokens (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, token_id := VARCHAR) 1 example

Retrieves the token with the given ID. (GET /v1/tokens/{token})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
token_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
Returns columns
id VARCHAR
Unique identifier for the object.
bank_account JSON
These bank accounts are payment methods on Customer objects.
card JSON
You can store multiple cards on a customer in order to charge the customer later.
client_ip VARCHAR
IP address of the client that generates the token.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
livemode BOOLEAN
If the object exists in live mode, the value is true.
type VARCHAR
Type of the token: account, bank_account, card, or pii.
used BOOLEAN
Determines if you have already used this token (you can only use tokens once).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the tokens (/v1/tokens/{token})

SELECT id, client_ip, created, livemode
FROM stripe.payments.tokens(token_id := 'id_…');
Link
platform 7 functions

Platform endpoints of the Stripe API: the event feed, webhook endpoints, files and file links, and Stripe Apps installs and secret metadata.

Schema examples (7)
Examples (7)

Count app installs by status

SELECT status, count(*) AS n
FROM stripe.platform.app_installs()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the app secret (/v1/apps/secrets/find)

SELECT id, created, deleted, expires_at
FROM stripe.platform.app_secret(name := '…');

The ten most recent app secrets

SELECT id, created, expires_at
FROM stripe.platform.app_secrets()
ORDER BY created DESC
LIMIT 10;

Count events by type

SELECT type, count(*) AS n
FROM stripe.platform.events()
GROUP BY type
ORDER BY n DESC, type;
3 more examples

The ten most recent file links

SELECT id, created, expires_at
FROM stripe.platform.file_links()
ORDER BY created DESC
LIMIT 10;

Count files by type

SELECT type, count(*) AS n
FROM stripe.platform.files()
GROUP BY type
ORDER BY n DESC, type;

Count webhook endpoints by status

SELECT status, count(*) AS n
FROM stripe.platform.webhook_endpoints()
GROUP BY status
ORDER BY n DESC, status;
Table functions
app_installs (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of app installs. (GET /v1/apps/installs)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
The ID of the account that the app install belongs to.
app VARCHAR
The ID of the app installed.
approval_required BOOLEAN
Whether the installer must authorize pending permissions, content security policy entries, or endpoints.
auth_code VARCHAR
The authorization code for an oauth app install.
channel VARCHAR
The distribution channel associated with the app install. One of: private_live, private_test, public, review, testing.
content_security_policy_granted JSON
The content security policy granted field of the apps.install object.
content_security_policy_pending JSON
The content security policy pending field of the apps.install object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
created_by VARCHAR
The ID of the embedding platform that created the install, if applicable.
endpoints_granted VARCHAR[]
The endpoint URLs authorized by the installer.
endpoints_pending VARCHAR[]
The endpoint URLs requested by the latest app version that the installer has not authorized.
livemode BOOLEAN
If the object exists in live mode, the value is true.
permissions_granted VARCHAR[]
The permissions authorized by the installer.
permissions_pending VARCHAR[]
The permissions requested by the latest app version that the installer has not authorized.
status VARCHAR
The status of the app install. One of: install_failed, installed, installing, uninstall_failed, uninstalling.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count app installs by status

SELECT status, count(*) AS n
FROM stripe.platform.app_installs()
GROUP BY status
ORDER BY n DESC, status;
Link
app_secret (name := VARCHAR, params := MAP(VARCHAR, VARCHAR), scope_type := VARCHAR, scope_user := VARCHAR, stripe_account := VARCHAR) 1 example

Finds a secret in the secret store by name and scope. (GET /v1/apps/secrets/find)

Named arguments
name := VARCHAR
A name for the secret that's unique within the scope. Required by Stripe. (Stripe parameter name) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
scope_type := VARCHAR
Specifies the scoping of the secret. Default 'account'. (Stripe parameter scope[type]) · default "account"
scope_user := VARCHAR
Specifies the scoping of the secret. (Stripe parameter scope[user]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
deleted BOOLEAN
If true, indicates that this secret has been deleted
expires_at TIMESTAMP WITH TIME ZONE
The Unix timestamp for the expiry time of the secret, after which the secret deletes.
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
A name for the secret that's unique within the scope.
scope STRUCT("type" VARCHAR, "user" VARCHAR)
The scope field of the apps.secret object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the app secret (/v1/apps/secrets/find)

SELECT id, created, deleted, expires_at
FROM stripe.platform.app_secret(name := '…');
Link
app_secrets (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), scope_type := VARCHAR, scope_user := VARCHAR, stripe_account := VARCHAR) 1 example

List all secrets stored on the given scope. (GET /v1/apps/secrets)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
scope_type := VARCHAR
Specifies the scoping of the secret. Default 'account'. (Stripe parameter scope[type]) · default "account"
scope_user := VARCHAR
Specifies the scoping of the secret. (Stripe parameter scope[user]) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
deleted BOOLEAN
If true, indicates that this secret has been deleted
expires_at TIMESTAMP WITH TIME ZONE
The Unix timestamp for the expiry time of the secret, after which the secret deletes.
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
A name for the secret that's unique within the scope.
scope STRUCT("type" VARCHAR, "user" VARCHAR)
The scope field of the apps.secret object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent app secrets

SELECT id, created, expires_at
FROM stripe.platform.app_secrets()
ORDER BY created DESC
LIMIT 10;
Link
events (delivery_success := BOOLEAN, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

List events, going back up to 30 days. (GET /v1/events)

Named arguments
delivery_success := BOOLEAN
Filter events by whether all webhooks were successfully delivered. (Stripe parameter delivery_success) · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
account VARCHAR
The connected account that originates the event.
api_version VARCHAR
The Stripe API version used to render data when the event was created.
context VARCHAR
Authentication context needed to fetch the event or related object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
data JSON
The data field of the event object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
pending_webhooks BIGINT
Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
request JSON
Information on the API request that triggers the event.
type VARCHAR
Description of the event (for example, invoice.created or charge.refunded).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count events by type

SELECT type, count(*) AS n
FROM stripe.platform.events()
GROUP BY type
ORDER BY n DESC, type;
Link
files (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of the files that your account has access to. (GET /v1/files)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
expires_at TIMESTAMP WITH TIME ZONE
The file expires and isn't available at this time in epoch seconds.
filename VARCHAR
The suitable name for saving the file to a filesystem.
links JSON
A list of file links that point at this file.
purpose VARCHAR
The purpose of the uploaded file.
size BIGINT
The size of the file object in bytes.
title VARCHAR
A suitable title for the document.
type VARCHAR
The returned file type (for example, csv, pdf, jpg, or png).
url VARCHAR
Use your live secret API key to download the file from this URL.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count files by type

SELECT type, count(*) AS n
FROM stripe.platform.files()
GROUP BY type
ORDER BY n DESC, type;
Link
webhook_endpoints (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your webhook endpoints. (GET /v1/webhook_endpoints)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
api_version VARCHAR
The API version that events are rendered as for this webhook endpoint.
application VARCHAR
The ID of the associated Connect application.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
description VARCHAR
An optional description of what the webhook is used for.
enabled_events VARCHAR[]
The list of events to enable for this endpoint.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
status VARCHAR
The status of the webhook.
url VARCHAR
The URL of the webhook endpoint.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count webhook endpoints by status

SELECT status, count(*) AS n
FROM stripe.platform.webhook_endpoints()
GROUP BY status
ORDER BY n DESC, status;
Link
reporting 3 functions

Stripe reporting endpoints: report types, report runs (the files they produce) and Sigma scheduled query runs.

Schema examples (3)
Examples (3)

Count report runs by status

SELECT status, count(*) AS n
FROM stripe.reporting.report_runs()
GROUP BY status
ORDER BY n DESC, status;

The first ten report types by id

SELECT id, data_available_end, data_available_start
FROM stripe.reporting.report_types()
ORDER BY id
LIMIT 10;

Count sigma scheduled query runs by status

SELECT status, count(*) AS n
FROM stripe.reporting.sigma_scheduled_query_runs()
GROUP BY status
ORDER BY n DESC, status;
Table functions
report_runs (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Report Runs, with the most recent appearing first. (GET /v1/reporting/report_runs)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
error VARCHAR
If something should go wrong during the run, a message about the failure (populated when status=failed).
livemode BOOLEAN
true if the report is run on live mode data and false if it is run on test mode data.
parameters JSON
The parameters field of the reporting.report_run object.
report_type VARCHAR
The ID of the report type to run, such as "balance.summary.1".
result JSON
The file object representing the result of the report run (populated when status=succeeded).
status VARCHAR
Status of this report run.
succeeded_at TIMESTAMP WITH TIME ZONE
Timestamp at which this run successfully finished (populated when status=succeeded).
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count report runs by status

SELECT status, count(*) AS n
FROM stripe.reporting.report_runs()
GROUP BY status
ORDER BY n DESC, status;
Link
report_types (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a full list of Report Types. (GET /v1/reporting/report_types)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
The ID of the Report Type, such as balance.summary.1.
data_available_end TIMESTAMP WITH TIME ZONE
Most recent time for which this Report Type is available.
data_available_start TIMESTAMP WITH TIME ZONE
Earliest time for which this Report Type is available.
default_columns VARCHAR[]
List of column names that are included by default when this Report Type gets run.
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
Human-readable name of the Report Type
updated TIMESTAMP WITH TIME ZONE
When this Report Type was latest updated.
version BIGINT
Version of the Report Type.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten report types by id

SELECT id, data_available_end, data_available_start
FROM stripe.reporting.report_types()
ORDER BY id
LIMIT 10;
Link
sigma_scheduled_query_runs (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of scheduled query runs. (GET /v1/sigma/scheduled_query_runs)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
data_load_time TIMESTAMP WITH TIME ZONE
When the query was run, Sigma contained a snapshot of your Stripe data at this time.
error STRUCT("message" VARCHAR)
The error field of the scheduled_query_run object.
file JSON
The file object representing the results of the query.
livemode BOOLEAN
If the object exists in live mode, the value is true.
result_available_until TIMESTAMP WITH TIME ZONE
Time at which the result expires and is no longer available for download.
sql VARCHAR
SQL for the query.
status VARCHAR
The query's execution status, which will be completed for successful runs, and canceled, failed, or timed_out otherwise.
title VARCHAR
Title of the query.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count sigma scheduled query runs by status

SELECT status, count(*) AS n
FROM stripe.reporting.sigma_scheduled_query_runs()
GROUP BY status
ORDER BY n DESC, status;
Link
tax 11 functions

Stripe Tax and tax-id endpoints: calculations and transactions with their line items, registrations, settings, tax locations, tax codes, tax ids and tax rates.

Schema examples (10)
Examples (10)

Key fields of the association (/v1/tax/associations/find)

SELECT id, calculation, payment_intent
FROM stripe.tax.association(payment_intent := '…');

The first ten calculation line items by id

SELECT id, calculation, amount
FROM stripe.tax.calculation_line_items(calculation_id := 'id_…')
ORDER BY id
LIMIT 10;

Key fields of the calculations (/v1/tax/calculations/{calculation})

SELECT id, amount_total, currency, customer
FROM stripe.tax.calculations(calculation_id := 'id_…');

Count locations by type

SELECT type, count(*) AS n
FROM stripe.tax.locations()
GROUP BY type
ORDER BY n DESC, type;
6 more examples

Count registrations by status

SELECT status, count(*) AS n
FROM stripe.tax.registrations()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the settings (/v1/tax/settings)

SELECT livemode, status FROM stripe.tax.settings();

The first ten tax codes by id

SELECT id, description, name
FROM stripe.tax.tax_codes()
ORDER BY id
LIMIT 10;

Count tax ids by type

SELECT type, count(*) AS n
FROM stripe.tax.tax_ids()
GROUP BY type
ORDER BY n DESC, type;

The ten most recent tax rates

SELECT id, country, created
FROM stripe.tax.tax_rates()
ORDER BY created DESC
LIMIT 10;

Count transaction line items by type

SELECT type, count(*) AS n
FROM stripe.tax.transaction_line_items(tax_transaction_id := 'id_…')
GROUP BY type
ORDER BY n DESC, type;
Table functions
association (params := MAP(VARCHAR, VARCHAR), payment_intent := VARCHAR, stripe_account := VARCHAR) 1 example

Finds a tax association object by PaymentIntent id. (GET /v1/tax/associations/find)

Named arguments
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
payment_intent := VARCHAR
Valid PaymentIntent id Required by Stripe. (Stripe parameter payment_intent) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
calculation VARCHAR
The Tax Calculation that was included in PaymentIntent.
payment_intent VARCHAR
The PaymentIntent that this Tax Association is tracking.
tax_transaction_attempts JSON
Information about the tax transactions linked to this payment intent
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the association (/v1/tax/associations/find)

SELECT id, calculation, payment_intent
FROM stripe.tax.association(payment_intent := '…');
Link
calculation_line_items (calculation_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired. (GET /v1/tax/calculations/{calculation}/line_items)

Named arguments
calculation_id := VARCHAR
The calculation id to read (required unless WHERE calculation = / IN names them). · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
calculation VARCHAR
Parent calculation id this row belongs to.
amount BIGINT
The line item amount in the smallest currency unit.
amount_tax BIGINT
The amount of tax calculated for this line item, in the smallest currency unit.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
performance_location VARCHAR
Indicates the line item represents a performance where the venue location might determine the tax, not the customer address.
product VARCHAR
The ID of an existing Product.
quantity BIGINT
The number of units of the item being purchased.
reference VARCHAR
A custom identifier for this line item.
tax_behavior VARCHAR
Specifies whether the amount includes taxes. One of: exclusive, inclusive.
tax_breakdown JSON
Detailed account of taxes relevant to this line item.
tax_code VARCHAR
The tax code ID used for this resource.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten calculation line items by id

SELECT id, calculation, amount
FROM stripe.tax.calculation_line_items(calculation_id := 'id_…')
ORDER BY id
LIMIT 10;
Link
calculations (calculation_id := VARCHAR, expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves a Tax Calculation object, if the calculation hasn’t expired. (GET /v1/tax/calculations/{calculation})

Named arguments
calculation_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the calculation.
amount_total BIGINT
Total amount after taxes in the smallest currency unit. (minor units)
amount_total_decimal DECIMAL(38,3)
Same amount in major units (exact).
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
The ID of an existing Customer used for the resource.
customer_details JSON
The customer details field of the tax.calculation object.
expires_at TIMESTAMP WITH TIME ZONE
Timestamp of date at which the tax calculation will expire.
line_items JSON
The list of items the customer is purchasing.
livemode BOOLEAN
If the object exists in live mode, the value is true.
ship_from_details JSON
The details of the ship from location, such as the address.
shipping_cost JSON
The shipping cost details for the calculation.
tax_amount_exclusive BIGINT
The amount of tax to be collected on top of the line item prices.
tax_amount_inclusive BIGINT
The amount of tax already included in the line item prices.
tax_breakdown JSON
Breakdown of individual tax amounts that add up to the total.
tax_date TIMESTAMP WITH TIME ZONE
The calculation uses the tax rules and rates that are in effect at this timestamp.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the calculations (/v1/tax/calculations/{calculation})

SELECT id, amount_total, currency, customer
FROM stripe.tax.calculations(calculation_id := 'id_…');
Link
locations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, type := VARCHAR) 1 example

Retrieve a list of all tax locations. (GET /v1/tax/locations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
type := VARCHAR
Type of the tax location. Required by Stripe. (Stripe parameter type) · default null
Returns columns
id VARCHAR
Unique identifier for the object.
address STRUCT of 6 fields
The address field of the tax.location object.
STRUCT 6 fields
  • cityVARCHAR
  • countryVARCHAR
  • line1VARCHAR
  • line2VARCHAR
  • postal_codeVARCHAR
  • stateVARCHAR
description VARCHAR
A descriptive text providing additional context about the tax location.
livemode BOOLEAN
If the object exists in live mode, the value is true.
type VARCHAR
The type of tax location to be defined. One of: performance.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count locations by type

SELECT type, count(*) AS n
FROM stripe.tax.locations()
GROUP BY type
ORDER BY n DESC, type;
Link
registrations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Tax Registration objects. (GET /v1/tax/registrations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active_from TIMESTAMP WITH TIME ZONE
Time at which the registration becomes active.
country VARCHAR
Two-letter country code (ISO 3166-1 alpha-2).
country_options JSON
The country options field of the tax.registration object.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
expires_at TIMESTAMP WITH TIME ZONE
If set, the registration stops being active at this time.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
The status of the registration. One of: active, expired, scheduled.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count registrations by status

SELECT status, count(*) AS n
FROM stripe.tax.registrations()
GROUP BY status
ORDER BY n DESC, status;
Link
settings (params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves Tax Settings for a merchant. (GET /v1/tax/settings)

Named arguments
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
defaults STRUCT of 3 fields
The defaults field of the tax.settings object.
STRUCT 3 fields
  • providerVARCHAR
  • tax_behaviorVARCHAR
  • tax_codeVARCHAR
head_office JSON
The place where your business is located.
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
Whether these settings have the information Stripe Tax needs to calculate tax. One of: active, pending.
status_details JSON
The status details field of the tax.settings object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the settings (/v1/tax/settings)

SELECT livemode, status FROM stripe.tax.settings();
Link
tax_codes (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

A list of all tax codes available to add to Products in order to allow specific tax calculations. (GET /v1/tax_codes)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
description VARCHAR
A detailed description of which types of products the tax code represents.
name VARCHAR
A short name for the tax code.
requirements JSON
An object that describes more information about the tax location required for this tax code.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten tax codes by id

SELECT id, description, name
FROM stripe.tax.tax_codes()
ORDER BY id
LIMIT 10;
Link
tax_ids (expand := VARCHAR[], owner_account := VARCHAR, owner_customer := VARCHAR, owner_customer_account := VARCHAR, owner_type := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of tax IDs. (GET /v1/tax_ids)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
owner_account := VARCHAR
The account or customer the tax ID belongs to. (Stripe parameter owner[account]) · default null
owner_customer := VARCHAR
The account or customer the tax ID belongs to. (Stripe parameter owner[customer]) · default null
owner_customer_account := VARCHAR
The account or customer the tax ID belongs to. (Stripe parameter owner[customer_account]) · default null
owner_type := VARCHAR
The account or customer the tax ID belongs to. (Stripe parameter owner[type]) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
country VARCHAR
Two-letter ISO code representing the country of the tax ID.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
customer VARCHAR
ID of the customer.
customer_account VARCHAR
ID of the Account representing the customer.
livemode BOOLEAN
If the object exists in live mode, the value is true.
owner JSON
The account or customer the tax ID belongs to.
type VARCHAR
Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat…
value VARCHAR
Value of the tax ID.
verification JSON
Tax ID verification information.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count tax ids by type

SELECT type, count(*) AS n
FROM stripe.tax.tax_ids()
GROUP BY type
ORDER BY n DESC, type;
Link
tax_rates (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of your tax rates. (GET /v1/tax_rates)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active BOOLEAN
Defaults to true.
country VARCHAR
Two-letter country code (ISO 3166-1 alpha-2).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
description VARCHAR
An arbitrary string attached to the tax rate for your internal use only.
display_name VARCHAR
The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
effective_percentage DOUBLE
Actual/effective tax rate percentage out of 100.
flat_amount JSON
The amount of the tax rate when the rate_type is flat_amount.
inclusive BOOLEAN
This specifies if the tax rate is inclusive or exclusive.
jurisdiction VARCHAR
The jurisdiction for the tax rate.
jurisdiction_level VARCHAR
The level of the jurisdiction that imposes this tax rate. One of: city, country, county, district, multiple, state.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
percentage DOUBLE
Tax rate percentage out of 100.
rate_type VARCHAR
Indicates the type of tax rate applied to the taxable amount. One of: flat_amount, percentage.
state VARCHAR
ISO 3166-2 subdivision code, without country prefix.
tax_type VARCHAR
The high-level tax type, such as vat or sales_tax. One of: amusement_tax, communications_tax, digital_excise_tax, gst, hst, igst, jct, lease_tax, ….
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The ten most recent tax rates

SELECT id, country, created
FROM stripe.tax.tax_rates()
ORDER BY created DESC
LIMIT 10;
Link
transaction_line_items (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, tax_transaction_id := VARCHAR) 1 example

Retrieves the line items of a committed standalone transaction as a collection. (GET /v1/tax/transactions/{transaction}/line_items)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
tax_transaction_id := VARCHAR
The tax_transaction id to read (required unless WHERE tax_transaction = / IN names them). · default null
Returns columns
id VARCHAR
Unique identifier for the object.
tax_transaction VARCHAR
Parent tax transaction id this row belongs to.
amount BIGINT
The line item amount in the smallest currency unit.
amount_tax BIGINT
The amount of tax calculated for this line item, in the smallest currency unit.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
product VARCHAR
The ID of an existing Product.
quantity BIGINT
The number of units of the item being purchased.
reference VARCHAR
A custom identifier for this line item in the transaction.
reversal JSON
If type=reversal, contains information about what was reversed.
tax_behavior VARCHAR
Specifies whether the amount includes taxes. One of: exclusive, inclusive.
tax_code VARCHAR
The tax code ID used for this resource.
type VARCHAR
If reversal, this line item reverses an earlier transaction. One of: reversal, transaction.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transaction line items by type

SELECT type, count(*) AS n
FROM stripe.tax.transaction_line_items(tax_transaction_id := 'id_…')
GROUP BY type
ORDER BY n DESC, type;
Link
transactions (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR, transaction_id := VARCHAR) 1 example

Retrieves a Tax Transaction object. (GET /v1/tax/transactions/{transaction})

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
transaction_id := VARCHAR
The object id to read (required unless WHERE id = / IN names them). · default null
Returns columns
id VARCHAR
Unique identifier for the transaction.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
The ID of an existing Customer used for the resource.
customer_details JSON
The customer details field of the tax.transaction object.
line_items JSON
The tax collected or refunded, by line item.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
posted_at TIMESTAMP WITH TIME ZONE
The Unix timestamp representing when the tax liability is assumed or reduced.
reference VARCHAR
A custom unique identifier, such as 'myOrder_123'.
reversal JSON
If type=reversal, contains information about what was reversed.
ship_from_details JSON
The details of the ship from location, such as the address.
shipping_cost JSON
The shipping cost details for the transaction.
tax_date TIMESTAMP WITH TIME ZONE
The calculation uses the tax rules and rates that are in effect at this timestamp.
type VARCHAR
If reversal, this transaction reverses an earlier transaction. One of: reversal, transaction.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the transactions (/v1/tax/transactions/{transaction})

SELECT id, created, currency, customer
FROM stripe.tax.transactions(transaction_id := 'id_…');
Link
terminal 3 functions

Stripe Terminal endpoints: in-person readers, their locations and configurations.

Schema examples (3)
Examples (3)

The first ten configurations by id

SELECT id, name FROM stripe.terminal.configurations() ORDER BY id LIMIT 10;

The first ten locations by id

SELECT id, configuration_overrides, display_name
FROM stripe.terminal.locations()
ORDER BY id
LIMIT 10;

Count readers by status

SELECT status, count(*) AS n
FROM stripe.terminal.readers()
GROUP BY status
ORDER BY n DESC, status;
Table functions
configurations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Configuration objects. (GET /v1/terminal/configurations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
bbpos_wisepad3 JSON
The bbpos wisepad3 field of the terminal.configuration object.
bbpos_wisepos_e JSON
The bbpos wisepos e field of the terminal.configuration object.
cellular STRUCT("enabled" BOOLEAN)
The cellular field of the terminal.configuration object.
is_account_default BOOLEAN
Whether this Configuration is the default for your account
livemode BOOLEAN
If the object exists in live mode, the value is true.
name VARCHAR
String indicating the name of the Configuration object, set by the user
offline STRUCT("enabled" BOOLEAN)
The offline field of the terminal.configuration object.
reboot_window STRUCT("end_hour" BIGINT, "start_hour" BIGINT)
The reboot window field of the terminal.configuration object.
stripe_s700 JSON
The stripe s700 field of the terminal.configuration object.
stripe_s710 JSON
The stripe s710 field of the terminal.configuration object.
tipping JSON
The tipping field of the terminal.configuration object.
verifone_m425 JSON
The verifone m425 field of the terminal.configuration object.
verifone_p400 JSON
The verifone p400 field of the terminal.configuration object.
verifone_p630 JSON
The verifone p630 field of the terminal.configuration object.
verifone_ux700 JSON
The verifone ux700 field of the terminal.configuration object.
verifone_v660p JSON
The verifone v660p field of the terminal.configuration object.
wifi JSON
The wifi field of the terminal.configuration object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten configurations by id

SELECT id, name FROM stripe.terminal.configurations() ORDER BY id LIMIT 10;
Link
locations (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Location objects. (GET /v1/terminal/locations)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
address STRUCT of 6 fields
The address field of the terminal.location object.
STRUCT 6 fields
  • cityVARCHAR
  • countryVARCHAR
  • line1VARCHAR
  • line2VARCHAR
  • postal_codeVARCHAR
  • stateVARCHAR
address_kana JSON
The address kana field of the terminal.location object.
address_kanji JSON
The address kanji field of the terminal.location object.
configuration_overrides VARCHAR
The ID of a configuration that will be used to customize all readers in this location.
display_name VARCHAR
The display name of the location.
display_name_kana VARCHAR
The Kana variation of the display name of the location.
display_name_kanji VARCHAR
The Kanji variation of the display name of the location.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
phone VARCHAR
The phone number of the location.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

The first ten locations by id

SELECT id, configuration_overrides, display_name
FROM stripe.terminal.locations()
ORDER BY id
LIMIT 10;
Link
readers (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of Reader objects. (GET /v1/terminal/readers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
action JSON
The most recent action performed by the reader.
device_sw_version VARCHAR
The current software version of the reader.
device_type VARCHAR
Device type of the reader.
ip_address VARCHAR
The local IP address of the reader.
label VARCHAR
Custom label given to the reader for easier identification.
last_seen_at TIMESTAMP WITH TIME ZONE
The last time this reader reported to Stripe backend.
livemode BOOLEAN
If the object exists in live mode, the value is true.
location VARCHAR
The location identifier of the reader.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
serial_number VARCHAR
Serial number of the reader.
status VARCHAR
The networking status of the reader. One of: offline, online.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count readers by status

SELECT status, count(*) AS n
FROM stripe.terminal.readers()
GROUP BY status
ORDER BY n DESC, status;
Link
treasury 11 functions

Stripe Treasury endpoints: financial accounts and their features, money movements in and out, reversals, received credits and debits, transactions and entries. Needs Treasury enabled.

Schema examples (10)
Examples (10)

Count credit reversals by status

SELECT status, count(*) AS n
FROM stripe.treasury.credit_reversals()
GROUP BY status
ORDER BY n DESC, status;

Count debit reversals by status

SELECT status, count(*) AS n
FROM stripe.treasury.debit_reversals()
GROUP BY status
ORDER BY n DESC, status;

Key fields of the financial account features (/v1/treasury/financial_accounts/{financial_account}/features)

SELECT financial_account FROM stripe.treasury.financial_account_features();

Count financial accounts by status

SELECT status, count(*) AS n
FROM stripe.treasury.financial_accounts()
GROUP BY status
ORDER BY n DESC, status;
6 more examples

Count inbound transfers by status

SELECT status, count(*) AS n
FROM stripe.treasury.inbound_transfers()
GROUP BY status
ORDER BY n DESC, status;

Count outbound payments by status

SELECT status, count(*) AS n
FROM stripe.treasury.outbound_payments()
GROUP BY status
ORDER BY n DESC, status;

Count outbound transfers by status

SELECT status, count(*) AS n
FROM stripe.treasury.outbound_transfers()
GROUP BY status
ORDER BY n DESC, status;

Count received credits by status

SELECT status, count(*) AS n
FROM stripe.treasury.received_credits()
GROUP BY status
ORDER BY n DESC, status;

Count received debits by status

SELECT status, count(*) AS n
FROM stripe.treasury.received_debits()
GROUP BY status
ORDER BY n DESC, status;

Count transaction entries by type

SELECT type, count(*) AS n
FROM stripe.treasury.transaction_entries()
GROUP BY type
ORDER BY n DESC, type;
Table functions
credit_reversals (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of CreditReversals. (GET /v1/treasury/credit_reversals)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
network VARCHAR
The rails used to reverse the funds. One of: ach, stripe.
received_credit VARCHAR
The ReceivedCredit being reversed.
status VARCHAR
Status of the CreditReversal. One of: canceled, posted, processing.
status_transitions STRUCT("posted_at" TIMESTAMP WITH TIME ZONE)
The status transitions field of the treasury.credit_reversal object.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count credit reversals by status

SELECT status, count(*) AS n
FROM stripe.treasury.credit_reversals()
GROUP BY status
ORDER BY n DESC, status;
Link
debit_reversals (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), resolution := VARCHAR, stripe_account := VARCHAR) 1 example

Returns a list of DebitReversals. (GET /v1/treasury/debit_reversals)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
resolution := VARCHAR
Only return DebitReversals for a given resolution. (Stripe parameter resolution) · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
linked_flows JSON
Other flows linked to a DebitReversal.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
network VARCHAR
The rails used to reverse the funds. One of: ach, card.
received_debit VARCHAR
The ReceivedDebit being reversed.
status VARCHAR
Status of the DebitReversal. One of: failed, processing, succeeded.
status_transitions STRUCT("completed_at" TIMESTAMP WITH TIME ZONE)
The status transitions field of the treasury.debit_reversal object.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count debit reversals by status

SELECT status, count(*) AS n
FROM stripe.treasury.debit_reversals()
GROUP BY status
ORDER BY n DESC, status;
Link
financial_account_features (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves Features information associated with the FinancialAccount. (GET /v1/treasury/financial_accounts/{financial_account}/features)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
financial_account VARCHAR
Parent financial account id this row belongs to.
card_issuing JSON
Toggle settings for enabling/disabling a feature
deposit_insurance JSON
Toggle settings for enabling/disabling a feature
financial_addresses JSON
Settings related to Financial Addresses features on a Financial Account
inbound_transfers JSON
InboundTransfers contains inbound transfers features for a FinancialAccount.
intra_stripe_flows JSON
Toggle settings for enabling/disabling a feature
outbound_payments JSON
Settings related to Outbound Payments features on a Financial Account
outbound_transfers JSON
OutboundTransfers contains outbound transfers features for a FinancialAccount.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Key fields of the financial account features (/v1/treasury/financial_accounts/{financial_account}/features)

SELECT financial_account FROM stripe.treasury.financial_account_features();
Link
financial_accounts (expand := VARCHAR[], params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of FinancialAccounts. (GET /v1/treasury/financial_accounts)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
active_features VARCHAR[]
The array of paths to active Features in the Features hash.
balance JSON
Balance information for the FinancialAccount
country VARCHAR
Two-letter country code (ISO 3166-1 alpha-2).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
features JSON
Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details.
financial_addresses JSON
The set of credentials that resolve to a FinancialAccount.
is_default BOOLEAN
The is default field of the treasury.financial_account object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
nickname VARCHAR
The nickname for the FinancialAccount.
pending_features VARCHAR[]
The array of paths to pending Features in the Features hash.
platform_restrictions JSON
The set of functionalities that the platform can restrict on the FinancialAccount.
restricted_features VARCHAR[]
The array of paths to restricted Features in the Features hash.
status VARCHAR
Status of this FinancialAccount. One of: closed, open.
status_details JSON
The status details field of the treasury.financial_account object.
supported_currencies VARCHAR[]
The currencies the FinancialAccount can hold a balance in.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count financial accounts by status

SELECT status, count(*) AS n
FROM stripe.treasury.financial_accounts()
GROUP BY status
ORDER BY n DESC, status;
Link
inbound_transfers (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of InboundTransfers sent from the specified FinancialAccount. (GET /v1/treasury/inbound_transfers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
cancelable BOOLEAN
Returns true if the InboundTransfer is able to be canceled.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
failure_details JSON
Details about this InboundTransfer's failure.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
linked_flows STRUCT("received_debit" VARCHAR)
The linked flows field of the treasury.inbound_transfer object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
origin_payment_method VARCHAR
The origin payment method to be debited for an InboundTransfer.
origin_payment_method_details JSON
Details about the PaymentMethod for an InboundTransfer.
returned BOOLEAN
Returns true if the funds for an InboundTransfer were returned after the InboundTransfer went to the succeeded state.
statement_descriptor VARCHAR
Statement descriptor shown when funds are debited from the source.
status VARCHAR
Status of the InboundTransfer: processing, succeeded, failed, and canceled. One of: canceled, failed, processing, succeeded.
status_transitions STRUCT of 3 fields
The status transitions field of the treasury.inbound_transfer object.
STRUCT 3 fields
  • canceled_atTIMESTAMP WITH TIME ZONE
  • failed_atTIMESTAMP WITH TIME ZONE
  • succeeded_atTIMESTAMP WITH TIME ZONE
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count inbound transfers by status

SELECT status, count(*) AS n
FROM stripe.treasury.inbound_transfers()
GROUP BY status
ORDER BY n DESC, status;
Link
outbound_payments (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of OutboundPayments sent from the specified FinancialAccount. (GET /v1/treasury/outbound_payments)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
cancelable BOOLEAN
Returns true if the object can be canceled, and false otherwise.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
customer VARCHAR
ID of the customer to whom an OutboundPayment is sent.
description VARCHAR
An arbitrary string attached to the object.
destination_payment_method VARCHAR
The PaymentMethod via which an OutboundPayment is sent.
destination_payment_method_details JSON
Details about the PaymentMethod for an OutboundPayment.
end_user_details JSON
Details about the end user.
expected_arrival_date TIMESTAMP WITH TIME ZONE
The date when funds are expected to arrive in the destination account.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
returned_details JSON
Details about a returned OutboundPayment.
statement_descriptor VARCHAR
The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
status VARCHAR
Current status of the OutboundPayment: processing, failed, posted, returned, canceled. One of: canceled, failed, posted, processing, returned.
status_transitions STRUCT of 4 fields
The status transitions field of the treasury.outbound_payment object.
STRUCT 4 fields
  • canceled_atTIMESTAMP WITH TIME ZONE
  • failed_atTIMESTAMP WITH TIME ZONE
  • posted_atTIMESTAMP WITH TIME ZONE
  • returned_atTIMESTAMP WITH TIME ZONE
tracking_details JSON
Details about network-specific tracking information if available.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count outbound payments by status

SELECT status, count(*) AS n
FROM stripe.treasury.outbound_payments()
GROUP BY status
ORDER BY n DESC, status;
Link
outbound_transfers (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of OutboundTransfers sent from the specified FinancialAccount. (GET /v1/treasury/outbound_transfers)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
cancelable BOOLEAN
Returns true if the object can be canceled, and false otherwise.
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
destination_payment_method VARCHAR
The PaymentMethod used as the payment instrument for an OutboundTransfer.
destination_payment_method_details JSON
The destination payment method details field of the treasury.outbound_transfer object.
expected_arrival_date TIMESTAMP WITH TIME ZONE
The date when funds are expected to arrive in the destination account.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
livemode BOOLEAN
If the object exists in live mode, the value is true.
metadata MAP(VARCHAR, VARCHAR)
Set of key-value pairs that you can attach to an object.
returned_details JSON
Details about a returned OutboundTransfer.
statement_descriptor VARCHAR
Information about the OutboundTransfer to be sent to the recipient account.
status VARCHAR
Current status of the OutboundTransfer: processing, failed, canceled, posted, returned. One of: canceled, failed, posted, processing, returned.
status_transitions STRUCT of 4 fields
The status transitions field of the treasury.outbound_transfer object.
STRUCT 4 fields
  • canceled_atTIMESTAMP WITH TIME ZONE
  • failed_atTIMESTAMP WITH TIME ZONE
  • posted_atTIMESTAMP WITH TIME ZONE
  • returned_atTIMESTAMP WITH TIME ZONE
tracking_details JSON
Details about network-specific tracking information if available.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count outbound transfers by status

SELECT status, count(*) AS n
FROM stripe.treasury.outbound_transfers()
GROUP BY status
ORDER BY n DESC, status;
Link
received_credits (expand := VARCHAR[], financial_account_id := VARCHAR, linked_flows_source_flow_type := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of ReceivedCredits. (GET /v1/treasury/received_credits)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
linked_flows_source_flow_type := VARCHAR
Only return ReceivedCredits described by the flow. (Stripe parameter linked_flows[source_flow_type]) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
failure_code VARCHAR
Reason for the failure. One of: account_closed, account_frozen, international_transaction, other.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
initiating_payment_method_details JSON
The initiating payment method details field of the treasury.received_credit object.
linked_flows JSON
The linked flows field of the treasury.received_credit object.
livemode BOOLEAN
If the object exists in live mode, the value is true.
network VARCHAR
The rails used to send the funds. One of: ach, card, rtp, stripe, us_domestic_wire.
reversal_details JSON
Details describing when a ReceivedCredit may be reversed.
status VARCHAR
Status of the ReceivedCredit. One of: failed, succeeded.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count received credits by status

SELECT status, count(*) AS n
FROM stripe.treasury.received_credits()
GROUP BY status
ORDER BY n DESC, status;
Link
received_debits (expand := VARCHAR[], financial_account_id := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Returns a list of ReceivedDebits. (GET /v1/treasury/received_debits)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
failure_code VARCHAR
Reason for the failure. One of: account_closed, account_frozen, insufficient_funds, international_transaction, other.
hosted_regulatory_receipt_url VARCHAR
A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
initiating_payment_method_details JSON
The initiating payment method details field of the treasury.received_debit object.
linked_flows STRUCT of 6 fields
The linked flows field of the treasury.received_debit object.
STRUCT 6 fields
  • debit_reversalVARCHAR
  • inbound_transferVARCHAR
  • issuing_authorizationVARCHAR
  • issuing_transactionVARCHAR
  • payoutVARCHAR
  • topupVARCHAR
livemode BOOLEAN
If the object exists in live mode, the value is true.
network VARCHAR
The network used for the ReceivedDebit. One of: ach, card, stripe.
reversal_details JSON
Details describing when a ReceivedDebit might be reversed.
status VARCHAR
Status of the ReceivedDebit. One of: failed, succeeded.
transaction VARCHAR
The Transaction associated with this object.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count received debits by status

SELECT status, count(*) AS n
FROM stripe.treasury.received_debits()
GROUP BY status
ORDER BY n DESC, status;
Link
transaction_entries (expand := VARCHAR[], financial_account_id := VARCHAR, order_by := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves a list of TransactionEntry objects. (GET /v1/treasury/transaction_entries)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
order_by := VARCHAR
The results are in reverse chronological order by created or effective_at. (Stripe parameter order_by) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
balance_impact STRUCT of 3 fields
Change to a FinancialAccount's balance
STRUCT 3 fields
  • cashBIGINT
  • inbound_pendingBIGINT
  • outbound_pendingBIGINT
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
effective_at TIMESTAMP WITH TIME ZONE
When the TransactionEntry will impact the FinancialAccount's balance.
flow VARCHAR
Token of the flow associated with the TransactionEntry.
flow_details JSON
Details of the flow associated with the TransactionEntry.
flow_type VARCHAR
Type of the flow associated with the TransactionEntry. One of: credit_reversal, debit_reversal, inbound_transfer, issuing_authorization, other, outbound_payment, outbound_transfer, received_credit, ….
livemode BOOLEAN
If the object exists in live mode, the value is true.
transaction VARCHAR
The Transaction associated with this object.
type VARCHAR
The specific money movement that generated the TransactionEntry.
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transaction entries by type

SELECT type, count(*) AS n
FROM stripe.treasury.transaction_entries()
GROUP BY type
ORDER BY n DESC, type;
Link
transactions (expand := VARCHAR[], financial_account_id := VARCHAR, order_by := VARCHAR, params := MAP(VARCHAR, VARCHAR), stripe_account := VARCHAR) 1 example

Retrieves a list of Transaction objects. (GET /v1/treasury/transactions)

Named arguments
expand := VARCHAR[]
Extra Stripe expand paths for each object (e.g. ['customer']), returned inside the raw JSON column. Each one costs response size and latency, not extra requests; nested paths such as 'invoice.subscription' are allowed. · default null
financial_account_id := VARCHAR
Read only this parent's rows (financial_account id); NULL fans out over every parent. · default null
order_by := VARCHAR
The results are in reverse chronological order by created or posted_at. (Stripe parameter order_by) · default null
params := MAP(VARCHAR, VARCHAR)
Extra Stripe query parameters for this endpoint, keyed by bracketed parameter name, e.g. {'relationship[owner]': 'true'}; only the endpoint's documented parameters are accepted (paging, expand and limit are managed for you). · default null
stripe_account := VARCHAR
Connected account id (acct_…) to read as, sent as the Stripe-Account header; overrides the secret's STRIPE_ACCOUNT. · default null
Returns columns
id VARCHAR
Unique identifier for the object.
financial_account VARCHAR
Parent financial account id this row belongs to.
amount BIGINT
Amount (in cents) transferred. (minor units)
amount_decimal DECIMAL(38,3)
Same amount in major units (exact).
balance_impact STRUCT of 3 fields
Change to a FinancialAccount's balance
STRUCT 3 fields
  • cashBIGINT
  • inbound_pendingBIGINT
  • outbound_pendingBIGINT
created TIMESTAMP WITH TIME ZONE
Time at which the object was created.
currency VARCHAR
Three-letter ISO currency code, in lowercase.
description VARCHAR
An arbitrary string attached to the object.
entries JSON
A list of TransactionEntries that are part of this Transaction.
flow VARCHAR
ID of the flow that created the Transaction.
flow_details JSON
Details of the flow that created the Transaction.
flow_type VARCHAR
Type of the flow that created the Transaction. One of: credit_reversal, debit_reversal, inbound_transfer, issuing_authorization, other, outbound_payment, outbound_transfer, received_credit, ….
livemode BOOLEAN
If the object exists in live mode, the value is true.
status VARCHAR
Status of the Transaction. One of: open, posted, void.
status_transitions STRUCT of 2 fields
The status transitions field of the treasury.transaction object.
STRUCT 2 fields
  • posted_atTIMESTAMP WITH TIME ZONE
  • void_atTIMESTAMP WITH TIME ZONE
raw JSON
The whole object as JSON, expansions included, secrets redacted.
Example

Count transactions by status

SELECT status, count(*) AS n
FROM stripe.treasury.transactions()
GROUP BY status
ORDER BY n DESC, status;
Link

Credentials

The secret type stripe declares, as reported by the worker itself.

stripe

How to get these credentials

Stripe API key (restricted key with read permissions recommended), plus optional Connect account and API version

secret.sql
CREATE SECRET stripe (
    TYPE stripe,
    api_key        '<STRIPE_API_KEY>',  -- secret
    stripe_account '<stripe_account>',
    api_version    '<api_version>',
    base_url       '<base_url>'
);
Key Type Required Description
api_key secret VARCHAR — Stripe API key: a restricted key (rk_live_… / rk_test_…) with read permissions is recommended; a secret key (sk_…) also works but can write.
stripe_account VARCHAR — Connect: read this connected account (acct_…) via the Stripe-Account header.
api_version VARCHAR — Stripe-Version to send (default 2026-09-30.endive).
base_url VARCHAR — API base URL (default https://api.stripe.com); http:// is accepted only for 127.0.0.1/localhost fixtures.

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching stripe — the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

charges_columns — The charges() result columns (binds only; create a stripe secret and drop LIMIT 0 for rows)

SELECT id, amount, amount_decimal, currency, status, created
FROM stripe.main.charges()
LIMIT 0;

Uses chargescharges

balance_transactions_columns — The balance_transactions() result columns (binds only; create a stripe secret and drop LIMIT 0 for rows)

SELECT id, type, amount, fee, net, available_on
FROM stripe.main.balance_transactions()
LIMIT 0;

Uses balance_transactionsbalance_transactions

Your account's country and default currency from the raw account object

SELECT body->>'$.country' AS country,
  body->>'$.default_currency' AS currency
FROM stripe.api.get('/v1/account')

Uses get

Key fields of the balance (/v1/balance)

SELECT livemode FROM stripe.balance.balance()

Uses balancebalance

Key fields of the balance settings (/v1/balance_settings)

SELECT raw FROM stripe.balance.balance_settings()

Uses balance_settings

The first ten country specs by id

SELECT id, default_currency
FROM stripe.balance.country_specs()
ORDER BY id
LIMIT 10

Uses country_specs

175 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • What is the total amount of succeeded charges per currency, in major units?
  • Which charges failed, and with what failure code?
  • How much has been refunded in total per currency (major units)?
  • Which disputes still need a response, and how much is at stake?
  • What are the total Stripe fees per balance transaction type in USD (major units)?
  • List the paid payouts and their arrival dates.

Stripe is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.