PluginInstalls cleanly
Add PayPal payments with sandbox tests
PayPal plugin
PayPal's official plugin helps your assistant add PayPal checkout, subscriptions and invoices to your app, and test them in PayPal's sandbox first.
- Works with
- Claude Code, Codex CLI
- Good for
- Build an app
What it does
PayPal's plugin helps your assistant add PayPal to a website or app: checkout buttons, subscriptions, invoices, refunds and disputes. It has two skills, paypal-best-practices (reference for PayPal's JavaScript SDK v5 and v6 and the APIs) and paypal-routing (picks the right approach and handles migrations), and five commands:
/paypal:setup— add or refresh your sandbox token and check the connection./paypal:sandbox— sandbox setup and testing tips./paypal:test-accounts— test cards, pay-later (BNPL), Venmo, webhooks and test scenarios./paypal:explain-error— explain a PayPal error code, with causes and fixes./paypal:doctor— scan your code for PayPal integration problems.
It also connects PayPal's sandbox MCP server (https://mcp.sandbox.paypal.com/sse), so the assistant can create test invoices, orders and other test data. The sandbox uses fake money only.
Example prompts
- "Add a PayPal checkout button to my product page."
- "Set up a monthly subscription with a free trial."
- "Create a test invoice in the sandbox for 50 EUR."
- "Explain this PayPal error: INSTRUMENT_DECLINED."
- "Run /paypal:doctor on my checkout code."
How to install
/plugin install paypal@claude-plugins-officialHow to use it
Run /reload-plugins, then /paypal:setup to add a sandbox token. Ask: Add a PayPal checkout button to my shop page and test it in the sandbox.
Check it works
In Claude Code, run /reload-plugins, then /plugin and check that paypal is listed. Run /paypal:setup; it should say the paypal-sandbox server is connected. Then ask "List the PayPal MCP tools you can use."
Common problems
- The paypal-sandbox server doesn't connect — the PAYPAL_SANDBOX_ACCESS_TOKEN setting is missing — create a sandbox app in the PayPal Developer Dashboard and run /paypal:setup — https://github.com/paypal/AI-Toolkit
- Tools stop working with a 401 error — the sandbox token expired — run /paypal:setup refresh — https://github.com/paypal/AI-Toolkit
- The token breaks after you put it in ~/.zshrc — the README says to use the agent's settings file instead, because a wrapped line breaks the header — https://github.com/paypal/AI-Toolkit
- Edits feel slower — the plugin's hook checks every Write and Edit — disable the plugin when you aren't working on PayPal code — https://code.claude.com/docs/en/hooks
Other assistants
- Codex:
codex plugin marketplace add paypal/AI-Toolkit, thencodex plugin add paypal@paypal-ai-toolkit, and restart Codex; put the token in ~/.codex/config.toml (README). - Cursor:
cursor-agent plugin marketplace add https://github.com/paypal/AI-Toolkit, then open Customize (or type/plugin) and installpaypal(README). - Gemini CLI: the README does not list Gemini CLI.
What to watch out for
- The plugin adds a PreToolUse prompt hook on every Write and Edit, in every project, while the plugin is on: Claude Code sends the file path and content to a Claude model for a check, which adds usage and time to each edit (hooks/hooks.json, Claude Code hooks docs)
- The hook's prompt is text addressed to the model ('you must end your response with the single word approve'); it says it never blocks edits, but Claude Code's hooks docs say a PreToolUse prompt hook that answers ok: false denies the edit, so read hooks/hooks.json before you install
- The README has you paste a sandbox access token into ~/.claude/settings.json as plain text, and /paypal:setup reads that file; use a sandbox token only, never live credentials, and remove it when you finish
- The /paypal:setup and /paypal:sandbox commands pre-approve Bash and the sandbox MCP tools, and /paypal:doctor pre-approves Bash, Edit and WebFetch, so Claude Code does not ask before those tools run during that command (commands/*.md allowed-tools, Claude Code skills docs)
- Sandbox tokens expire in up to 8 hours, so the MCP tools fail with a 401 until you run /paypal:setup refresh (README)
Licence and author
- Licence
- Apache-2.0
- Author
- PayPal
- Source code
- github.com/paypal/AI-Toolkit
How we tested it
We installed it on an empty test computer on 26 Oct 2026. Installed and started in a clean test system. Not yet used in a real AI session.
Not yet used on real work.
Technical details of the test
- Date
- 26 Oct 2026
- Method
- Intake sandbox run on 2026-10-26 in a clean container with no account: cloned the repository and checked its skill, agent and plugin files; installed paypal@claude-plugins-official with the Claude Code command line.
Checked again on 26 Oct 2026
Alternatives
- Stripe AI Toolkit — the same kind of help for Stripe payments
FAQ
- Q: Does it cost money? A: The plugin is Apache-2.0 and works with PayPal's sandbox, a test environment with test money; you sign in to the PayPal Developer Dashboard to get sandbox keys. Live payments later pay PayPal's per-transaction merchant fees, which depend on your country and the payment type (PayPal business fees page).
- Q: Can it take real money? A: This plugin's MCP server is sandbox only. The code your assistant writes can go live later, so test it in the sandbox first.
- Q: Do I need to know how to code? A: Some. You will paste a token and check that payments work before you publish.
Sources
- github.com/paypal/AI-Toolkit
- developer.paypal.com/tools/sandbox/
- code.claude.com/docs/en/hooks
- paypal.com/us/business/paypal-business-fees