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
- 01Provides 6 Payway payment tools
- 02Tokenizes card data into single-use payment tokens
- 03Supports one-step charges and two-step capture
- 04Supports installment and split payment charges
- 05Supports full and partial refunds
Use cases
- 01Charging a previously tokenized card through an agent
- 02Querying payment records and issuing partial refunds
- 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.
npx -y @codespar/mcp-paywayPAYWAY_PUBLIC_API_KEYSecretPayway PUBLIC apikey — used only by create_token (card tokenization)PAYWAY_PRIVATE_API_KEYSecretPayway PRIVATE apikey — payments, captures, refunds and queriesPAYWAY_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.
Tools
6Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| card_number | string | Yes | Full PAN (card number) |
| security_code | string | Yes | CVV/CVC |
| card_holder_name | string | Yes | Cardholder name as printed |
| card_expiration_year | string | Yes | Expiry year, YY (e.g. '27') |
| card_expiration_month | string | Yes | Expiry month, MM (e.g. '08') |
| card_holder_identification | object | No | Cardholder document, e.g. { type: 'dni', number: '12345678' } |
| card_holder_identification.type | string | No | Document type (dni, cuit, ...) |
| card_holder_identification.number | string | No | Document 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.
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:
| Key | Header | May call |
|---|---|---|
| Public | apikey | POST /tokens (card tokenization only) |
| Private | apikey | Everything else: payments, captures, refunds, queries |
The auth header is a single raw header named apikey — not Authorization: Bearer.
Tools (6)
| Tool | Endpoint | What it does |
|---|---|---|
create_token | POST /tokens | Tokenize card data into a single-use payment token (public key) |
create_payment | POST /payments | Charge a token — single sale or distributed/split, with installments |
get_payment | GET /payments/{id} | Fetch a payment by id |
list_payments | GET /payments | List payments (offset, pageSize, siteOperationId, merchantId) |
refund_payment | POST /payments/{id}/refunds | Full refund (empty body) or partial (amount in minor units) |
confirm_payment | PUT /payments/{id} | Capture a previously authorized payment (two-step flow) |
Environment
| Variable | Required | Description |
|---|---|---|
PAYWAY_PUBLIC_API_KEY | yes | Public apikey (tokenization) |
PAYWAY_PRIVATE_API_KEY | yes | Private apikey (payments, refunds, queries) |
PAYWAY_ENV | no | sandbox (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_ididentifies the card brand (1 = Visa, 31 = Mastercard, 15 = Maestro, …).site_transaction_idis 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
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.