MCP / AI Integration
Add ReBate Pay's MCP server to Claude, Cursor, VS Code or any AI coding tool so it can read the docs and API reference, work with your sandbox data and write the integration — high-risk actions always need your approval.
ReBate Pay runs a standard MCP (Model Context Protocol) server at https://YOUR-REBATEPAY-HOST/mcp (Streamable HTTP, JSON-RPC 2.0). Once connected, an AI coding tool can read the developer docs and API reference, look at your sandbox account, create products and payment links, simulate payments, and write the integration code following the integration guides.
Connect in three steps
- 1Create a sandbox API key in the console under Developers → API keys (
sk_test_…; it needs themcp:invokescope, included by default). - 2Paste the config for your tool below and replace
sk_test_YOUR_KEY(the console under Developers → MCP / AI shows versions with your URL filled in). - 3Ask the AI to “integrate ReBate Pay payments”. It calls
get_integration_guideandget_accountfirst, then writes the code.
claude mcp add --transport http rebatepay https://YOUR-REBATEPAY-HOST/mcp \
--header "Authorization: Bearer sk_test_YOUR_KEY"Tools
| Group | Tools | How it runs |
|---|---|---|
| Docs (no key) | search_docs, get_doc, list_api_operations, get_api_operation, get_integration_guide, lookup_error, get_sandbox_testing_guide | Read-only |
| Account | get_account, customers_list/get, products_list, prices_list, subscriptions_list/get, payments_list/get, payment_links_list, checkouts_get, webhook_endpoints_list, webhook_events_list, usage_summary, entitlements_check, analytics_summary, onboarding_status | Read-only |
| Sandbox data | products_create, prices_create, customers_create, onboarding_draft_update | Write (runs at once) |
| High-risk | payment_links_create, subscriptions_create, refunds_create, sandbox_simulate_payment, onboarding_submit | Preview → you approve in the console → `confirm_action` |
The server also offers resources (every docs page as rebatepay://docs/{slug}, plus rebatepay://openapi.json) and prompts (integrate_rebatepay, add_subscription_billing, verify_webhooks) for clients that support them.
High-risk actions need a person
- 1When the AI calls a high-risk tool (e.g.
refunds_create) nothing runs: it gets a preview and aconfirm_token. - 2The request appears in the console under Developers → MCP / AI → AI actions waiting for approval. You review it and approve or reject (valid for 30 minutes).
- 3Only after approval does the AI's
confirm_actioncall with theconfirm_tokenrun it. Before that it getsAPPROVAL_REQUIRED; after a rejection,APPROVAL_REJECTED. - 4Each confirm token works once, and the AI can never do more than the API key's scopes allow.
whsec_…) is shown once when you create the endpoint in the console, so create webhook endpoints under Developers → Webhooks. The AI never handles real card numbers — customers always enter cards on ReBate Pay's hosted page.Auditing
Every MCP call (previews, approvals and rejections included) is recorded in the audit trail with sensitive fields redacted. The console shows recent AI activity under Developers → MCP / AI.
Without MCP: the REST tools
The same tools are available over plain REST (scope mcp:invoke) for your own AI agents:
/api/Mcp/Tool— List tools with risk tier and required scope/api/Mcp/Tool/Preview— Preview; high-risk tools return a one-time confirmToken/api/Mcp/Tool/call— Run a read or write tool/api/Mcp/Tool/confirm— Run a high-risk tool with its confirmToken/api/Mcp/Execution— Tool execution historyPlain-text docs for AI tools: /llms.txt (an index of every page) and /llms-full.txt (all docs in one file).
ReBate Pay Docs