Skip to content
cccskills
FreePublished on GitHub

stripe

Query Stripe customer records to review invoices, recent charges and payment intents, refunds, and subscriptions. It can also summarize billing by product over a chosen number of months, helping you inspect customer payment activity and billing history.

OriginalShow the original description

How to connect to and query the Stripe API for analytics data.

BuilderIO/agent-native7,526 stars(GitHub 7,526 + cccskills 0)
Works withStripe

Run score Not tested

See how to install

Good for

  • Review a customer's invoices for a selected period
  • Check recent charges and payment intents
  • Find refunds linked to a customer
  • View active subscriptions or billing by product

Files included (1)

  • SKILL.md3.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Stripe Integration

Connection

  • Base URL: https://api.stripe.com
  • Auth: Bearer token via the per-user/org STRIPE_SECRET_KEY credential
  • Server lib: server/lib/stripe.ts
  • Routes: server/routes/stripe.ts
  • Dashboard: app/pages/adhoc/stripe/ (tool page, not metrics dashboard)

Credential

  • STRIPE_SECRET_KEY — configure in Settings → Data sources

Agent Action

Use stripe for agent-facing Stripe work. Do not call /api/stripe/* directly from the agent.

ModeArgsDescription
billingemail, customerId, query, monthsInvoices for a customer in timeframe
payment-statusemail, customerId, queryRecent charges + payment intents
refundsemail, customerId, queryRefunds associated with customer
subscriptionsemail, customerId, queryActive subscriptions
billing-by-productemail, customerId, query, monthsBilling aggregated by product

API Routes

RouteMethodParamsDescription
/api/stripe/billingGETemail, months (default 6)Invoices for a customer in timeframe
/api/stripe/payment-statusGETemailRecent charges + payment intents
/api/stripe/refundsGETemailRefunds associated with customer
/api/stripe/subscriptionsGETemailAll subscriptions (active + inactive)

All routes resolve email → Stripe customer ID(s) internally.

Exported Functions (server/lib/stripe.ts)

  • getCustomersByEmail(email) — lookup customers by email
  • getInvoices(customerId, months?) — invoices, optionally filtered by timeframe
  • getCharges(customerId, limit?) — recent charges
  • getPaymentIntents(customerId, limit?) — recent payment intents
  • getSubscriptions(customerId) — all subscriptions (status=all)
  • getRefunds(customerId) — refunds via charge lookup

Gotchas

  • Stripe /v1/refunds does NOT support customer filter. The lib works around this by fetching customer charges first, then fetching refunds for refunded charges.
  • One email can map to multiple Stripe customer objects. All routes handle this by aggregating across all matching customers.
  • Amounts in Stripe are in cents (smallest currency unit). Divide by 100 for display.
  • Cache TTL is 5 minutes (shorter than other integrations since billing data changes more frequently).
  • The expand parameter is used for invoices (line items) and subscriptions (price details).

Client Hooks (app/lib/api-hooks.ts)

  • useStripeBilling(email, months, enabled)
  • useStripePaymentStatus(email, enabled)
  • useStripeRefunds(email, enabled)
  • useStripeSubscriptions(email, enabled)

All hooks use enabled flag — data is only fetched when a button is clicked.

UI Pattern

The Stripe page is a tool (not a dashboard). It has:

  1. Email input field
  2. Four action buttons (Billing History, Payment Status, Refund Status, Subscriptions)
  3. Results panel that shows data for whichever action was last triggered

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

a2a-assets

FreeSummary

Generate, refine, export, and place brand images or videos from an Assets library into another app. The skill covers choosing a library, handling image batches and video runs, and updating selected assets after feedback.

  • Generate brand images for slides or another app
  • Refine an existing asset after feedback
  • Create and export a video asset
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

account-health

FreeSummary

Prepare a customer account health, renewal, or contract usage readout. Verify the account identity, use approved metric definitions, compare contracted capacity with actual usage, and trace findings to sources, time windows, and known gaps.

  • Preparing a named customer's account health review
  • Comparing contracted seats or capacity with usage
  • Gathering adoption signals before a renewal or QBR
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

actions

FreeSummary

Create focused app actions that agents can call as tools and frontend code can use through client hooks. Use them to add provider integrations or fetch UI data, with validated inputs and structured results.

  • Adding a new app operation
  • Connecting an external provider API
  • Fetching data for a frontend view
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adding-a-feature

FreeSummary

Use this checklist when adding a feature or integration to an agent-native app. It covers the user interface, agent-callable actions, instructions, and app-state sync so both the user and agent can work with the capability consistently.

  • Planning a new feature across UI and agent actions
  • Checking that agent changes appear in the UI
  • Documenting actions and feature state for the agent
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adhoc-analysis

FreeSummary

Investigate complex questions by combining data from multiple sources, then summarize patterns, metrics, and evidence in a clear report. Save requested analyses as dashboards with instructions for future refreshes.

  • Comparing CRM deals with call records
  • Investigating customer health across systems
  • Saving a repeatable performance analysis
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

admin-surfaces

FreeSummary

Use the Analytics admin surfaces to inspect and change workspace feature flags, review dashboard ownership and usage activity, or browse and edit databases connected from other agent-native apps. The skill guides administrators to the relevant view and actions.

  • Review dashboard owners, views, and edits
  • Change a workspace feature flag for an app
  • Browse or edit a connected app database
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

See all skills by BuilderIO

Report a problem with this skill