npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yuno-payments/agent-toolkit

v0.1.0

Published

> AI framework integrations for the Yuno payment platform

Readme

@yuno-payments/agent-toolkit

AI framework integrations for the Yuno payment platform

The Yuno Agent Toolkit enables popular AI agent frameworks including Vercel AI SDK and Google Genkit to integrate with Yuno payment APIs through function calling. Built with TypeScript and designed for excellent developer experience with full type safety.

npm version License: MIT

Features

  • 🚀 Multiple Framework Support - Works with Vercel AI SDK and Google Genkit
  • 🔒 Type-Safe - Full TypeScript support with comprehensive types
  • 📦 Modular - Import only what you need (customers, payments, etc.)
  • 🎯 Modern - Built on latest dependencies and best practices
  • 🔧 Easy Setup - Simple configuration with environment variables
  • 📚 Well Documented - Comprehensive examples and API documentation

Installation

npm install @yuno-payments/agent-toolkit

Requirements

  • Node.js 18+
  • A Yuno account with API credentials (Sign up here)

Quick Start

Vercel AI SDK

import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { yunoAgentToolkit } from "@yuno-payments/agent-toolkit/ai-sdk";

// Initialize the toolkit
const yunoToolkit = yunoAgentToolkit({
  accountCode: process.env.YUNO_ACCOUNT_CODE!,
  publicApiKey: process.env.YUNO_PUBLIC_API_KEY!,
  privateSecretKey: process.env.YUNO_PRIVATE_SECRET_KEY!,
});

// Use all tools or specific categories
const tools = yunoToolkit.allTools();
// const tools = yunoToolkit.customers(); // Only customer tools
// const tools = yunoToolkit.payments();  // Only payment tools

// Generate text with AI
const { text } = await generateText({
  model: openai("gpt-4"),
  tools,
  maxSteps: 10,
  prompt: "Create a customer named John Doe with email [email protected]",
});

console.log(text);

Google Genkit

import { genkit } from "genkit";
import { googleAI, gemini15Pro } from "@genkit-ai/googleai";
import { yunoGenkitToolkit } from "@yuno-payments/agent-toolkit/genkit";

// Initialize Genkit
const ai = genkit({ plugins: [googleAI()] });

// Initialize the toolkit
const yunoToolkit = yunoGenkitToolkit({
  accountCode: process.env.YUNO_ACCOUNT_CODE!,
  publicApiKey: process.env.YUNO_PUBLIC_API_KEY!,
  privateSecretKey: process.env.YUNO_PRIVATE_SECRET_KEY!,
  ai,
});

// Define a prompt with tools
const myAgent = ai.definePrompt({
  name: "paymentAgent",
  model: gemini15Pro,
  tools: yunoToolkit.getToolsArray(),
  input: {
    schema: z.object({
      query: z.string(),
    }),
  },
});

// Execute
const result = await myAgent({ query: "Create a payment for $50" });
console.log(result.text);

Available Tools

The Yuno AI provides comprehensive access to Yuno's payment platform:

Customer Management

  • customerCreate - Create a new customer
  • customerRetrieve - Retrieve customer by ID
  • customerRetrieveByExternalId - Retrieve by external ID
  • customerUpdate - Update customer information

Payment Processing

  • paymentCreate - Create a payment
  • paymentRetrieve - Retrieve payment information
  • paymentRetrieveByMerchantOrderId - Retrieve by merchant order ID
  • paymentRefund - Refund a payment
  • paymentCancel - Cancel a pending payment
  • paymentAuthorize - Authorize a payment
  • paymentCaptureAuthorization - Capture authorized payment

Checkout Sessions

  • checkoutSessionCreate - Create a checkout session
  • checkoutSessionCreateOtt - Generate One-Time Token
  • checkoutSessionRetrievePaymentMethods - Get available payment methods

Payment Methods

  • paymentMethodEnroll - Enroll a payment method
  • paymentMethodRetrieve - Retrieve payment method
  • paymentMethodRetrieveEnrolled - List enrolled methods
  • paymentMethodUnenroll - Remove a payment method

Subscriptions

  • subscriptionCreate - Create a subscription
  • subscriptionRetrieve - Get subscription details
  • subscriptionUpdate - Update subscription
  • subscriptionPause - Pause subscription
  • subscriptionResume - Resume subscription
  • subscriptionCancel - Cancel subscription

Payment Links

  • paymentLinkCreate - Create a payment link
  • paymentLinkRetrieve - Get payment link details
  • paymentLinkCancel - Cancel a payment link

And more...

  • Recipients management
  • Installment plans
  • Routing configuration

See full API documentation →

Usage

Selective Tool Loading

You can load only the tools you need:

// Load all tools
const allTools = yunoToolkit.allTools();

// Load specific categories
const customerTools = yunoToolkit.customers();
const paymentTools = yunoToolkit.payments();
const subscriptionTools = yunoToolkit.subscriptions();

// Get a single tool
const createCustomerTool = yunoToolkit.getTool("customerCreate");

Environment Variables

Set your Yuno credentials:

YUNO_ACCOUNT_CODE=your_account_code
YUNO_PUBLIC_API_KEY=your_public_api_key
YUNO_PRIVATE_SECRET_KEY=your_private_secret_key

Get your credentials from the Yuno Dashboard.

Examples

Check out the examples directory for complete working examples:

  • Vercel AI SDK - Basic usage, streaming, multi-step workflows
  • Google Genkit - Prompts, tools, and flows

API Reference

Vercel AI SDK

import { yunoAgentToolkit } from "@yuno-payments/agent-toolkit/ai-sdk";

const toolkit = yunoAgentToolkit(config);

Methods:

  • allTools() - Get all available tools
  • customers() - Get customer management tools
  • payments() - Get payment processing tools
  • checkoutSessions() - Get checkout session tools
  • paymentMethods() - Get payment method tools
  • subscriptions() - Get subscription tools
  • paymentLinks() - Get payment link tools
  • recipients() - Get recipient tools
  • installmentPlans() - Get installment plan tools
  • routing() - Get routing tools

Google Genkit

import { yunoGenkitToolkit } from "@yuno-payments/agent-toolkit/genkit";

const toolkit = yunoGenkitToolkit(config);

Methods: (Same as Vercel AI SDK, plus)

  • getToolsArray(genkitInstance?) - Get tools as array for Genkit prompts
  • getTool(toolName, genkitInstance?) - Get a specific tool by name

Architecture

This toolkit is built on top of:

  • @yuno/yuno-mcp - Core Yuno API tools and schemas
  • Framework adapters that convert MCP tools to framework-specific formats

Development

# Install dependencies
npm install

# Build
npm run build

# Type checking
npm run typecheck

# Linting
npm run lint

# Testing
npm run test

# Watch mode
npm run dev

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

License

MIT © Yuno Payments

Support

Related Projects


Made with ❤️ by Yuno Payments