agentskit.js
ToolsIntegrations

stripe

Stripe API — create customers, payment intents. For checkout assistants + dunning agents.

import { stripe } from '@agentskit/tools'

const runtime = createRuntime({
  adapter,
  tools: [...stripe({ apiKey: process.env.STRIPE_API_KEY! })],
})

Sub-tools

NamePurpose
stripeCreateCustomerCreate a customer with email + metadata
stripeCreatePaymentIntentServer-side intent creation for a checkout flow

Bundled: stripe(config).

Config

type StripeConfig = {
  apiKey: string          // restricted or secret key (use restricted for agents)
  apiVersion?: string     // e.g. '2025-01-27.acacia'
  fetch?: typeof fetch
}

Example — checkout assistant

const runtime = createRuntime({
  adapter,
  systemPrompt: 'Gather name + email + amount, then create Stripe customer + intent. Never call Stripe without confirm.',
  tools: [
    ...stripe({ apiKey: process.env.STRIPE_API_KEY! }),
    hitlTool,
  ],
})

Safety

  • Use restricted keys scoped to just customers:write + payment_intents:write.
  • Always gate via HITL — money moves.
  • Log every call via signed audit log.
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page