Skip to main content
NU

NuPay

v0.2.1API Key

El riel de checkout para merchants de Nubank — one-click con saldo de billetera, Pix y recurrencia, respaldado por la distribución de más de 100M de clientes BR de Nubank. OpenAPI completo verificado; la plataforma base es Spinpay.

22 herramientas5 env vars🇧🇷 Brasilestable en npm

Qué puede hacer tu agente

NuPay le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • create_paymentCreate a NuPay checkout payment. Returns pspReferenceId + the redirect/QR payload the shopper needs to complete the charge (NuPay wallet push or Pix). Use merchant-key auth.
  • get_paymentRetrieve full payment details (amount, shopper, items, current status, timestamps) by pspReferenceId. Use this for richer detail than get_payment_status.
  • get_payment_statusRetrieve a payment's status by pspReferenceId.
Ejemplo de llamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_payment", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-nupay

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "nupay": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-nupay"
      ],
      "env": {
        "NUPAY_MERCHANT_KEY": "<your_nupay_merchant_key>",
        "NUPAY_MERCHANT_TOKEN": "<your_nupay_merchant_token>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá create_payment primero.

Variables de entorno · 5

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

NUPAY_MERCHANT_KEY
obligatorio

NuPay X-Merchant-Key issued to your merchant

NUPAY_MERCHANT_TOKEN
obligatoriosecret

NuPay X-Merchant-Token issued to your merchant

NUPAY_CLIENT_ID
opcional

OAuth2/CIBA client_id for pre-authorized (recurrence) flows. Optional unless using backchannel_start / backchannel_complete.

NUPAY_CLIENT_SECRET
opcionalsecret

OAuth2/CIBA client_secret for pre-authorized flows. Optional unless using backchannel_* tools.

NUPAY_ENV
opcional

sandbox | production. Defaults to sandbox. Drives both checkout API and auth base URLs.

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEcreate_payment
Create a NuPay checkout payment. Returns pspReferenceId + the redirect/QR payload the shopper needs to complete the charge (NuPay wallet push or Pix). Use merchant-key auth.
WRITEget_payment
Retrieve full payment details (amount, shopper, items, current status, timestamps) by pspReferenceId. Use this for richer detail than get_payment_status.
WRITEget_payment_status
Retrieve a payment's status by pspReferenceId.
WRITElist_payments_by_date
List payments created within a date range. Supports cursor pagination via limit + offset. Useful for reconciliation and reporting.
DELETEcancel_payment
Cancel a payment that has not yet been captured/settled.
DELETEcreate_refund
Refund a settled payment (full or partial). Idempotent via transactionRefundId.
DELETEget_refund
Retrieve refund status by pspReferenceId + refundId.
READlist_refunds
List all refunds issued against a given payment.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-nupay` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
NuPay — MCP server · 22 tools | CodeSpar