mcpField
M
mcp-payway

mcp-payway

Local
github.com/codesparFinance275Updated 4w ago

About mcp-payway

mcp-payway is an MCP server for Payway (formerly Decidir), an Argentine card acquiring gateway, offering 6 tools for card tokenization, charges, installments, split payments and refunds. It is intended for developers who want agents to initiate card payments in the Argentine market. The server uses separate public and private API keys for tokenization and other operations.

Key features

  1. 01Provides 6 Payway payment tools
  2. 02Tokenizes card data into single-use payment tokens
  3. 03Supports one-step charges and two-step capture
  4. 04Supports installment and split payment charges
  5. 05Supports full and partial refunds

Use cases

  1. 01Charging a previously tokenized card through an agent
  2. 02Querying payment records and issuing partial refunds
  3. 03Capturing previously authorized payments in a two-step flow

MCP support

This project is an MCP server that exposes Payway tokenization, charge, query and refund endpoints as tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-payway": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-payway"
],
"env": {
"PAYWAY_PUBLIC_API_KEY": "<PAYWAY_PUBLIC_API_KEY>",
"PAYWAY_PRIVATE_API_KEY": "<PAYWAY_PRIVATE_API_KEY>",
"PAYWAY_ENV": "<PAYWAY_ENV>"
}
}
}
}
Run commandnpx -y @codespar/mcp-payway
Environment variables to set
PAYWAY_PUBLIC_API_KEYSecretPayway PUBLIC apikey — used only by create_token (card tokenization)
PAYWAY_PRIVATE_API_KEYSecretPayway PRIVATE apikey — payments, captures, refunds and queries
PAYWAY_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox' (Decidir sandbox host).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-payway0.1.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
card_numberstringYesFull PAN (card number)
security_codestringYesCVV/CVC
card_holder_namestringYesCardholder name as printed
card_expiration_yearstringYesExpiry year, YY (e.g. '27')
card_expiration_monthstringYesExpiry month, MM (e.g. '08')
card_holder_identificationobjectNoCardholder document, e.g. { type: 'dni', number: '12345678' }
card_holder_identification.typestringNoDocument type (dni, cuit, ...)
card_holder_identification.numberstringNoDocument number

Details

From the project README

@codespar/mcp-payway

MCP server for Payway (ex-Prisma Medios de Pago / Decidir) — Argentina's dominant card-acquiring gateway: card tokenization, one-step and two-step charges, installments (cuotas), marketplace split and refunds.

npm License: MIT

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "payway": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-payway"],
      "env": {
        "PAYWAY_PUBLIC_API_KEY": "your-public-apikey",
        "PAYWAY_PRIVATE_API_KEY": "your-private-apikey",
        "PAYWAY_ENV": "sandbox"
      }
    }
  }
}
Claude Code
claude mcp add payway -- npx @codespar/mcp-payway
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "payway": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-payway"],
      "env": {
        "PAYWAY_PUBLIC_API_KEY": "your-public-apikey",
        "PAYWAY_PRIVATE_API_KEY": "your-private-apikey",
        "PAYWAY_ENV": "sandbox"
      }
    }
  }
}

Authentication

Payway authenticates with a single raw header named apikey (not Authorization: Bearer). Two co-equal keys exist with different powers — see the table below.

The two-key model

Payway issues two co-equal API keys with different powers:

KeyHeaderMay call
PublicapikeyPOST /tokens (card tokenization only)
PrivateapikeyEverything else: payments, captures, refunds, queries

The auth header is a single raw header named apikey — not Authorization: Bearer.

Tools (6)

ToolEndpointWhat it does
create_tokenPOST /tokensTokenize card data into a single-use payment token (public key)
create_paymentPOST /paymentsCharge a token — single sale or distributed/split, with installments
get_paymentGET /payments/{id}Fetch a payment by id
list_paymentsGET /paymentsList payments (offset, pageSize, siteOperationId, merchantId)
refund_paymentPOST /payments/{id}/refundsFull refund (empty body) or partial (amount in minor units)
confirm_paymentPUT /payments/{id}Capture a previously authorized payment (two-step flow)

Environment

VariableRequiredDescription
PAYWAY_PUBLIC_API_KEYyesPublic apikey (tokenization)
PAYWAY_PRIVATE_API_KEYyesPrivate apikey (payments, refunds, queries)
PAYWAY_ENVnosandbox (default, Decidir sandbox host) or production

Base URLs: production https://ventasonline.payway.com.ar/api/v2, sandbox https://developers.decidir.com/api/v2.

Notes

  • Amounts are integers in minor units: 50000 = ARS 500.00.
  • payment_method_id identifies the card brand (1 = Visa, 31 = Mastercard, 15 = Maestro, …).
  • site_transaction_id is the merchant-side idempotency anchor — unique per sale.
  • This server never invents card data; agents must collect PAN/expiry/CVV from the user or a vault.

Enterprise

Need governance, budget limits, and audit trails for agent-driven payments on Payway? CodeSpar Enterprise adds a policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT © CodeSpar

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.