# MagicPay

MagicPay gives AI agents a secure MagicCard, Memory, approval, and checkout layer for real purchases while keeping sensitive data and final payment approval under user control.

A user prompt that asks to set up MagicPay from this `skill.md` is a first-time MagicPay setup request. Installing the skill and CLI is not completion: continue in the same task through `magicpay setup next`, then follow its returned `instructions` until setup needs user input, completes, or returns a real blocker.

A skill-manager recommendation to start a fresh agent session affects only future skill-catalog activation. It does not block the installed CLI. Do not stop at an installation report, and do not ask the user to repeat the setup prompt.

Treat successful installer output and CLI checks as internal evidence. Do not relay package versions, installer result fields such as `"ok":true`, binary paths, gateway health, agent status, or a verification checklist. Let the returned `magicpay setup next` instructions own the first user-facing setup message.

Do not ask for an email, OTP, API key, or any other setup input before the returned setup `instructions` request it.

# Install

1. Detect the runtime executing this task and install the MagicPay skill into that runtime only. Do not ask the user which runtime is active, do not run more than one command, and do not use the unscoped fallback for Codex, Claude Code, OpenClaw, or Hermes:

- Codex: `npx --yes skills@1.5.18 add MercuryoAI/skills --skill magicpay --global --yes --copy --agent codex`
- Claude Code: `npx --yes skills@1.5.18 add MercuryoAI/skills --skill magicpay --global --yes --copy --agent claude-code`
- OpenClaw: `npx --yes skills@1.5.18 add MercuryoAI/skills --skill magicpay --global --yes --copy --agent openclaw`
- Hermes: `npx --yes skills@1.5.18 add MercuryoAI/skills --skill magicpay --global --yes --copy --agent hermes-agent`
- Manus or another compatible runtime: use its native skill manager when available. Otherwise run `npx --yes skills@1.5.18 add MercuryoAI/skills --skill magicpay --global --yes --copy` once.

2. Install or repair the MagicPay CLI. Do not stop if `magicpay` is missing before this step:

```bash
npm i -g @nuanu-ai/magicbrowse-cli@latest @nuanu-ai/magicsearch-cli@latest @nuanu-ai/magicpay-cli@latest
magicpay --version
magicpay --help
magicsearch --help
magicbrowse --help
```

The help output must include `setup next`. If it does not, report the CLI install source and version.

Do not stop after installing the skill or verifying the CLI. If the skills installer says a fresh agent session is needed for future skill activation, still continue first-time setup in this session by running `magicpay setup next` below. If this runtime truly cannot continue after install, ask the user to start a fresh session and resend the same MagicPay setup prompt or image.

3. Start first-time setup:

```bash
magicpay setup next --intent landing --platform <runtime> --agent-name "<runtime> Agent" --api-url https://durcottggsiesxxqzvbb.supabase.co/functions/v1/api --env production
```

Replace `<runtime>` with exactly one of `openclaw`, `hermes`, `claude`, `codex`, `manus`, or `generic`, based on the runtime executing this task. Replace `<runtime> Agent` with its human-readable agent name. Never pass the angle-bracket placeholders literally and do not ask the user to choose the runtime.

Then follow the returned instructions exactly. If the setup instructions ask for an email, ask the user for it and continue the email OTP setup flow.
