ifthenpay Payments MCP

by Unknown

Not rated
Website

About

Enable AI agents to generate payments, retrieve transaction history, and interact with ifthenpay services through MCP.

Details

Author
Unknown
Categories
Finance, Knowledge Base, Other

Technical documentation for the ifthenpay payments MCP server.
Covers the communication protocol, all available methods, each tool's schema, and request/response examples.

The ifthenpay MCP (Model Context Protocol) server exposes ifthenpay payment APIs as invocable tools for AI agents. It implements theJSON-RPC 2.0protocol and MCP specification version2025-03-26.

The server is identified asifthenpay-mcp v1.0.0and registers9 toolscovering all ifthenpay payment methods: Multibanco, MB WAY, Payshop, Credit Card, PinPay (Pay by Link), Cofidis Pay, PIX, and payment lookup.

https://ai.ifthenpay.com/mcp/payments/index.php

Two transports are supported simultaneously:

Send JSON-RPC 2.0 messages directly. Required header:

Notifications (messages withoutid) returnHTTP 202with no body. All other requests returnHTTP 200with a JSON body.

Opens a persistenttext/event-streamconnection. The server immediately sends anendpointevent with the POST URL, then keeps the stream alive with periodic pings:

event: endpoint data: "https://ai.ifthenpay.com/mcp/payments/index.php" : ping

Use this transport when connecting viaClaude desktopor any MCP host that supports theurlconfiguration option — no local software required.

Add the following toclaude_desktop_config.json(located at%APPDATA%\Claude\on Windows or~/Library/Application Support/Claude/on macOS):

