Two agents, one limit, one refused.

Payments integration

Stripe, in your agent's hands and under your limits.

Let an agent look up customers, payments, invoices and subscriptions, and issue refunds without the power to empty the account. Every refund counts in money against one ceiling shared by every agent and key, a large one waits for a person, and the result is read back from Stripe.

Connect

API key

bound to api.stripe.com

What you create

  • A restricted key you create
  • Customers, Refunds, Invoices and Subscriptions: Write
  • Payment Intents, Charges and Balance: Read
  1. 01In Stripe, open Developers, API keys, and create a restricted key with Refunds: Write.
  2. 02In Anlyon, open Actions, then Integrations, choose Stripe and paste the key.
  3. 03Anlyon checks the key with Stripe before storing it. It becomes a secret named STRIPE, bound to api.stripe.com.
  4. 04Declare one refund action with the Stripe adapter, naming your account, the mode and the currency.

Connecting allows nothing by itself. No API returns the credential afterwards, to you, to the console or to an agent, and Anlyon refuses to send it anywhere but api.stripe.com.

Operations

Each one is a named tool, off until you switch it on, and Anlyon makes every call with the credential your agent never sees. Reads return what Stripe answers and change nothing. Writes count against a limit you set, can wait for a person, and are read back from Stripe wherever it allows.

Reads

List customers

stripe-list-customers

List customers, optionally only those whose email is exactly this one (Stripe compares case-sensitively). 20 per page, newest first; when has_more is true, pass the last customer's id as starting_after (cus_...) for the next page.

Get customer

stripe-get-customer

Get one customer by id: email, name, description, phone, balance, metadata and invoice settings. A deleted customer returns only its id and deleted: true.

Search customers

stripe-search-customers

Search customers with Stripe's search query language, for example email:'jane@example.com', name~'Jane' or metadata['crm_id']:'42'. 20 per page; when has_more is true, pass next_page as page.

List payment intents

stripe-list-payment-intents

List payment intents, optionally for one customer. Returns amount, amount_received, currency, status and latest_charge for each. 10 per page, newest first; when has_more is true, pass the last payment intent's id as starting_after (pi_...) for the next page.

Get payment intent

stripe-get-payment-intent

Get one payment intent by id: amount, amount_received, currency, status, customer, latest_charge and last_payment_error. Use it before refund-payment to see what was paid.

List charges

stripe-list-charges

List charges, optionally for one customer or one payment intent. Returns amount, amount_refunded, refunded, disputed, outcome and card brand and last4 for each. 10 per page, newest first; when has_more is true, pass the last charge's id as starting_after (ch_... or py_...) for the next page.

Get charge

stripe-get-charge

Get one charge by id: amount, amount_refunded, refunded, disputed, failure_code, outcome, receipt_url and payment method details.

List refunds

stripe-list-refunds

List refunds, optionally for one charge or one payment intent. Returns amount, currency, status and reason for each. 20 per page, newest first; when has_more is true, pass the last refund's id as starting_after (re_... or pyr_...) for the next page.

Get refund

stripe-get-refund

Get one refund by id: amount, currency, status (pending, requires_action, succeeded, failed or canceled), reason and the charge and payment intent it belongs to.

List invoices

stripe-list-invoices

List invoices, optionally for one customer or subscription, or in one status. Each invoice carries its first line items, so pages are small. 5 per page, newest first; when has_more is true, pass the last invoice's id as starting_after (in_...) for the next page.

Get invoice

stripe-get-invoice

Get one invoice by id: status, amounts due, paid and remaining, due date, hosted invoice URL and its line items. An invoice with many lines can be cut at the response limit.

List subscriptions

stripe-list-subscriptions

List subscriptions, optionally for one customer or one price, or in one status. Without status Stripe returns every subscription that is not canceled; pass all for every status. 10 per page, newest first; when has_more is true, pass the last subscription's id as starting_after (sub_...) for the next page.

Get subscription

stripe-get-subscription

Get one subscription by id: status, cancel_at_period_end, cancel_at, canceled_at, its items with price and current period, and latest_invoice.

Get balance

stripe-get-balance

Get the account's balance: the amounts available and pending, per currency, in minor units.

List balance transactions

stripe-list-balance-transactions

List the transactions that make up the balance (charges, refunds, fees, payouts and so on), optionally of one type, from one payout, or for one source object. Returns amount, fee, net, status and available_on for each. 25 per page, newest first; when has_more is true, pass the last transaction's id as starting_after (txn_...) for the next page.

