# Ap2

> Ap2 is an open-source agent skill for finance and payments. Lets an agent build or review AP2 signed payment mandates for shopping, merchants. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/ap2
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** ap2
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-12-02

## About

This skill guides an AI coding agent through the Agent Payments Protocol v0.2, which lets a shopping agent prove a user approved a specific purchase using signed Checkout and Payment Mandates built as SD-JWT verifiable credentials. It covers the roles involved (shopping agent, merchant, credential provider, payment processor and trusted surface), the Human Present and Human Not Present flows, and the open and closed mandate types with their constraints.

The skill sets out a step-by-step workflow: choose the protocol version and roles, assemble mandate content, obtain user-signed mandates, then present and verify them, with each verifier returning a signed receipt. Its invariants stress deterministic verification in code rather than LLM output, binding checkout hashes, key binding with cnf and sd_hash, rejecting unknown constraints and avoiding double spend. Reference files cover schemas, dispute evidence, integration with UCP, A2A and MCP, legacy v0.1 upgrades, and comparisons with Visa Trusted Agent Protocol, ACP and x402 v2.

Using it assumes familiarity with SD-JWT, OpenID4VP and TypeScript, since the bundled verification sketch is in TypeScript. It ships no scripts, and it is pinned to AP2 v0.2 as a draft build while the protocol moves into FIDO standardization.

## When your agent uses it

> AP2 Agent Payments Protocol: authorize AI agent payments with signed Checkout and Payment Mandates (SD-JWT verifiable digital credentials), following AP2 v0.2 (current, draft posture build; no preview). Use when building or reviewing a shopping agent, merchant, credential provider, payment processor or trusted surface in agent-initiated payments: open and closed mandates, mandate.checkout.1 and mandate.payment.1, checkout_jwt and checkout_hash, constraints such as checkout.line_items, payment.amount_range, payment.budget and payment.agent_recurrence, Human Present and Human Not Present flows, key binding with cnf and sd_hash, OpenID4VP delegation, mandate receipts, double-spend and dispute evidence, and how AP2 relates to A2A, MCP and UCP. Also upgrades v0.1 Intent and Cart Mandates and compares Visa Trusted Agent Protocol, Agentic Commerce Protocol (ACP) and x402 v2. Triggers: ap2, agent payments protocol, agentic payments, payment mandate, intent mandate, cart mandate, checkout mandate, verifiable intent.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/ap2)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/ap2)

## Features

- **Mandate authorization model:** Explains open and closed Checkout and Payment Mandates as SD-JWT credentials and how they bind together.
- **Role-based verification:** Sets out the checks each role in an AP2 transaction must run and the receipts it returns.
- **Human present and absent flows:** Covers purchases where the user approves live and autonomous purchases approved in advance.
- **Constraint evaluation rules:** Lists constraint types such as line items, amount ranges, budgets and recurrence, and how unknown ones fail.
- **Protocol version upgrade:** Gives a checklist for moving v0.1 Intent and Cart Mandates to the v0.2 format.
- **Security and dispute evidence:** Covers double-spend prevention, payment credential release and storing receipts for disputes.

## Good for

- Add AP2 Checkout Mandate verification to a merchant's checkout
- Review how a shopping agent handles user-signed payment mandates
- Plan an upgrade from AP2 v0.1 mandates to v0.2
- Design an autonomous purchase flow with open payment mandates and spending limits
- Compare AP2 with x402 or Agentic Commerce Protocol for agent payments

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/ap2`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.claude/skills/ap2 &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ap2` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ap2` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.agents/skills/ap2 &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ap2` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ap2` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.cursor/skills/ap2 &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ap2` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/ap2
```

Or copy the folder to `~/.gemini/skills/ap2` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ap2`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.copilot/skills/ap2 &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ap2` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/ap2` into your agent's skills folder as `ap2`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which AP2 version does the skill target?

It targets AP2 v0.2, pinned to repository tag v0.2.0 and described as a draft posture build, while AP2 v0.1 is treated as legacy to upgrade from.

### What does the skill need from the user?

It asks for the target version, the role being built, the delegation model, the commerce protocol carrying AP2 and the revision, unless the user names another.

### Is the skill open source?

Yes, it is licensed under MIT.

### Which agent clients does Ap2 work with?

It is a plain SKILL.md folder in the shared agent skills format, so it applies to all listed clients.

### How do I install Ap2 in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ap2 to use it in all your projects, or to .claude/skills/ap2 in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does Ap2 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 Ap2?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Ap2?

The closest alternatives to Ap2 are Agent payment x402, Axiom payments, Accept agent payments, Adyen knowledge patch and Pay with app.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Agent payment x402](https://ai-powered.com/skills/agent-payment-x402): Agent payment x402 is an open-source agent skill for finance and payments.
- [Axiom payments](https://ai-powered.com/skills/axiom-payments-charleswiltgen): Axiom payments is an open-source agent skill for finance and payments.
- [Accept agent payments](https://ai-powered.com/skills/accept-agent-payments): Accept agent payments is an open-source agent skill for finance and payments.
- [Adyen knowledge patch](https://ai-powered.com/skills/adyen-knowledge-patch): Adyen knowledge patch is an open-source agent skill for finance and payments.
- [Pay with app](https://ai-powered.com/skills/pay-with-app): Pay with app is an open-source agent skill for finance and payments.
- [Pay via agent wallet](https://ai-powered.com/skills/pay-via-agent-wallet): Pay via agent wallet is an open-source agent skill for finance and payments.
- [Trust wallet MCP](https://ai-powered.com/skills/trust-wallet-mcp): Trust wallet MCP is an open-source agent skill for finance and payments.
- [Setup](https://ai-powered.com/skills/setup): Setup is an open-source agent skill for finance and payments.

---
Source: https://ai-powered.com/skills/ap2
