Skip to content
← Community packages

@kentcdodds/stripe

by @kentcdoddsFollow @kentcdodds

Stripe helpers for customers, payments, invoices, subscriptions, products, payment links, refunds, and balance.

  • stripe
  • payments
  • billing
  • invoices
  • subscriptions
  • finance
License
MIT
Published
July 19, 2026
Pinned commit
f30997a
Rating
No ratings yet
Forks
0
Stars
1
Adaptation effort

One-click install

Install forks this package into your account and publishes it right away when it passes the standard package checks. This listing has not been reviewed by an admin.

Log in to install this package.

Fork with your agent

Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.

Use Kody to fork the community package "@kentcdodds/stripe" (listing id: e027e1e9-e333-497f-8b78-3a818ed6282b). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.

README

@kentcdodds/stripe

Intent

Full-surface Stripe helpers so Kody agents can read and manage customers, payments, invoices, subscriptions, products, prices, payment links, refunds, payouts, and balance on the owner's Stripe account without hand-rolling API calls. Reads are free-form; money-moving and destructive mutations are guarded behind an explicit confirm: true input.

Required setup

  • stripeSecretKey secret (user scope) — a Stripe secret key (sk_...) or restricted key (rk_...) from dashboard.stripe.com/apikeys with the scopes you want available
  • Host approvals for api.stripe.com and files.stripe.com in the account security UI
  • Approval for this package to use the stripeSecretKey secret (account secrets UI)

Exports

  • kody:@kentcdodds/stripe — action dispatcher (defaults to smoke-test); also re-exports every helper below
  • kody:@kentcdodds/stripe/accountgetAccount, getBalance, listBalanceTransactions, listPayouts, listEvents
  • kody:@kentcdodds/stripe/customerslistCustomers, searchCustomers, getCustomer, createCustomer, updateCustomer, deleteCustomer
  • kody:@kentcdodds/stripe/paymentslistPaymentIntents, getPaymentIntent, searchPaymentIntents, listCharges, getCharge, searchCharges, listRefunds, createRefund
  • kody:@kentcdodds/stripe/invoiceslistInvoices, getInvoice, searchInvoices, createInvoice, finalizeInvoice, sendInvoice, voidInvoice, deleteDraftInvoice
  • kody:@kentcdodds/stripe/subscriptionslistSubscriptions, getSubscription, searchSubscriptions, createSubscription, cancelSubscription
  • kody:@kentcdodds/stripe/productslistProducts, getProduct, createProduct, archiveProduct, listPrices, createPrice, listPaymentLinks, createPaymentLink, deactivatePaymentLink
  • kody:@kentcdodds/stripe/smoke-test — read-only account/balance/sample smoke test

The root export also exposes the low-level transport (stripeRequest, stripeList, stripeSearch, stripeParams, stripeUploadFile, StripeApiError, formatStripeAmount, stripeDate) for any endpoint the typed helpers do not cover. stripeRequest accepts { path, method, query, body, idempotencyKey } and stays pinned to https://api.stripe.com/v1.

Safety model

  • Reads and searches never require confirmation.
  • createRefund, createSubscription, cancelSubscription, finalizeInvoice, sendInvoice, voidInvoice, deleteDraftInvoice, deleteCustomer, archiveProduct, and deactivatePaymentLink throw unless called with confirm: true.
  • POST helpers accept an optional idempotencyKey and only retry automatically when one is provided.
  • Amounts are Stripe integer amounts in the smallest currency unit (cents for USD); summaries include a human-readable display string.

Example

import stripe from 'kody:@kentcdodds/stripe'

export default async function main() {
	return await stripe({
		action: 'search-charges',
		searchQuery: "billing_details.email:'ada@example.com'",
		maxItems: 10,
	})
}

Stars

1 star

Log in to star this package.

Report this listing

Log in to report this listing.