---
name: mapae-payments
description: Task-scoped AI assistant payment skill using Mapae. Replaces credit card and wallet access with a single-mission proxy token (mpt_) enforced by HSK Chain cumulative caps, HSP 7-step settlement, and Chainlink CCIP kill-switch revocation.
version: 0.2.0
mcp_endpoint: https://mapae.web-three.net/mcp
openapi_url: https://mapae.web-three.net/plugin/openapi.json
compatible_standards:
  - MCP (Streamable HTTP / stdio)
  - OpenAPI 3.1 REST
  - Browser Pay-with-Mapae Checkout
---

# Mapae Payment Skill (`SKILL.md`)

This skill defines strict payment operating rules for commercial AI assistants (Claude Duet, OpenAI dots, Perplexity Computer, Gemini Spark, Grok Bot, Meta Muse, Pickle, Manus Cue, Cursor, and Claude Code):

1. **Cost Runaway Prevention**
   - Never execute open-ended paid tool loops without a mission budget.
   - Before any paid API or checkout call, call `mapae_request(task, capUsd, category)` to obtain a **task-scoped Mapae** with a hard on-chain cumulative cap on HSK Chain (`MapaeRegistry.consume` reverts with `ExceedsMapaeCap`).
   - Check `mapae_status` before large purchases and report to the user once cumulative spend crosses **80%** of the budget.

2. **Zero Credential Friction**
   - **NEVER ask the user for credit card numbers, CVV, bank credentials, or wallet private keys.**
   - Store and pass **only** the scoped proxy token (`mpt_...`) returned after the user's 1-tap approval in the Mapae console or mobile PWA. All EIP-712 signatures and HSP keys remain isolated inside the Mapae Signer Durable Object.

3. **No Approval Fatigue & No Unauthorized Actions**
   - Ask the user for **one single approval** when issuing the Mapae for the mission.
   - Once active, settle in-scope metered API calls within budget automatically via `mapae_quote` + `mapae_pay` without interrupting the user.
   - If `mapae_pay` returns `decision: "held_price_drift"`, send the returned `driftApprovalUrl` to the user, then poll `mapae_poll_approval(driftRequestId, driftPollToken)`.
   - If `mapae_pay` returns `blocked_exceeds_cap`, `blocked_revoked`, `blocked_expired`, `blocked_scope`, or `blocked_replay`, stop immediately and report the reason cleanly.

4. **Clean Mission Closeout**
   - When the mission completes, call `mapae_close(proxyToken)` to seal remaining allowance and anchor the receipt Merkle root on HSK Chain.

## Standard 6-Tool Workflow (24/7 Cloud AI CIBA)

1. `mapae_request(task, capUsd, assistantName, category, allowedCategories, ttlHours)` → returns `approvalUrl` + `pollToken` + disposable pass address; share `approvalUrl` with the user
2. `mapae_poll_approval(requestId, pollToken)` → once the user taps Approve on any phone/desktop, returns the scoped proxy token `mpt_...` (0 wallet keys in assistant context)
3. `mapae_quote(merchantId, sku)` → fetches authoritative HSP order terms and locks price snapshot
4. `mapae_pay(orderId, proxyToken)` → isolated Credential Proxy verifies policy, executes 7-step HSP settlement, and records cumulative spend on HSK Chain
5. `mapae_status(proxyToken)` / `mapae_close(proxyToken)` → check remaining cap or seal the pass (receipt Merkle root computed locally; on-chain anchoring only when live/wallet-anchored)

## Live Endpoints

- Remote Streamable HTTP MCP: `https://mapae.web-three.net/mcp`
- OpenAPI 3.1 Spec: `https://mapae.web-three.net/plugin/openapi.json`
- Plugin Manifest: `https://mapae.web-three.net/plugin/manifest.json`
- Browser Checkout Merchant: `https://mapae.web-three.net/merchants/homecraft/checkout`
