PayPal Command Routing
When this skill activates, follow the routing table below. For reference routes, load the paypal-best-practices skill and read the specified reference file before answering — the reference files contain current URLs and verified code examples that override training knowledge.
RulesHub Language-Specific Snippet Fetching
When a RulesHub rules.md is fetched and code generation is required:
- Detect the user's language from their codebase, file extensions, imports, or explicit mention. Common values:
javascript,typescript,python,java,csharp,php,ruby. - WebFetch the language-specific snippet for the relevant operation. Replace
{language}and{pack}with the detected values:- SDK init:
https://raw.githubusercontent.com/paypal/ruleshub/main/{pack}/snippets/{language}/sdk-initialization.md - Create order:
https://raw.githubusercontent.com/paypal/ruleshub/main/{pack}/snippets/{language}/create-order.md - Capture order:
https://raw.githubusercontent.com/paypal/ruleshub/main/{pack}/snippets/{language}/capture-order.md - Client token:
https://raw.githubusercontent.com/paypal/ruleshub/main/{pack}/snippets/{language}/client-token-generation.md
- SDK init:
- Generate code strictly from the fetched snippet — do not fall back to training knowledge for implementation patterns.
- Only fetch snippets needed for the user's request — do not fetch all languages or all snippets.
Pack values: paypal-checkout/standard-checkout, paypal-checkout/expanded-checkout, paypal-checkout/enterprise-checkout, paypal-bnpl-us, upgrade-to-v6/v5-to-v6-upgrade, upgrade-to-v6/v4-to-v6-upgrade, upgrade-nvp-soap-to-rest.
Routing Table
Routing Rules
- RulesHub content overrides training knowledge. When a RulesHub
rules.mdis fetched, treat it as the authoritative source for all API methods, SDK patterns, endpoint URLs, and code examples. Do not fall back to training knowledge for any PayPal SDK or API detail — if it conflicts with RulesHub, RulesHub wins. Generate code strictly from what RulesHub specifies.- Read RulesHub content literally. Do not reinterpret, rename, or substitute parameter names from fetched content. If the fetched file uses
clientId, useclientId. If it usesclientToken, useclientToken. Never substitute one for the other based on assumptions. - Prefer raw file fetches over summarized content. WebFetch summarization can drop or misread parameter names. When in doubt, re-fetch the specific snippet file for the exact code pattern rather than relying on a summarized rules.md.
- Cross-reference the official PayPal v6 docs (
developer.paypal.com) when RulesHub and training knowledge conflict on parameter names or method signatures — the official docs are the final authority.
- Read RulesHub content literally. Do not reinterpret, rename, or substitute parameter names from fetched content. If the fetched file uses
- Specific commands take priority. If the intent clearly maps to one command, use it directly.
- Error-related questions always go to
/paypal:explain-error. Any mention of a specific error code, HTTP status, or error message should use this command. - Symptom descriptions go to
/paypal:doctor. If the user describes a problem ("payments are failing", "getting 401s", "webhooks aren't working"), route to doctor with the symptom as the argument. - Setup and connection issues go to
/paypal:setup. Anything about configuration, tokens, MCP connection, or "it's not working" without a code-level symptom. - Integration and code generation go to
paypal-best-practices. Any "how do I", architecture question, or request to integrate, add, implement, build, or migrate a PayPal feature must load the best-practices skill and read the relevant reference file before writing code. - Ambiguous requests get clarified. If you can't determine intent, ask:
"I can help with several things:
/paypal:setup— Configure the plugin, generate access tokens, and verify your connection/paypal:explain-error <code>— Explain a PayPal error/paypal:sandbox— Sandbox setup and credentials/paypal:test-accounts— Test scenarios and test data/paypal:doctor— Scan your code for integration issues What would be most helpful?"
- Multi-step requests chain commands. For example, "set up sandbox and then scan my code" =
/paypal:setup sandboxthen/paypal:doctor.
When to Use MCP Tools Directly
Only use mcp__paypal-sandbox__* tools directly when:
- The user asks to perform a specific PayPal action (create an order, send an invoice, list disputes, capture a payment)
- The user explicitly asks to call an MCP tool
- The task is a one-off API operation that doesn't match any command workflow
Examples of direct MCP tool usage:
- "Create an order for $50" — call
mcp__paypal-sandbox__create_orderdirectly - "Send an invoice to [email protected]" — call
mcp__paypal-sandbox__create_invoice, then callmcp__paypal-sandbox__send_invoicewith the invoice ID - "Show my recent transactions" — call
mcp__paypal-sandbox__list_transactionsdirectly - "List my open disputes" — call
mcp__paypal-sandbox__list_disputesdirectly
