New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@codespar/mcp-nupay

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codespar/mcp-nupay

MCP server for NuPay — Nubank's merchant checkout rail. Pix + NuPay wallet one-click checkout backed by Nubank's 100M+ BR customer distribution.

npmnpm
Version
0.2.0
Version published
Weekly downloads
14
-51.72%
Maintainers
1
Weekly downloads
 
Created
Source

@codespar/mcp-nupay

MCP server for NuPay — Nubank's merchant checkout rail.

NuPay 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.

Tools

ToolPurpose
create_paymentCreate a NuPay or Pix checkout payment
get_payment_statusFetch payment status
cancel_paymentCancel an unsettled payment
create_refundFull or partial refund (idempotent)
get_refundRetrieve refund status
create_recipientRegister a regulatory final beneficiary
get_recipientRetrieve a recipient
query_payment_conditionsList installment/payment options for an amount
create_preauth_paymentCreate a payment using a pre-authorized Bearer token (recurrence)
backchannel_startStart CIBA / OTP shopper authorization
backchannel_completeComplete OTP and exchange for tokens
backchannel_resend_otpResend the OTP
exchange_tokenOAuth2 /v1/token — authorization_code or refresh_token grant

Install

npm install @codespar/mcp-nupay

Environment

NUPAY_MERCHANT_KEY="..."     # X-Merchant-Key issued to your merchant
NUPAY_MERCHANT_TOKEN="..."   # X-Merchant-Token (secret)
NUPAY_CLIENT_ID="..."        # Optional — OAuth client_id for pre-auth / recurrence
NUPAY_CLIENT_SECRET="..."    # Optional — OAuth client_secret
NUPAY_ENV="sandbox"          # sandbox (default) | production

Authentication

Two flows:

  • Standard merchant API (payments, refunds, recipients, payment-conditions) uses X-Merchant-Key + X-Merchant-Token headers. No token exchange.
  • 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.

Base URLs are derived from NUPAY_ENV:

SandboxProduction
APIhttps://sandbox-api.spinpay.com.brhttps://api.spinpay.com.br
Authhttps://sandbox-authentication.spinpay.com.br/apihttps://authentication.spinpay.com.br/api

JWT 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.

Run

# stdio (default)
npx @codespar/mcp-nupay

# HTTP
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-nupay

License

MIT

Keywords

mcp

FAQs

Package last updated on 25 Apr 2026

Related posts