PayPal AI Toolkit is a plugin that connects AI coding agents with PayPal APIs and sandbox MCP servers, giving them PayPal-specific guidance and tools. It helps developers build and work with payment, subscription, invoice, and dispute integrations in Claude Code, OpenAI Codex, and other compatible agents. The catalogue entries are its commands, skills, plugins, and MCP integration.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/paypal/AI-ToolkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/paypal/ai-toolkit/explain-error)<a href="https://agentmods.dev/commands/paypal/ai-toolkit/explain-error"><img src="https://agentmods.dev/badge/commands/paypal/ai-toolkit/explain-error/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/paypal/ai-toolkit/explain-error"><img src="https://agentmods.dev/badge/commands/paypal/ai-toolkit/explain-error.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.00702 |
| Opus 5.5 | $0.00005 | $0.00281 |
| Sonnet 5.5 | $0.00003 | $0.00140 |
| Haiku 4.5 | $0.00001 | $0.00070 |
Grade A, and why
explain-error scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
If "$ARGUMENTS" is empty, respond only with: "Please provide a PayPal error code or message. Example: /paypal:explain-error INSTRUMENT_DECLINED" and stop.
If "$ARGUMENTS" does not match any known PayPal error code or message pattern, respond with: "Unknown error code or message: $ARGUMENTS. This may be a typo, a third-party error, or a new PayPal error not yet in this reference. Check https://developer.paypal.com/api/rest/reference/orders/v2/errors/ for the full list." Then do your best to explain what the error string suggests based on its name, and stop — do not fabricate retry behavior or related errors.
Otherwise, explain the PayPal error "$ARGUMENTS". Provide:
- What it means — plain-language explanation
- Common causes — most likely reasons this occurs
- How to fix it — specific, actionable steps
- Code example — detect the user's programming language by scanning any open files with Read/Grep; default to Node.js if no language is found. Show proper error handling including how to catch the error, display a user-friendly message, and whether to retry.
- Related errors — only list errors from the Key error reference below that are meaningfully related (same HTTP status, same flow, or must be handled together). Do not suggest errors outside this list.
Key error reference:
INVALID_REQUEST(400) — malformed body or missing fields; inspect thedetails[]array for the specificfieldandissueUNAUTHORIZED(401) — expired or missing access token; refresh viaPOST /v1/oauth2/tokenNOT_AUTHORIZED(401) — valid token but missing scope for this operationPERMISSION_DENIED(403) — account not eligible for this API; check Developer Dashboard feature eligibilityRESOURCE_NOT_FOUND(404) — resource ID does not exist or belongs to a different accountDUPLICATE_TRANSACTION(409) — idempotency key already succeeded; retrieve the existing resource insteadINSTRUMENT_DECLINED(422) — buyer's payment method declined; ask for a different payment method, do not retry the same instrumentTRANSACTION_REFUSED(422) — risk engine decline; do not retry automaticallyORDER_ALREADY_COMPLETED(422) — cannot capture/authorize an already-completed orderAMOUNT_MISMATCH(422) — captured amount doesn't match authorized amountRATE_LIMIT_REACHED(429) — back off with exponential retry; honor theRetry-AfterheaderINTERNAL_SERVER_ERROR(500) — retry with the samePayPal-Request-Ididempotency key; logdebug_idPLAN_STATUS_INVALID— plan must beACTIVEbefore creating subscriptionsSUBSCRIPTION_STATUS_INVALID— subscription is not in a state that allows this operation
Always include the full error response body and debug_id when contacting PayPal support at https://developer.paypal.com/support/.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 37 lines · 13 tokens per session scan A d35183b3f68a
explain-error is a command published in the GitHub repository paypal/AI-Toolkit (31 stars, last pushed 2d ago), licensed Apache-2.0. It adds 13 tokens to every session and 702 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
techdebt
Find and report technical debt in the codebase.
deep-code-analysis
Comprehensive codebase investigation using research-expert for documentation, explore-codebase for structure, and deep analysis. Perfect for understanding complex systems.
watch
Check for Claude Code updates, detect breaking changes, analyze plugin compatibility, and optionally gather community pulse via Exa.
fix
Quick bugfix commit. Use for fix bug, bugfix, patch, hotfix, correct error.
cg
Generate a call graph of a module or task in Graph Protocol format.
nyann:retrofit
Audit an existing repo against a profile and fix what's drifted. Unlike doctor (read-only), retrofit detects missing hooks, misconfigured gitignore, documentation gaps, and non-compliant history, then offers to remediate via bootstrap. Idempotent — safe to re-run.