Writes

Refund payment

stripe-refund-payment

Refund part or all of one payment intent, in minor units of the pack's currency, from the account and in the mode fixed at install. Stripe's idempotency key and a read-back of the refund grade the receipt; a refund can stay pending and finish later. Refunds cannot be reversed.

Read back

Read back from Stripe by Anlyon's own Stripe adapter.

Create customer

stripe-create-customer

Create one customer with this email, and optionally a name, description, phone and metadata.

emailnamedescriptionphonemetadata

Read back

Read back by the new customer's id; the email must match.

Update customer

stripe-update-customer

Change one customer's email, name, description or phone, or merge keys into its metadata; fields left out are not changed.

customer_idemailnamedescriptionphonemetadata

Read back

Read back by id; the customer's email and name must equal what Stripe returned for the update.

Delete customer

stripe-delete-customer

Permanently delete one customer. Stripe also cancels the customer's active subscriptions at once and removes its saved cards; this cannot be undone.

customer_id

Read back

Read back by id; Stripe keeps deleted customers readable, and deleted must be true.

Cancel subscription

stripe-cancel-subscription

Cancel one subscription now. The customer is not charged for it again; invoice_now bills un-invoiced usage and pending prorations at once, and prorate credits the unused time. This cannot be undone.

subscription_idinvoice_nowproratecomment

Read back

Read back by id; the status must be canceled.

Set subscription cancel at period end

stripe-set-subscription-cancel-at-period-end

Set whether one subscription cancels at the end of its current period (true) or keeps renewing (false); nothing is canceled now.

subscription_idcancel_at_period_end

Read back

Read back by id; cancel_at_period_end must equal the value sent.

Finalize invoice

stripe-finalize-invoice

Finalize one draft invoice so it gets a number and can be paid, with automatic collection turned off: Stripe does not charge or email the customer because of this call.

invoice_id

Read back

Read back by id; the status must be open.

Void invoice

stripe-void-invoice

Void one finalized invoice that is not paid, so it can no longer be paid; it stays on record. This cannot be undone.

invoice_id

Read back

Read back by id; the status must be void.

The brake

Suggested limits

  • Refunds: 500.00 USD a day
  • 100 customers created a day
  • 200 customers updated a day
  • 10 customers deleted a day
  • 10 subscriptions canceled a day
  • 20 subscription renewals changed a day
  • 50 invoices finalized a day
  • 10 invoices voided a day

Shared by every agent, session and key in the environment. You set the number.

Suggested approvals

  • A person approves refunds over 100.00
  • A person approves deleting a customer
  • A person approves canceling a subscription
  • A person approves scheduling a subscription to end
  • A person approves voiding an invoice

Installed turned off. The reviewer sees the exact request, and the approved request is the one that runs.

Before you rely on it

  • A repeated request refunds nothing twice: Stripe's own idempotency covers it.
  • The key's mode must match the mode you name. A live key is refused for a test-mode action.

Use it

1. Connect, from a terminal
npm install -g @anlyonhq/cli
anlyon auth login

# Shows where to create the key, then asks for it without echoing
anlyon connections add stripe --secret STRIPE

# From a clone of github.com/AnlyonHQ/anlyon-platform:
# see what would be installed, then switch on one operation
anlyon packs plan ./packs/stripe
anlyon packs install ./packs/stripe --action refund-payment --yes
2. Call it from your agent, TypeScript
import { Client } from "@anlyonhq/sdk";

const anlyon = new Client({ apiKey: process.env.ANLYON_AGENT_KEY! });

const { data } = await anlyon.actions.invoke(
  "stripe-refund-payment",
  {
    "paymentIntent": "pi_3P9xExample",
    "amount": "1200",
    "currency": "usd",
    "reason": "requested_by_customer"
  },
);

if (data?.pendingApproval) {
  console.log("Waiting for a person", data.approvalId);
} else {
  console.log(data?.status, data?.responseStatus);
}
Or hand it to Claude Code over MCP
# Claude Code. Sign in with the browser, no key to paste.
claude mcp add --transport http anlyon https://api.anlyon.com/mcp

# Then ask in plain words. Each operation you switched on is a tool.

Prefer to click?

The console does all of it: connect, switch operations on, set the limit, and copy the setup for your agent.

Free tier, no credit card. One command if you use Claude or Cursor.

$ claude mcp add anlyon -- npx -y @anlyonhq/mcp-server