Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted โ your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @payware/mcp-server
MCP client config
{
"mcpServers": {
"payware": {
"command": "npx",
"args": [
"-y",
"@payware/mcp-server"
]
}
}
}Official MCP (Model Context Protocol) server for payware payment API integration. This server enables AI assistants to interact with payware APIs, automating integration workflows for all partner types.
Releases are published to npm as @payware/mcp-server and to the official MCP Registry as io.github.payware/mcp-server. MIT licensed, see LICENSE.
contentSha256 header)ERR_INVALID_CONTENT_HASH, ERR_MISSING_CONTENT_HASHFrom npm (recommended):
npm install -g @payware/mcp-server
From source:
git clone https://github.com/payware/mcp-server.git
cd mcp-server
npm install
Copy the example environment file and configure your credentials:
cp .env.example .env
Edit .env file:
# Partner ID from payware dashboard
PAYWARE_PARTNER_ID=your_partner_id_here
# Path to private key file (relative to project root)
PAYWARE_SANDBOX_PRIVATE_KEY_PATH=keys/sandbox-your-private-key.pem
PAYWARE_PRODUCTION_PRIVATE_KEY_PATH=keys/production-your-private-key.pem
# Optional: Sandbox base URL (defaults to https://sandbox.payware.eu/api)
PAYWARE_SANDBOX_URL=https://sandbox.payware.eu/api
โ ๏ธ Security Note: Never commit the .env file to version control. It contains sensitive credentials.
npm start
Generate RSA Keys
Tool: payware_authentication_generate_rsa_keys
Create JWT Token
Tool: payware_authentication_create_jwt_token
Parameters:
- partnerId: (from PAYWARE_PARTNER_ID)
- privateKey: (from environment-specific key path)
Setup Sandbox
Tool: payware_authentication_setup_sandbox_auth
Parameters:
- partnerId: (from PAYWARE_PARTNER_ID)
Create Transaction
Tool: payware_operations_create_transaction
Parameters:
- partnerId: (from PAYWARE_PARTNER_ID)
- privateKey: (from environment-specific key path)
- amount: 10.00
- currency: EUR
- reasonL1: "Payment description"
- type: PLAIN
Check Status
Tool: payware_operations_get_transaction_status
Parameters:
- partnerId: (from PAYWARE_PARTNER_ID)
- privateKey: (from environment-specific key path)
- transactionId: TRANSACTION_ID
The payware MCP server transforms flat parameter inputs into the proper nested JSON structure required by the payware API:
{
// ROOT LEVEL - Transaction metadata
"shop": "SHOP001", // Optional: Shop code
"account": "GB29NWBK60161331926810", // Optional: Account identifier
"friendlyName": "Your Shop Name", // Optional: Account holder name
"callbackUrl": "https://callback.url", // Optional: HTTPS callback URL
"passbackParams": "{\"orderId\":\"12345\"}", // Optional: Callback parameters
// TRANSACTION DATA - Required transaction information
"trData": {
"amount": "25.50", // String/Number: Amount (can be "0.00" for flexible amounts)
"currency": "EUR", // REQUIRED: ISO 3-character currency code
"reasonL1": "Payment for services", // REQUIRED: Transaction description (max 100 chars)
"reasonL2": "Order #12345" // Optional: Additional description (max 100 chars)
},
// TRANSACTION OPTIONS - Transaction behavior settings
"trOptions": {
"type": "QR", // PLAIN, QR, or BARCODE (default: PLAIN)
"timeToLive": 300 // Seconds: 60-600 (default: 120)
},
// QR OPTIONS - Only included when type=QR
"qrOptions": {
"qrFormat": "PNG", // PNG, SVG, JPG, GIF, BMP (default: SVG)
"qrBorder": 4, // Border modules: 1-10 (default: 4)
"qrErrorCorrection": "QUARTILE", // LOW, MEDIUM, QUARTILE, HIGH (default: QUARTILE)
"qrScale": 16, // Pixel size: 1-100 (default: 16, irrelevant for SVG)
"qrVersion": 10 // QR version: 1-40 (default: 10, auto if not specified)
},
// BARCODE OPTIONS - Only included when type=BARCODE
"barOptions": {
"barFormat": "SVG", // PNG, SVG, JPG (default: SVG)
"barModuleWidth": 2, // Module width: 1-10 (default: 2)
"barBarHeight": 100, // Height: 15-1000 (default: 100)
"barFontSize": 12, // Font size: 0-24 (default: 12)
"barHumanReadableLocation": "NONE" // NONE, BOTTOM, TOP (default: NONE)
}
}
When using MCP tools, parameters are automatically mapped to the correct API structure:
| MCP Tool Parameter | API Location | Description |
|---|---|---|
partnerId, privateKey | Authentication | Used for JWT signing, not sent in request |
account, friendlyName, shop, callbackUrl, passbackParams | Root Level | Transaction metadata |
amount, currency, reasonL1, reasonL2 | trData object | Core transaction data |
type, timeToLive | trOptions object | Transaction behavior |
qrFormat, qrBorder, etc. | qrOptions object | QR code settings (when type=QR) |
barFormat, barModuleWidth, etc. | barOptions object | Barcode settings (when type=BARCODE) |
payware_generate_code_exampleAdvanced multi-language code generation with framework support
Supports 60+ operations across all partner types:
payware_generate_documentationComprehensive documentation generator
Generates complete API documentation with working code examples for any partner type and programming language combination.
payware_authentication_generate_rsa_keysGenerate RSA key pair for API authentication.
Parameters:
keySize (optional): RSA key size in bits (default: 2048)payware_authentication_create_jwt_tokenCreate JWT token for API authentication.
Parameters:
partnerId (required): Partner ID from paywareprivateKey (required): RSA private key in PEM formatpayware_authentication_validate_jwtValidate JWT token format and signature.
Parameters:
token (required): JWT token to validatepartnerId (required): Partner ID for validationpayware_authentication_test_jwtTest JWT token with payware API.
Parameters:
token (required): JWT token to testpartnerId (required): Partner IDpayware_authentication_setup_sandbox_authSetup sandbox authentication configuration.
Parameters:
partnerId (required): Partner ID from paywareprivateKey (optional): Private key for validationpayware transactions can have the following statuses:
ACTIVE Status:
payware_transactions_get_transaction_status/transactions/{id} endpointFinal Statuses:
These final statuses are only available through payware_operations_get_transaction_history using GET /transactions-history/{id} endpoint.
payware_operations_create_transactionCreate a new transaction with full API structure support.
Key Parameters:
currency (required): ISO 3-character code (EUR, USD, GBP, etc.)reasonL1 (required): Transaction description (max 100 chars)partnerId (required): Partner ID from payware dashboardprivateKey (required): RSA private key for JWT signingamount (optional): Currency value (default: "0.00" for flexible amounts)type (optional): PLAIN, QR, or BARCODE (default: PLAIN)timeToLive (optional): Payment timeout in seconds, 60-600 (default: 120)QR Options (when type=QR):
qrFormat: PNG, SVG, JPG, GIF, BMP (default: SVG)qrErrorCorrection: LOW, MEDIUM, QUARTILE, HIGH (default: QUARTILE)qrScale, qrBorder, qrVersion: Size and appearance settingsBarcode Options (when type=BARCODE):
barFormat: PNG, SVG, JPG (default: SVG)barModuleWidth, barBarHeight, barFontSize: Size settingspayware_operations_get_transaction_statusGet status of ACTIVE transactions only. For completed/finalized transactions use history tool.
Parameters:
transactionId (required): Transaction ID (starts with 'pw')partnerId (required): Partner IDprivateKey (required): Private key for JWT signingpayware_operations_simulate_callbackSimulate callback scenarios for testing.
Parameters:
transactionId (required): Transaction IDstatus (optional): CONFIRMED, DECLINED, FAILED, EXPIRED, or CANCELLED (default: CONFIRMED)callbackUrl (optional): URL where callback would be sentamount (optional): Transaction amount (default: 10.00)currency (optional): Currency (default: EUR)type (optional): Transaction type (default: PLAIN)payware_generate_code_exampleGenerate production-ready code examples for any payware operation.
Parameters:
operation (required): Operation to generate - see complete list belowlanguage (optional): python, nodejs, php, java, csharp, curl (default: python)partner_type (optional): merchant, isv, payment_institution (default: merchant)include_comments (optional): Include detailed code comments (default: true)include_error_handling (optional): Include comprehensive error handling (default: true)Available Operations by Category:
Authentication:
authentication - JWT authentication setupTransaction Operations (all partner types):
create_transaction - Create a new payment transactionget_transaction_status - Get transaction status and detailsprocess_transaction - Process a pending transactioncancel_transaction - Cancel a pending transactionProduct Operations (merchant, isv):
create_product - Create a new productget_product - Get product detailslist_products - List all productsPOI Operations (isv):
set_price - Set price on a Point of Interaction devicecancel_price - Cancel active price on POIget_poi - Get POI detailsget_poi_status - Get POI transaction statusget_poi_qrcode - Generate QR code for POIlist_pois - List all POIs for a merchantOAuth2 Operations (isv only):
obtain_token - Obtain OAuth2 access tokenget_token_info - Get OAuth2 token informationData Operations (all partner types):
generate_report - Generate analytics reportget_report_status - Get report generation statusP2P Operations (payment_institution only):
initiate_p2p_transfer - Initiate peer-to-peer transferaccept_p2p_transfer - Accept P2P transferDeep Links (all partner types):
get_transaction_link - Get deep link for transactionSoundbites (payment_institution only):
register_audio - Register audio content for soundbite transactionspayware_generate_documentationGenerate comprehensive API documentation with code examples.
Parameters:
language (optional): Target programming language (default: python)partnerType (optional): merchant, isv, payment_institution (default: merchant)includeScenarios (optional): Include real-world integration scenarios (default: true)outputFormat (optional): markdown, html, json (default: markdown)payware_utils_format_requestFormat and validate API requests with deterministic JSON serialization for SHA-256 consistency.
Parameters:
type (required): transaction, headers, or curldata (optional): Data to formatjwtToken (optional): JWT token for headerssignature (optional): Request signatureendpoint (optional): API endpoint for curlmethod (optional): HTTP method (default: POST)payware_utils_format_json_deterministicFormat JSON with deterministic property ordering for consistent SHA-256 calculation.
Parameters:
data (required): Object to serializeminimize (optional): Remove whitespace (default: true)payware_utils_server_infoGet MCP server information and configuration.
Note: All transaction data is serialized using consistent property ordering to prevent content hash mismatch errors.
@modelcontextprotocol/sdk: MCP server frameworkaxios: HTTP client for API callsjsonwebtoken: JWT token creationnode-forge: RSA key generationhttps://sandbox.payware.eu/api/v1โ ๏ธ Important Security Notes:
.env files to version controlโ ๏ธ CRITICAL: payware API requires deterministic JSON serialization for SHA-256 calculation
Example of correct JSON format:
{"trData":{"amount":"25.50","currency":"EUR","reasonL1":"Payment description"},"trOptions":{"timeToLive":300,"type":"PLAIN"}}
Why this matters:
ERR_INVALID_CONTENT_HASH errorscontentSha256 matches request body SHA-256Authentication Failed (ERR_INVALID_SIGNATURE)
openssl rsa -in privateKey.pem -pubout to extract public key from private keyContent Hash Mismatch Error (ERR_INVALID_CONTENT_HASH)
createMinimizedJSON() from /src/core/utils/json-serializer.jsTransaction Creation Failed
MCP Connection Issues
npm startnpm run inspector) for debuggingHTTP Proxy Server (npm run proxy):
README-proxy.mdMCP Bridge (npm run bridge):
npm run inspectorโ Confirmed Working Operations:
๐งช Test Results:
For issues related to:
MIT License