{ "mcpServers": { "ifthenpay": { "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }
Access-Control-Allow-Origin:  Access-Control-Allow-Headers: Content-Type, Authorization, Mcp-Session-Id Access-Control-Allow-Methods: GET, POST, OPTIONS

OPTIONSpreflight requests receive an immediateHTTP 200response.

Any MCP-compatible client can connect using the SSE endpoint. Below are ready-to-use configurations for the most common tools. If authentication is enabled, add"headers": {"Authorization": "Bearer <token>"}to each entry.

File:%APPDATA%\Claude\claude_desktop_config.json(Windows) ·~/Library/Application Support/Claude/claude_desktop_config.json(macOS)

{ "mcpServers": { "ifthenpay": { "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }

Global:~/.cursor/mcp.json· Per project:.cursor/mcp.json

{ "mcpServers": { "ifthenpay": { "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }

File:~/.codeium/windsurf/mcp_config.json

{ "mcpServers": { "ifthenpay": { "serverUrl": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }

File:.vscode/mcp.json(per project) or viaUser Settings → MCP.

{ "servers": { "ifthenpay": { "type": "sse", "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }

File:%APPDATA%\ChatGPT\claude_desktop_config.json(Windows) ·~/Library/Application Support/ChatGPT/claude_desktop_config.json(macOS). Requires ChatGPT desktop app with MCP support enabled.

{ "mcpServers": { "ifthenpay": { "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } }

File:~/.continue/config.json(global) ·.continue/config.json(per project)

{ "mcpServers": [ { "name": "ifthenpay", "transport": { "type": "sse", "url": "https://ai.ifthenpay.com/mcp/payments/index.php" } } ] }

File:~/.config/zed/settings.json— add to thecontext_serverskey.

{ "context_servers": { "ifthenpay": { "command": { "path": "php", "args": ["/path/to/mcp/stdio-bridge.php"] } } } }

Zed currently supports stdio transport only. Downloadstdio-bridge.phpand update the path accordingly.

In Google AI Studio, go toSettings → Tools → Add MCP Serverand enter the endpoint URL directly:

https://ai.ifthenpay.com/mcp/payments/index.php

Native MCP support in Gemini products is evolving — refer to theGoogle AI documentationfor the latest configuration steps.

{ "jsonrpc": "2.0", "id": 1, "method": "<method>", "params": { / method-specific parameters / } }
{ "jsonrpc": "2.0", "id": 1, "result": { / result / } }
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32600, "message": "error description" } }

Mandatory handshake to establish the MCP session. Must be the first request.

{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-03-26", "clientInfo": { "name": "my-client", "version": "1.0.0" } } }
{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-03-26", "serverInfo": { "name": "ifthenpay-mcp", "version": "1.0.0" }, "capabilities": { "tools": {} } } }

Checks that the server is reachable. No parameters required.

// Request { "jsonrpc": "2.0", "id": 2, "method": "ping" } // Response { "jsonrpc": "2.0", "id": 2, "result": {} }

Returns all registered tools with their name, description, and input schema (JSON Schema Draft 7).

// Request { "jsonrpc": "2.0", "id": 3, "method": "tools/list" } // Response (abbreviated) { "jsonrpc": "2.0", "id": 3, "result": { "tools": [ { "name": "multibanco_create_reference", "description": "Creates a Multibanco payment reference...", "inputSchema": { "type": "object", "properties": { / ... / } } } // ... + 8 more tools ] } }

Executes a tool. Thenamefield identifies the tool;argumentscontains the parameters according to the schema.

// Request { "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "<tool_name>", "arguments": { / tool parameters / } } }
{ "jsonrpc": "2.0", "id": 4, "result": { "content": [{ "type": "text", "text": "{\"entity\":\"11249\",\"reference\":\"123456789\",...}" }], "isError": false } }

content[0].textcontains a JSON string with the data returned by the ifthenpay API. WhenisErroristrue,textcontains the error message.

Creates a Multibanco payment reference for payment at any Portuguese ATM or online banking.

// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "multibanco_create_reference", "arguments": { "mb_key": "{mb_key}", "order_id": "1001", "amount": 25.00 } } } // Response { "result": { "content": [{ "type": "text", "text": "{\"entity\":\"11249\",\"reference\":\"123456789\",\"amount\":\"25.00\",\"expiry_date\":null,\"request_id\":\"req_abc123\"}" }], "isError": false } }

Sends a payment request to the customer's phone via the MB WAY app. The customer has 4 minutes to approve.

// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "mbway_request_payment", "arguments": { "mbway_key": "{mbway_key}", "order_id": "912345678", "amount": 15.50, "phone": "351#912345678" } } } // Response { "result": { "content": [{ "type": "text", "text": "{\"request_id\":\"mbw_7f3a1b2c\",\"status\":\"pending\",\"message\":\"Payment request sent\"}" }], "isError": false } }

Checks the status of an MB WAY payment request. Use therequest_idreturned bymbway_request_payment.

// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "mbway_check_status", "arguments": { "mbway_key": "{mbway_key}", "request_id": "mbw_7f3a1b2c" } } } // Response — approved { "result": { "content": [{ "type": "text", "text": "{\"status\":\"paid\",\"status_code\":\"000\",\"message\":\"Payment approved\",\"created_at\":\"2026-06-18 10:00:00\",\"updated_at\":\"2026-06-18 10:02:34\"}" }], "isError": false } }

Generates a Payshop reference for cash payment at over 5,000 agents, CTT post offices, and convenience stores in Portugal.

// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "payshop_create_reference", "arguments": { "payshop_key": "{payshop_key}", "order_id": "2024001", "amount": 50.00 } } } // Response { "result": { "content": [{ "type": "text", "text": "{\"reference\":\"1234567890123\",\"request_id\":\"ps_req456\",\"amount\":\"50.00\"}" }], "isError": false } }

Creates a hosted credit/debit card payment session. Supports Visa and Mastercard.

When invoked through the AI agent, this method is redirected topinpay_create_paymentwithselected_method="4". Direct invocation via MCP retains the original behaviour.

Creates a PinPay (Pay by Link) payment link supporting multiple payment methods. Returns a URL and a PIN code for the customer to access the checkout.

"MB|{mb_key};MBWAY|{mbway_key};PAYSHOP|{payshop_key};CCARD|{ccard_key};COFIDIS|{cofidis_key};PIX|{pix_key};GOOGLE|{google_key};APPLE|{apple_key}"
// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "pinpay_create_payment", "arguments": { "gateway_key": "{gateway_key}", "order_id": "CC-001", "amount": 99.99, "accounts": "CCARD|{ccard_key}", "selected_method": "4", "otp": "true" } } } // Response { "result": { "content": [{ "type": "text", "text": "{\"redirect_url\":\"https://pinpay.pt/pay/a1b2c3\",\"pin_code\":\"123456\",\"amount\":\"99.99\"}" }], "isError": false } }

Creates a Cofidis Pay instalment payment. Available mainly in Portugal and Spain.

When invoked through the AI agent, this method is redirected topinpay_create_paymentwithaccounts="COFIDIS|{cofidis_key}"andselected_method="7".

Creates a PIX payment for Brazilian customers. Requires the customer's CPF.

When invoked through the AI agent, this method is redirected topinpay_create_paymentwithaccounts="PIX|{pix_key}"andselected_method="8".

Lists completed payments via Backoffice Key. Supports filtering by method, dates, order ID, reference, or request ID. Returns up to 1,000 records without filters.

// Request { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "payments_list", "arguments": { "bo_key": "{bo_key}", "entity": "MB", "date_start": "01-06-2026 00:00:00", "date_end": "30-06-2026 23:59:59" } } } // Response { "result": { "content": [{ "type": "text", "text": "{\"count\":2,\"payments\":[{\"order_id\":\"1001\",\"amount\":\"25.00\",\"status\":\"paid\"},{\"order_id\":\"1002\",\"amount\":\"80.00\",\"status\":\"paid\"}]}" }], "isError": false } }

When a tool fails, the response hasisError: trueandcontent[0].textcontains the message:

{ "result": { "content": [{ "type": "text", "text": "Invalid key or API error: ..." }], "isError": true } }

Prediction market intelligence for AI agents - 30 read-only tools over Polymarket and Kalshi data: S-F trader grades, real-time large-trade feed, smart money flow, suspicious-activity flags, and analytics reports. Remote at https://api.0xinsider.com/api/v1/mcp or npx -y @0xinsider/mcp.

Prepaid virtual cards for AI agents: one-time cards, spend caps, human approvals.

Personal wealth & portfolio tracker — 23 OAuth-scoped tools for holdings, performance, FIRE status, crypto P&L, and confirm-gated transaction writes across 20+ markets.

Spanish accounting from an agent: invoices, expenses, bank reconciliation, VAT and VeriFactu.

Remote MCP for commodities research — knowledge graph, COT positioning, natural gas storage/weather, futures quotes, and private stories/journals. Requires Arc Research Starter + bearer token.

Free crypto address labels. Identify known addresses on major networks with a free API.

Read-only stop/go risk gateway for prediction-market agents before capital moves: dispute lifecycle, resolution risk, action-aware preflight, alerts, token checks.

Check live market data and execute real trades — buy/sell tokens and stocks, open leveraged perp positions, trade prediction markets, move funds in and out of savings

Official MCP bridge to the Invoket x402 gateway: 68 pay-per-call endpoints (IBAN validation and sanctions screening, phone validation, French and EU law in force, weather and climate, medication data) exposed as typed tools, paid in USDC on Base with non-custodial BYOK spend caps.

Tenant-bound MCP tools for agent spend authorization, evidence, receipts, and settlement in Cursor, Codex, and Claude Code.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.