{"_id":"@4pay.online/payments-mcp","name":"@4pay.online/payments-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@4pay.online/payments-mcp","version":"0.1.0","description":"MCP server for merchants on 4pay.online — payments, payouts, refunds and payment links. No platform settings.","type":"module","repository":{"type":"git","url":"git+ssh://git@git.gaml.store/heth_project/4pay-payments-mcp.git"},"main":"dist/index.js","bin":{"4pay-payments-mcp":"dist/index.js"},"scripts":{"build":"tsc","test":"vitest run","start":"node dist/index.js","prepublishOnly":"npm run build && npm test"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0","vitest":"^3.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","provenance":true},"keywords":["mcp","4pay","payments","model-context-protocol"],"license":"MIT","homepage":"https://4pay.online","bugs":{"url":"https://git.gaml.store/heth_project/4pay-payments-mcp/issues"},"_id":"@4pay.online/payments-mcp@0.1.0","gitHead":"4cff269ddfcdde287077bb0027e49e52b27a7903","types":"./dist/index.d.ts","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-XKx6zHu/n7PRti4K1wVzmkxXjbQNawWq1dtRuUidA9sZtD7lP9FnH3aACHdAA5BzU5PjB812OemcWiVfXd3l2g==","shasum":"a2c67e76c8ce125e925a50f38a35d674417d1a4a","tarball":"https://registry.npmjs.org/@4pay.online/payments-mcp/-/payments-mcp-0.1.0.tgz","fileCount":14,"unpackedSize":36530,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFoLYgYYBU/FYr8fJpi+HdIHQS1E93v50l3yMAnL9IqiAiBZvrErhPmQgdxUPHS3lzzfMgcVT2TgF04ad/SOdUXRUg=="}]},"_npmUser":{"name":"spiridonovmv","email":"support@4pay.online"},"directories":{},"maintainers":[{"name":"spiridonovmv","email":"support@4pay.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/payments-mcp_0.1.0_1788544747899_0.9419737485400317"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-04T17:59:07.673Z","0.1.0":"2026-09-04T17:59:08.031Z","modified":"2026-09-04T17:59:08.210Z"},"maintainers":[{"name":"spiridonovmv","email":"support@4pay.online"}],"description":"MCP server for merchants on 4pay.online — payments, payouts, refunds and payment links. No platform settings.","homepage":"https://4pay.online","keywords":["mcp","4pay","payments","model-context-protocol"],"repository":{"type":"git","url":"git+ssh://git@git.gaml.store/heth_project/4pay-payments-mcp.git"},"bugs":{"url":"https://git.gaml.store/heth_project/4pay-payments-mcp/issues"},"license":"MIT","readme":"# @4pay.online/payments-mcp\n\nThe MCP server a **merchant** runs. It gives an AI assistant the payment counter of\n[4pay.online](https://4pay.online) — take a payment, send a payout, look one up, refund it — and\nnothing else.\n\n## Why this is a separate server\n\nThe platform ships two MCP servers, and they are different programs on purpose:\n\n| Server | Who runs it | What it exposes |\n|---|---|---|\n| **`@4pay.online/payments-mcp`** (this one) | the merchant | payments, payouts, refunds, payment links, saved cards |\n| `@4pay.online/mcp-server` | the platform operator | terminals, routing, limits, FX, organizations, partners — the platform itself |\n\nA merchant's agent has no business seeing terminals and routing rules. Given them, an agent\nworking through a declined payment will eventually try to \"fix\" the live routing — and that is\nnot a prompt problem you can solve with a stern system message. A tool that is not in the list\ncannot be called, whatever anyone types.\n\nSo this package contains no operator code at all. Not disabled, not filtered — absent.\n\n## Install\n\nInstall from npm:\n\n```bash\nnpm install -g @4pay.online/payments-mcp\n```\n\nThe package contains its compiled distribution, so installation needs neither the repository nor\ndevelopment dependencies. In MCP configuration use `npx -y @4pay.online/payments-mcp` or the installed\n`4pay-payments-mcp` command.\n\n## Configure\n\nTwo values, both issued by your platform operator at the same time:\n\n```jsonc\n// .mcp.json\n{\n  \"mcpServers\": {\n    \"fourpay\": {\n      \"command\": \"4pay-payments-mcp\",\n      \"env\": {\n        \"FOURPAY_API_URL\": \"https://sandbox.4pay.online\",\n        \"FOURPAY_API_KEY\": \"${FOURPAY_API_KEY}\",\n        \"FOURPAY_ORGANIZATION_ID\": \"${FOURPAY_ORGANIZATION_ID}\",\n        \"FOURPAY_ENV\": \"test\"\n      }\n    }\n  }\n}\n```\n\n| Variable | Meaning |\n|---|---|\n| `FOURPAY_API_KEY` | your partner API key |\n| `FOURPAY_ORGANIZATION_ID` | the organization it lives in — the key is resolved *inside* it, and a request carrying only the key is refused before the key is read |\n| `FOURPAY_API_URL` | `https://sandbox.4pay.online` while integrating, `https://4pay.online` in production |\n| `FOURPAY_ENV` | `test` (default) or `prod` |\n| `FOURPAY_TIMEOUT` | request timeout in ms, default 30000 |\n\n**One server, one environment.** `env` is not a tool argument: if a model could choose it, one\nconfident sentence in a prompt would be enough to send a live payment into `test`, or a test into\nproduction. Run a second server if you need both.\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `create_payment` | takes a payment and returns the link to hand the payer |\n| `create_payout` | sends money out to a card, account or wallet |\n| `get_payment` | reads one transaction by its platform id |\n| `list_payments` | lists transactions, newest first, cursor-paged |\n| `refund_payment` | refunds a settled payment, fully or partly |\n| `cancel_payment` | cancels one that has not settled |\n| `create_payment_link` | a reusable link (and QR) for a fixed or open amount |\n| `list_payment_links` | lists them |\n| `list_saved_cards` | cards payers saved for repeat purchases |\n| `generate_order_id` | a unique id, when you have no reference of your own |\n\nAmounts are always **minor units as integers**: `2500` is 25.00 in a two-decimal currency. Models\nare fluent, not exact — decimal arithmetic on money is not something to delegate to one.\n\n## Three things this server refuses to let an agent get wrong\n\n**A `201` is not an acceptance.** The platform creates the transaction and then tells you it was\n`rejected` — same response, same status code. Every tool prints what the status means for the\nmoney: *settled*, *nothing was charged*, *still in flight*.\n\n**An unknown status is not final.** Payment rails carry their own intermediate states. A closed\nlist of statuses would mean \"unrecognised, therefore paid\" the first time an unusual rail appears.\n\n**A missing terminal is not the agent's problem to solve.** When routing finds nothing, the tool\nsays so and says who fixes it — the operator — instead of leaving `terminal not found` for the\nmodel to interpret as \"try a different amount\".\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\nThe tests run against a stub transport; nothing touches the network.\n","readmeFilename":"README.md","_rev":"1-6e8afdca981eb0ab3aac15be3ef47a1f"}