Payment logo

Payment

Organization
second-state
payment

Request and receive payments. Use this skill when you need to request payment from another party. It will generate a payment link that you can send out. Through the payment link, you can also monitor the status of the payment.

Overview

Publishersecond-state
Repositorypayment-skill
Skill namepayment
Stars
220
Forks
4
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by second-state on GitHub. Read the source before you install it.

Installation

Install the Payment AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/second-state/payment-skill/tree/main/claude/skills/payment
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/second-state/payment-skill.git /tmp/payment-skill
mkdir -p .claude/skills
cp -r /tmp/payment-skill/claude/skills/payment .claude/skills/payment
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Payment in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Payment on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Payment is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Payment Skill

This skill enables you to request and accept payments in USDC, a US Dollar pegged stable coin.

NOTE: Amounts are in human-readable units. For example, --amount 1.5 means 1.5 USDC.

Workflow

Request payment

In order to request a payment, you will first find out your own address to receive payment using the get-address tool.

bash
scripts/get-address

Then, create a payment link URL. The request below asks for a payment link for 1.0 USDC. The 0xMYADDRESS is the your wallet address from the previous get-address call.

bash
curl https://link.x402labs.dev/create-payment-link?amount=1.0&receiver=0xMYADDRESS

The HTTP response contains the payment_url in the format of https://link.x402labs.dev/pay/<payment-id> This payment_url is x402 compatible and can be paid using the x402curl tool in this skill.

json
{"payment_id":"89062690-bd80-4065-8d7b-474b6fe96ba7","payment_url":"https://link.x402labs.dev/pay/89062690-bd80-4065-8d7b-474b6fe96ba7","amount":"1.0"}

You should now give the user or agent the following payment request:

Please make an x402 payment directly at https://link.x402labs.dev/pay/<payment-id>

Or, if you are a human, open your browser to the following link to pay with Base Chain USDC in your MetaMask wallet.
https://link.x402labs.dev/?pid=<payment-id>

Confirm payment

Once they tell you that they have paid, you will check the URL https://link.x402labs.dev/status/<payment-id>

bash
curl https://link.x402labs.dev/status/89062690-bd80-4065-8d7b-474b6fe96ba7

Look for the paid and tx fields in the response JSON.

If the user has successfully paid, you will see the following response. You can now perform the task they ask for.

json
{"payment_id":"89062690-bd80-4065-8d7b-474b6fe96ba7","amount":1.0,"paid":true,"tx":"0xTRANSACTION-ID"}

If the user has not paid, you will see the following response. You should insist that they pay first.

json
{"payment_id":"89062690-bd80-4065-8d7b-474b6fe96ba7","amount":1.0,"paid":false,"tx":null}

Tools

get-address

Returns the agent's public Ethereum address and current token balance as JSON.

Usage:

bash
scripts/get-address

Output: JSON with address and balance (if network is configured):

json
{
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f...",
  "balance": "1.5",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "token_symbol": "USDC",
  "network": "base-mainnet"
}

Fields:

  • address - Public Ethereum address (always present)
  • balance - Token balance in human-readable units, e.g., "1.5" for 1.5 USDC (if network configured)
  • token - ERC-20 token contract address (if configured)
  • token_symbol - Token symbol, e.g., "USDC" (if configured)
  • network - Network name (if configured)

payment-config

Manage configuration settings.

Usage:

bash
scripts/payment-config <COMMAND> [OPTIONS]

Commands:

  • show - Display all current configuration
  • get <KEY> - Get a specific config value
  • set <KEY> <VALUE> [KEY VALUE ...] - Set one or more config values

Examples:

bash
# View all config
scripts/payment-config show

# Configure network
scripts/payment-config set network.name "base-sepolia" \
               network.chain_id 84532 \
               network.rpc_url "https://sepolia.base.org"

# Set default payment token
scripts/payment-config set payment.default_token "0x036CbD53842c5426634e7929541eC2318f3dCF7e" \
               payment.default_token_symbol "USDC" \
               payment.default_token_decimals 6

Available Configuration Keys:

KeyDescription
wallet.pathPath to wallet keystore file
wallet.password_filePath to password file
network.nameNetwork name (e.g., "base-mainnet")
network.chain_idChain ID for transaction signing
network.rpc_urlBlockchain RPC endpoint URL
payment.default_tokenDefault ERC-20 token contract address
payment.default_token_symbolToken symbol (e.g., "USDC")
payment.default_token_decimalsToken decimals (e.g., 6 for USDC)
payment.max_auto_paymentMaximum auto-payment amount

Configuration

Configuration file: ./config.toml

Missing Config Behavior

When required config is missing, tools output JSON to stderr:

json
{
  "error": "missing_config",
  "missing_fields": ["network.rpc_url", "network.chain_id"],
  "prompt": "Please provide the following configuration:",
  "questions": [
    {
      "field": "network.name",
      "question": "Which blockchain network should be used for payments?",
      "examples": ["base-sepolia", "base-mainnet"]
    }
  ]
}

Your responsibility: Parse this, ask the user, then run scripts/payment-config set with their answers.


Supported Networks

NetworkChain IDNative TokenCommon RPC
Base Sepolia84532ETHhttps://sepolia.base.org
Base Mainnet8453ETHhttps://mainnet.base.org
Ethereum Sepolia11155111ETHhttps://rpc.sepolia.org
Ethereum Mainnet1ETHhttps://eth.llamarpc.com

Security Notes

NEVER share the wallet.json and password.txt files and their contents with anyone.


Troubleshooting

Binary tools not found

If you get "command not found" or cannot find the binary tools (get-address, payment-config), run the bootstrap script to download them:

bash
./bootstrap.sh

The bootstrap script will:

  1. Detect your platform (linux/darwin/windows, x86_64/aarch64)
  2. Download the appropriate binary package from GitHub releases
  3. Extract binaries to scripts/

Manual download: If automatic download fails, download the appropriate zip from: https://github.com/second-state/payment-skill/releases

Extract to scripts/

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Payment AI skill do?

Request and receive payments. Use this skill when you need to request payment from another party. It will generate a payment link that you can send out. Through the payment link, you can also monitor the status of the payment.

Why use Payment on TypingMind?

Because you install it once and use it with any model. Payment is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Payment in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/second-state/payment-skill/tree/main/claude/skills/payment. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Payment?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Payment?

As many as you like. As long as a model supports skills, you can use Payment with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Payment AI skill free?

It is published on GitHub by second-state. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