Skip to content

Databases

Stripe Payments and Billing Data in VS Code

Stripe is a payments platform for online businesses. DBCode connects to your Stripe account’s API and presents its payments and billing data as read-only tables. Key characteristics include:

  • Read-only API bridge: DBCode calls the Stripe API rather than connecting to a database, so every table is a live view of your Stripe account
  • Typed columns: Fields are typed from Stripe’s object model, so amounts, timestamps, and status enums display correctly in the grid
  • Relationship navigation: Foreign-key-style links between tables, for example a charge to its customer, let you jump between related records
  • Test and live modes: Test-mode keys expose Stripe’s sandbox data, live keys expose your real account data

DBCode is ideal for exploring and filtering your Stripe data without leaving Visual Studio Code or writing code against the Stripe API.

To connect to Stripe in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Create a restricted API key in Stripe: In the Stripe Dashboard, go to Developers > API keys > Create restricted key and grant read permissions on the resources you want to browse, for example Customers, Charges, and Subscriptions
  4. Complete connection form: Select Stripe as the database type and paste the key into API Key
  5. Connect: Click save to establish your connection.
  6. Start exploring: The database node is named test or live, matching the mode of the key you used.

Secret keys (sk_...) also work, but a restricted key scoped to only the resources you need is recommended. Publishable keys (pk_...) cannot be used, since they don’t grant API read access. Test-mode keys show Stripe’s test data, live-mode keys show your real account data.

For detailed instructions on connecting to databases, refer to the Connect article.

DBCode enhances your Stripe experience with:

  • 18 tables: balance_transactions, charges, checkout_sessions, coupons, credit_notes, customers, disputes, events, invoice_items, invoices, payment_intents, payouts, prices, products, promotion_codes, refunds, setup_intents, and subscriptions
  • Typed columns: Money fields are stored in Stripe’s minor units (for example cents) as integers, alongside a separate currency column, matching how Stripe’s API represents amounts
  • Relationship navigation: Jump between related records, such as a charge and its customer, using DBCode’s relationship links
  • Data exploration: Preview and export table data

Grid filters push down to the Stripe API wherever Stripe supports server-side filtering: created-date ranges, status, customer, and email are supported broadly, and Stripe’s Search API adds richer filters on seven searchable resources (charges, customers, invoices, payment_intents, prices, products, and subscriptions). If you apply a filter Stripe’s API can’t evaluate server-side, DBCode shows a clear message rather than returning the wrong rows.

Stripe support is in Preview, and some limitations apply:

  • No sorting: Rows are always returned newest-first, since Stripe’s API has no server-side sort, so columns cannot be sorted
  • No row counts: Total row counts are not available for Stripe tables
  • Read-only: The connection is read-only, there is no insert, update, or delete
  • SELECT-only SQL: SQL queries support SELECT only, see Universal SQL below

Stripe query editors accept SQL SELECT statements. The connection is read-only, so INSERT, UPDATE, and DELETE return a clear error rather than running. See Universal SQL for how the translation works across databases.

SELECT * FROM customers WHERE created > '2026-01-01' LIMIT 10
SELECT * FROM charges WHERE id = 'ch_123'

Filters push down to the Stripe API: created and other date ranges and resource-specific equality parameters are sent directly, id lookups (a single id or an IN list) fetch those records directly, and other fields use Stripe’s Search API where the resource supports it. Results always return newest-first - ORDER BY is not supported and returns a clear error, as does any SQL construct the API cannot serve, such as JOINs or GROUP BY.

StatementSupport
SELECTYes
SELECT COUNT(*)No
INSERT / UPDATE / DELETENo - read-only, returns a clear error
  • created and other date columns: ranges or date equality push down directly; a bare date like '2026-03' expands to that period
  • Resource-specific equality filters: whichever columns Stripe’s list API accepts for that resource, for example status, customer, or email
  • id: equality or an IN list fetches those records directly
  • Other searchable fields: pushed through Stripe’s Search API where the resource supports it
  • WHERE combinators: AND only - OR is not supported
  • LIMIT and OFFSET are both supported; OFFSET is applied client-side over the API’s cursor paging
  • Results always return newest-first; ORDER BY returns a clear error

Not supported: joins, GROUP BY, aggregates, subqueries, aliases, UNION, and OR - each returns a clear error naming the construct.

By using Stripe with DBCode, you can explore your payments and billing data directly within Visual Studio Code.

For more information about Stripe, visit stripe.com.