Stripe Payments and Billing Data in VS Code
Overview
Section titled “Overview”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.
Connecting
Section titled “Connecting”To connect to Stripe in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- 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
- Complete connection form: Select Stripe as the database type and paste the key into API Key
- Connect: Click save to establish your connection.
- Start exploring: The database node is named
testorlive, 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.
Stripe Features in DBCode
Section titled “Stripe Features in DBCode”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, andsubscriptions - 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
Filtering
Section titled “Filtering”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.
Preview limitations
Section titled “Preview limitations”Stripe support is in Preview, and the connection is browse-only:
- 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
- No SQL yet: SQL queries are not supported yet; querying with Stripe Sigma is planned
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.