
Pay with app
Pays OKX Agent Payments Protocol 402 challenges on X Layer, funding USDT0 via Uniswap
Pay with app is an open-source agent skill for finance and payments. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 236
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Pay with app
This skill handles HTTP 402 payment challenges from OKX's Agent Payments Protocol (APP) when the requested network is X Layer (chain 196). It walks the agent through parsing the challenge, checking the payer wallet's balance of the requested asset, and funding it through the Uniswap Trading API if it is short. It then signs an EIP-3009 TransferWithAuthorization and retries the original request with an X-PAYMENT header.
The skill enforces several gates: it refuses challenges that are not x402 version 1, use a scheme other than exact, or request a zero amount, and it requires a separate user confirmation before each transaction, including each swap, bridge and signature. Challenges on other chains are routed to the sibling pay-with-any-token skill.
It expects a PRIVATE_KEY environment variable, a Uniswap API key only when cross-chain funding is needed, jq, Foundry's cast, Node 18 or newer, and the viem library, which it offers to install into a cache directory after asking the user.
When your agent uses it
Pay HTTP 402 payment challenges issued by OKX's Agent Payments Protocol (APP) on X Layer using tokens from any chain via the Uniswap Trading API. Use this skill whenever the user encounters a 402 challenge whose network resolves to X Layer (chain 196), mentions "APP", "Agent Payments Protocol", "OKX agent payment", "OKX Onchain OS", "OKX agentic wallet", "x402 on X Layer", "USDT0", "x42", "Instant Payment", "Batch Payment", "pay for X Layer API", or wants to pay an OKX-backed merchant. Even when the user does not explicitly say APP, prefer this skill for any 402 challenge whose network resolves to X Layer (chain 196). For 402 challenges on other chains (Ethereum, Base, Arbitrum, Tempo) use pay-with-any-token instead.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Read, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(openssl:*), Bash(npx:*)…(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 3 files (73 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the uniswap-trading plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Uniswap/uniswap-ai
/plugin install uniswap-trading@uniswap-aiOr copy only this skill to ~/.claude/skills/pay-with-app:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pay-with-app &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/pay-with-app" ~/.claude/skills/pay-with-app &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/pay-with-app inside it instead.
Copy the skill folder to ~/.agents/skills/pay-with-app to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pay-with-app &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/pay-with-app" ~/.agents/skills/pay-with-app &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/pay-with-app inside it instead.
Copy the skill folder to ~/.cursor/skills/pay-with-app to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pay-with-app &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/pay-with-app" ~/.cursor/skills/pay-with-app &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/pay-with-app inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Uniswap/uniswap-ai.git --path packages/plugins/uniswap-trading/skills/pay-with-appOr copy the folder to ~/.gemini/skills/pay-with-app yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/pay-with-app:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pay-with-app &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/pay-with-app" ~/.copilot/skills/pay-with-app &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/pay-with-app inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.gitThen copy uniswap-ai/packages/plugins/uniswap-trading/skills/pay-with-app into your agent's skills folder as pay-with-app. Agents that support SKILL.md read one folder per skill.
What it does
- 402 challenge parsing
- Reads the x402 challenge fields and validates version, scheme, network and amount before any payment step.
- X Layer network check
- Confirms the challenge resolves to chain 196 and hands other networks to the sibling skill.
- Balance check and funding
- Compares the wallet's X Layer balance against the requested asset and routes funds via the Uniswap Trading API when short.
- EIP-3009 signing
- Builds the typed-data authorization using the token's own EIP-712 domain values and signs it with viem.
- Per-transaction confirmation gates
- Requires a separate explicit user approval before each approval, swap, bridge or signature step.
- Supported asset guidance
- Documents USDT0, USDG and USDC on X Layer, including the caveat that USDC lacks reliable routing there.
Good for
- Pay an OKX APP-backed API that returns a 402 on X Layer
- Top up USDT0 on X Layer from a same-chain swap before paying a merchant
- Check whether a 402 challenge is valid before signing anything
- Retry a paid request with a signed X-PAYMENT header
Pay with app FAQ
What does the skill need to run?
A PRIVATE_KEY environment variable, jq, Foundry's cast, Node 18 or newer and the viem package. A UNISWAP_API_KEY is needed only when the wallet must be funded through cross-chain routing.
Which 402 challenges does Pay with app handle?
Only those whose network resolves to X Layer (chain 196) and whose scheme is exact in x402 version 1. Challenges on other chains should go to pay-with-any-token.
Does Pay with app sign transactions without asking?
No. Each transaction, including approvals, swaps, bridges and the EIP-3009 signature, requires a separate confirmation from the user before it runs.
Can Pay with app bridge funds from other chains to X Layer?
Not reliably in this version. The documentation says Across does not currently support X Layer as a destination, so the cross-chain step is expected to be done outside the skill by the user.
How do I install Pay with app in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/pay-with-app to use it in all your projects, or to .claude/skills/pay-with-app in one project. Or install the uniswap-trading plugin, which includes it: /plugin marketplace add Uniswap/uniswap-ai, then /plugin install uniswap-trading@uniswap-ai.
Does Pay with app run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Pay with app?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Pay with app?
The closest alternatives to Pay with app are Pay with any token, Agent payment x402, Pay via agent wallet, Accept agent payments and Use agent wallet.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Uniswap/uniswap-ai

Guides your agent through configuring Uniswap CCA token auction contract parameters
- Open source
- 236 GitHub stars
- Finance and payments

Guides an agent through deploying Uniswap CCA auction contracts via the factory
- Open source
- 236 GitHub stars
- Developer tools

Plans Uniswap liquidity positions and generates pre-filled position deep links
- Open source
- 236 GitHub stars
- Finance and payments

Plans token swaps on Uniswap across chains and builds pre-filled swap links
- Open source
- 236 GitHub stars
- Finance and payments

Guides an agent to scaffold Uniswap v4 hook contracts via the OpenZeppelin Wizard MCP
- Open source
- 236 GitHub stars
- Developer tools

Security checklists and vulnerability patterns for building Uniswap v4 hooks safely
- Open source
- 236 GitHub stars
- Developer tools




