{"_id":"@codespar/mcp-nupay","_rev":"5-b60ac1f00e30675a5cfd3f2f1b9b99db","name":"@codespar/mcp-nupay","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@codespar/mcp-nupay","version":"0.1.0","keywords":["mcp","nupay","nubank","payments","pix","checkout","one-click","brazil"],"license":"MIT","_id":"@codespar/mcp-nupay@0.1.0","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-nupay":"dist/index.js"},"dist":{"shasum":"6b7ae2957df28e2e09bb4782a2fd65a03e79043d","tarball":"https://registry.npmjs.org/@codespar/mcp-nupay/-/mcp-nupay-0.1.0.tgz","fileCount":6,"integrity":"sha512-Iou3ToWMYbpgSYxOsUGw9A5vZAyTwm9VWdtFmhydPK2zRO+k5dzKihL8+AupI5ioC/h7bKGn7sY59joB1b4NVw==","signatures":[{"sig":"MEQCIB6nnTLwm3DPim/reHJnSaIcytQyfswq+pgcXK8FL366AiBaRQgnlN1QMTnt89NH+/QdAKkqY5/0XqfXuL2b1PIgMw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53194},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"e1164fd411e8952e8b9f8c723795dc85f86f15d2","mcpName":"io.github.codespar/mcp-nupay","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-nupay_0.1.0_1776993354338_0.8777850888302396","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codespar/mcp-nupay","version":"0.2.0","keywords":["mcp","nupay","nubank","payments","pix","checkout","one-click","brazil"],"license":"MIT","_id":"@codespar/mcp-nupay@0.2.0","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-nupay":"dist/index.js"},"dist":{"shasum":"dcb8dba4abf12a2cd7331a045b4b682fc287302a","tarball":"https://registry.npmjs.org/@codespar/mcp-nupay/-/mcp-nupay-0.2.0.tgz","fileCount":6,"integrity":"sha512-kAxo6SAl5nKIccbbc4FRkHJE1wfxOPRYMpxzEcqgDdki7f8II3lvQIt+vqs6pS2xgUcmFEbFJlYYCeJ8yPslDQ==","signatures":[{"sig":"MEUCICfmtDUoNZQeM2k4gz5HH/TA1zQNQZ9crHChJ7AO4ZEQAiEAzffU+X7WLhlr8cbJP48WyNSG8hBqNE3hX6tkAqMho00=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70622},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"67945e20ee596c2c3f388bf366a80236dc032b40","mcpName":"io.github.codespar/mcp-nupay","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-nupay_0.2.0_1777118598860_0.98328096528656","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@codespar/mcp-nupay","version":"0.2.1","keywords":["mcp","nupay","nubank","payments","pix","checkout","one-click","brazil"],"license":"MIT","_id":"@codespar/mcp-nupay@0.2.1","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-nupay":"dist/index.js"},"dist":{"shasum":"0516096d904749cd67f909207bcbc9719f886175","tarball":"https://registry.npmjs.org/@codespar/mcp-nupay/-/mcp-nupay-0.2.1.tgz","fileCount":6,"integrity":"sha512-lXbUhNsD25ZdBM/9NjVjgeUxrwPDiPSBi6XiAmnAHcCI7EnSau8/JkWq8NwOuK6BBoKb6F3llQt7sZeCFdsshQ==","signatures":[{"sig":"MEQCIDlHMZHnsTtq+kJxIOC7cZmDzIQ8vyQnqW3WtHoBX1NBAiAkltc/UZwrP7wkDkuvN+K3/Y2Bs9q4EQ7J5275ejMeCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71780},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"0ab801a863239f0cb986bbda65abbaee3c621b44","mcpName":"io.github.codespar/mcp-nupay","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-nupay_0.2.1_1777123227664_0.04931353295336227","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@codespar/mcp-nupay","version":"0.2.2","description":"MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.","type":"module","main":"./dist/index.js","bin":{"mcp-nupay":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"devDependencies":{"@types/node":"^25.5.0","typescript":"^5.8.0"},"license":"MIT","keywords":["mcp","nupay","nubank","payments","pix","checkout","one-click","brazil"],"mcpName":"io.github.codespar/mcp-nupay","_id":"@codespar/mcp-nupay@0.2.2","gitHead":"e8f2ad023876683538fe7b66a2fc88ab8d8ef92f","types":"./dist/index.d.ts","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-Yn0ZRMVwrhAjMDZZV/owPH/sZCKyUxhuKmVF2nU7g0X9sj3OpzNP0ljzk6rmmmsdZE/RHi0g6xCbK82Wt/2PfA==","shasum":"c671b20006c90a0718c8dc94600bbd817bfbc181","tarball":"https://registry.npmjs.org/@codespar/mcp-nupay/-/mcp-nupay-0.2.2.tgz","fileCount":6,"unpackedSize":73232,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCktWJFaOoc8qv5XeomkEFPgmKDulf7SruwrRg23fMoaAIhAJoUJIMyeEVVi+x9FAx/I6f2pP67N6FZeAGhQh+BWXyZ"}]},"_npmUser":{"name":"codespar-npm","email":"fabiano@codespar.dev"},"directories":{},"maintainers":[{"name":"codespar-npm","email":"fabiano@codespar.dev"},{"name":"dangazineu","email":"daniel.gazineu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-nupay_0.2.2_1782153899194_0.9354400942514878"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-24T01:15:54.049Z","modified":"2026-06-22T18:44:59.493Z","0.1.0":"2026-04-24T01:15:54.474Z","0.2.0":"2026-04-25T12:03:19.004Z","0.2.1":"2026-04-25T13:20:27.825Z","0.2.2":"2026-06-22T18:44:59.337Z"},"license":"MIT","keywords":["mcp","nupay","nubank","payments","pix","checkout","one-click","brazil"],"description":"MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.","maintainers":[{"name":"codespar-npm","email":"fabiano@codespar.dev"},{"name":"dangazineu","email":"daniel.gazineu@gmail.com"}],"readme":"# @codespar/mcp-nupay\n\nMCP server for [NuPay](https://docs.nupaybusiness.com.br) — Nubank's merchant checkout rail.\n\nNuPay is Nubank's answer to PayPal / Shop Pay for Brazil: a wallet-backed checkout that leverages Nubank's 100M+ BR customer distribution. Agents create a payment, the shopper confirms inside the Nubank app (push + biometric) or via Pix, and funds settle to the merchant. Pre-authorized flows (CIBA / OTP) unlock recurrence and true one-click for repeat buyers.\n\n## Tools (22)\n\n| Tool | Purpose |\n|---|---|\n| `create_payment` | Create a NuPay checkout payment. |\n| `get_payment` | Retrieve full payment details (amount, shopper, items, current status, timestamps) by pspReferenceId. |\n| `get_payment_status` | Retrieve a payment's status by pspReferenceId. |\n| `list_payments_by_date` | List payments created within a date range. |\n| `cancel_payment` | Cancel a payment that has not yet been captured/settled. |\n| `create_refund` | Refund a settled payment (full or partial). |\n| `get_refund` | Retrieve refund status by pspReferenceId + refundId. |\n| `list_refunds` | List all refunds issued against a given payment. |\n| `create_recipient` | Register a final beneficiary (required for regulatory split payments). |\n| `get_recipient` | Retrieve a registered recipient by referenceId. |\n| `update_recipient` | Update a registered final beneficiary (name, document, country, type). |\n| `delete_recipient` | Remove a registered recipient. |\n| `list_recipients` | List registered recipients (final beneficiaries) for the merchant. |\n| `list_settlements` | List settlement reports (payouts to the merchant bank account) within a date range. |\n| `get_settlement` | Retrieve a single settlement (payout batch) including the list of underlying transactions. |\n| `query_payment_conditions` | Query available installment/payment conditions for a given amount and (optionally) shopper CPF. |\n| `create_preauth_payment` | Create a NuPay payment using a pre-authorized Bearer access_token (pre-auth / recurrence flow). |\n| `backchannel_start` | Start a CIBA / OTP pre-authorization for a shopper. |\n| `backchannel_complete` | Complete a CIBA/OTP flow by submitting the OTP the shopper received. |\n| `backchannel_resend_otp` | Resend the OTP to the shopper for an in-flight authorization ticket. |\n| `exchange_token` | Exchange an authorization_code or refresh_token at POST /v1/token. |\n| `revoke_token` | Revoke an issued access_token or refresh_token at POST /v1/token/revoke. |\n\n## Install\n\n```bash\nnpm install @codespar/mcp-nupay\n```\n\n## Environment\n\n```bash\nNUPAY_MERCHANT_KEY=\"...\"     # X-Merchant-Key issued to your merchant\nNUPAY_MERCHANT_TOKEN=\"...\"   # X-Merchant-Token (secret)\nNUPAY_CLIENT_ID=\"...\"        # Optional — OAuth client_id for pre-auth / recurrence\nNUPAY_CLIENT_SECRET=\"...\"    # Optional — OAuth client_secret\nNUPAY_ENV=\"sandbox\"          # sandbox (default) | production\n```\n\n## Authentication\n\nTwo flows:\n\n1. **Standard merchant API** (payments, refunds, recipients, payment-conditions) uses `X-Merchant-Key` + `X-Merchant-Token` headers. No token exchange.\n2. **Pre-authorized / recurrence** uses OAuth2 + CIBA / OTP. Start with `backchannel_start`, validate via `backchannel_complete`, then call `create_preauth_payment` with the returned Bearer `access_token`. Refresh with `exchange_token` (grant_type=refresh_token). Access tokens expire in 5 minutes; refresh tokens should be stored long-term for recurrence.\n\nBase URLs are derived from `NUPAY_ENV`:\n\n|  | Sandbox | Production |\n|---|---|---|\n| API | `https://sandbox-api.spinpay.com.br` | `https://api.spinpay.com.br` |\n| Auth | `https://sandbox-authentication.spinpay.com.br/api` | `https://authentication.spinpay.com.br/api` |\n\nJWT `client_assertion` signing is the caller's responsibility — `exchange_token` expects an already-signed assertion with `client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer`.\n\n## Run\n\n```bash\n# stdio (default)\nnpx @codespar/mcp-nupay\n\n# HTTP\nMCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-nupay\n```\n\n## Enterprise\n\nNeed governance, budget limits, and audit trails for agent payments? [CodeSpar Enterprise](https://codespar.dev/enterprise) adds policy engine, payment routing, and compliance templates on top of these MCP servers.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}