Skip to main content
Glama
Payware MCP Server

Payware MCP Server

Official
by payware

payware_operations_create_transaction

Create a payment transaction with amount, currency, reason, and optional QR/barcode, item lines, tips, callback URL, and deferred transfer settings for merchant payments.

Instructions

[Merchant] Create a new payware transaction. Parameters map to the following API structure:

๐Ÿ“‹ ROOT LEVEL (Transaction metadata):

  • shop, account, friendlyName, callbackUrl, passbackParams

  • producerPartnerId, terminalId, terminalManufacturer (POS terminal producer attribution - see below)

๐Ÿ’ฐ TRANSACTION DATA (trData object):

  • amount, currency, reasonL1, reasonL2, tip (your own tip inside amount - see below)

โš™๏ธ TRANSACTION OPTIONS (trOptions object):

  • type, timeToLive (see below), deferredAllowed (deferred Merchant Leg opt-in - see below)

๐Ÿ“ฑ QR OPTIONS (qrOptions object - only when type=QR):

  • qrFormat, qrBorder, qrErrorCorrection, qrScale, qrVersion

๐Ÿ”— BARCODE OPTIONS (barOptions object - only when type=BARCODE):

  • barFormat, barModuleWidth, barBarHeight, barFontSize, barHumanReadableLocation

๐Ÿ” AUTHENTICATION (not sent to API, used for JWT signing):

  • partnerId, privateKey

Actual API Request Structure:

{
  "shop": "...",
  "account": "...",
  "friendlyName": "...",
  "callbackUrl": "...",
  "passbackParams": "...",
  "trData": {
    "amount": "25.50",
    "currency": "EUR", 
    "reasonL1": "...",
    "reasonL2": "..."
  },
  "trOptions": {
    "type": "QR",
    "timeToLive": 300
  },
  "qrOptions": { ... }
}

๐Ÿงพ LINES (items, root level, optional): what the payer's bank shows instead of one amount - items with quantity and unit price, delivery, discounts, taxes. 1-50 lines that sum exactly to trData.amount, or to trData.amount minus tip when you send one (400 ERR_ITEMS_DO_NOT_SUM); malformed lines, or a line with a country (payware sets it only on delivery lines it prices), are 400 ERR_INVALID_ITEMS; an empty list is 400 ERR_ITEMS_EMPTY (leave items out instead). Not for an amount of 0. Every payment, with lines or without, is paid exactly the amount it asks (the payer's bank gets 409 ERR_AMOUNT_NOT_TOTAL for anything else), plus a tip where one is allowed. A tip is never a line: a TIP line in your items is 400 ERR_INVALID_ITEMS. payware records the tip on the payment and returns it as tip beside items and total, which stay what was sold: the payer paid total + tip, and the payware fee applies to the whole of it. The response, the callback and the transaction history carry items, total and tip back. Lines change nothing about who is paid.

๐Ÿ’ TIP (tip, sent as trData.tip, optional): one tip per payment, recorded on it and never a line.

  • Yours, for a till that asks the payer before it shows the code: amount is what the payer pays, tip included, and tip is the part that is the tip, above 0 and at most the amount before it (400 ERR_INVALID_TIP). items, if any, add up to amount minus tip. The payer's bank shows it, pays exactly amount and offers no second tip. No shop setting is needed.

  • The payer's, without yours: where your shop allows tips (tipsAllowed, the portal's shop form), the payer may add a tip in their bank, and pays the amount plus the tip. Elsewhere the payer pays exactly the amount: there is no paying more without a tip.

  • Either way it comes back as tip in the response, the callback and the transaction history, and the payware fee applies to the whole amount.

โฑ๏ธ PAYMENT LIFETIME (timeToLive, sent as trOptions.timeToLive, 120 seconds when left out): payware accepts 60 seconds up to the merchant's own ceiling, which is 600 by default and which the merchant can raise in the portal (Settings > Authentication, Longest payment lifetime) up to 2,592,000 (30 days). Above the ceiling the server answers 400 ERR_INVALID_TTL. This tool checks 60 to 2,592,000 before sending; only payware knows the ceiling. An ISV acting for a merchant gets that merchant's ceiling and cannot change it. The e-commerce plugins keep 60-600, because their buyer is waiting at the checkout.

โณ DEFERRED MERCHANT LEG (optional, trOptions.deferredAllowed)

By default the payer's institution pays this transaction with an instant or an internal transfer. deferredAllowed: true also lets it use an ordinary credit transfer that settles later. Rules:

  • Honoured only on your own call without POS terminal producer fields. With producerPartnerId, terminalId or terminalManufacturer the transaction is refused with 400 ERR_DEFERRED_TRANSFER_NOT_ALLOWED: a till payment stays instant or internal.

  • A deferred payment stays ACTIVE, i.e. pending, until the transfer settles, which can take days, and so can stay ACTIVE past its timeToLive. Keep polling or wait for the callback; never treat it as expired yourself. CONFIRMED arrives once the money has reached your account.

  • Echoed as deferredAllowed: true in the create response and on status reads when set; absent otherwise. Leave it out for instant or internal only.

๐Ÿญ POS TERMINAL PRODUCER ATTRIBUTION (optional, root level)

Only relevant if the transaction originates on a POS terminal whose producer has a revenue-share agreement with payware. Three fields, all optional:

  • producerPartnerId - the 8-character partnerId payware issued to the terminal producer. An unrecognised value fails the transaction with a 400 (ERR_INVALID_PRODUCER_ID) - it is deliberately not ignored, so that a terminal configured with the wrong id fails on its first sale where an installer can see it. Omit the field entirely when there is no producer arrangement; never send an empty string.

  • terminalId - the producer's own identifier for the physical terminal. Max 64 chars, no control characters. payware records it and never interprets it: no format, no uniqueness enforcement, and nothing about pricing or attribution depends on it.

  • terminalManufacturer - device manufacturer as the terminal reports it. Max 64 chars, no control characters. Recorded for provenance. payware's internal attribution review counts each producer's sales by reported manufacturer, so a build running on another vendor's hardware stands out; it is never blocked.

Two things worth knowing:

  1. It never changes what the merchant is charged. The producer's share comes out of payware's own fee, not out of a higher price for the merchant, whose fee always follows the fee hierarchy.

  2. None of the three is returned. They do not appear in the create response, in get_transaction_status, in transaction history, or in any callback. What a producer earned is visible on their own dashboard and settlements - attribution is recorded against the fee, not against the transaction.

If an ISV's software made the call, the ISV is attributed and the producer is not, even when the ISV's software is running on that producer's hardware.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "currency": "<currency>",
      "reasonL1": "<reasonL1>"
    },
    "name": "payware_operations_create_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipNo๐Ÿ’ฐ TRANSACTION DATA: your own tip inside amount, sent as trData.tip, e.g. "2.00": a tip the payer chose at your till before you showed the code. A plain decimal above 0 at the currency's scale, at most the amount before it, so at most half of amount (400 ERR_INVALID_TIP). amount is what the payer pays, tip included; items, if any, add up to amount minus tip. The payer's bank shows the tip, pays exactly amount and offers no second tip. Needs no shop setting. Leave it out to let the payer add a tip in their bank, where your shop allows tips.
shopNo๐Ÿ“‹ ROOT LEVEL: Shop code (if not supplied, default shop is used)
typeNoTransaction type
itemsNoOptional lines the payer's bank shows, 1 to 50, e.g. [{"type":"ITEM","name":"Vase","quantity":2,"unitPrice":"40.00","amount":"80.00"},{"type":"SHIPPING","name":"Delivery","amount":"5.00"}]. The lines must sum EXACTLY to amount, or to amount minus tip when you send one (400 ERR_ITEMS_DO_NOT_SUM otherwise; anything else malformed is 400 ERR_INVALID_ITEMS; an empty list is 400 ERR_ITEMS_EMPTY: send at least one line or leave items out). ITEM: quantity 1-99, unitPrice 0 or more, amount = quantity x unitPrice. DISCOUNT: amount below 0. Every other type: amount 0 or more. Amounts are decimal strings at the currency's payable scale, at most 15 significant and 15 integer digits. Needs an amount above zero. No images, product ids or country here: payware sets country only on the delivery lines it prices. No TIP line (400 ERR_INVALID_ITEMS): a tip is never a line. Your own goes in tip; the payer's, added in their bank where your shop allows tips, comes back as tip too.
amountNoAmount as currency value (e.g., 25.50 for โ‚ฌ25.50 or '15.75' for $15.75). Can be 0 for amount-flexible transactions. At most 15 significant digits and 15 integer digits (400 ERR_INVALID_AMOUNT_LENGTH)
accountNo๐Ÿ“‹ ROOT LEVEL: Account identifier (if not supplied, determined from payware portal)
qrScaleNoQR OPTIONS (type=QR): pixels per module, 1-100, irrelevant for SVG (default 16)
currencyYesTransaction currency (ISO 3-character code)
qrBorderNoQR OPTIONS (type=QR): quiet zone around the code, in modules, 1-10 (default 4)
qrFormatNoQR OPTIONS (type=QR): image format, PNG, JPG or SVG (default SVG)
reasonL1YesTransaction grounds description (required)
reasonL2NoTransaction grounds description continuation (optional)
barFormatNoBARCODE OPTIONS (type=BARCODE): image format, PNG, JPG or SVG (default SVG)
partnerIdNo๐Ÿ” AUTHENTICATION: Partner ID from payware dashboard (not sent in API request). Uses PAYWARE_PARTNER_ID env var as default.
qrVersionNoQR OPTIONS (type=QR): QR version, 1-40, higher holds more data (default 3)
privateKeyNo๐Ÿ” AUTHENTICATION: RSA private key for JWT token creation (not sent in API request). Accepts PEM format with/without headers or raw base64 content. Uses environment-specific private key as default.
terminalIdNo๐Ÿญ ROOT LEVEL: Opaque identifier of the physical terminal, scoped to the producer's own estate. payware assumes no format and enforces no uniqueness; it is recorded for provenance and never affects attribution or pricing. Make it unique within your own estate anyway - that is what lets you answer 'which terminal produced this sale' later. Not returned in any response or callback.
timeToLiveNoโš™๏ธ TRANSACTION OPTIONS: Time allowed for payment initiation in seconds (sent as trOptions.timeToLive; 120 when left out). payware accepts 60 up to the merchant's own ceiling: 600 by default, which the merchant can raise in the portal (Settings > Authentication, Longest payment lifetime) up to 2592000 (30 days). Above the ceiling is 400 ERR_INVALID_TTL; this tool checks 60 to 2592000 only, as it cannot see the ceiling. An ISV acting for a merchant gets that merchant's ceiling and cannot change it. The e-commerce plugins keep 60-600, because their buyer is waiting at the checkout. Once the payer's institution has started the payment, the transaction stays ACTIVE past it until the money has moved (seconds for an instant transfer, days with deferredAllowed); never infer EXPIRED from the clock.
useSandboxNoUse sandbox environment for testing
barFontSizeNoBARCODE OPTIONS (type=BARCODE): font size of the human-readable text, 0-24 (default 12)
callbackUrlNo๐Ÿ“‹ ROOT LEVEL: HTTPS URL to receive transaction status callbacks. Must be https://, must present a publicly-trusted TLS certificate, and must resolve to a public address - internal/private addresses are rejected (ERR_UNRESOLVABLE_CALLBACK_URL).
barBarHeightNoBARCODE OPTIONS (type=BARCODE): bar height in pixels, 15-1000 (default 100)
friendlyNameNo๐Ÿ“‹ ROOT LEVEL: Account holder recognizable name (if not supplied, merchant alias is used)
barModuleWidthNoBARCODE OPTIONS (type=BARCODE): module width in pixels, 1-10 (default 2)
idempotencyKeyNoOptional. Sent as the Idempotency-Key header. Use one value per payment (a UUID is typical) and the same value on every retry of it: a retry with the same key and body within 24 hours returns the transaction the first call created instead of a new one, and the result reports replayed: true. The same key with a different body is refused (422 ERR_IDEMPOTENCY_KEY_REUSED); a retry while the first call still runs gets 409 ERR_IDEMPOTENCY_KEY_IN_PROGRESS.
passbackParamsNo๐Ÿ“‹ ROOT LEVEL: Additional parameters passed back in callbacks (max 200 chars)
deferredAllowedNoโš™๏ธ TRANSACTION OPTIONS: Opt this transaction in to a deferred Merchant Leg (sent as trOptions.deferredAllowed). Optional; omit it for instant or internal only. When true, the payer's institution may also pay by an ordinary credit transfer that settles later. Not for a terminal sale: combined with producerPartnerId, terminalId or terminalManufacturer it is refused with 400 ERR_DEFERRED_TRANSFER_NOT_ALLOWED. A deferred payment stays ACTIVE (pending) until the transfer settles, which can take days and can outlast timeToLive: keep polling or wait for the callback, never treat it as expired yourself. Echoed as deferredAllowed: true when set.
producerPartnerIdNo๐Ÿญ ROOT LEVEL: partnerId of the POS terminal producer whose terminal produced this transaction. Must be a partner registered with payware and flagged as a producer - an unrecognised value REJECTS the transaction (400 ERR_INVALID_PRODUCER_ID) rather than being ignored. Omit entirely when there is no producer arrangement; never send an empty string. Selects the producer's revenue share out of payware's own fee and never changes what the merchant is charged. Not returned in any response or callback.
qrErrorCorrectionNoQR OPTIONS (type=QR): error correction, LOW (7%), MEDIUM (15%), QUARTILE (25%) or HIGH (30%) (default QUARTILE)
terminalManufacturerNo๐Ÿญ ROOT LEVEL: Device manufacturer as reported by the terminal. Recorded for provenance; a mismatch against the expected producer is surfaced in settlement review and never blocks the transaction. Not returned in any response or callback.
barHumanReadableLocationNoBARCODE OPTIONS (type=BARCODE): where the human-readable text goes (default NONE)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.4.0
    • changedInput schema / properties / items / description
      Previous value: -"Optional lines the payer's bank shows, 1 to 50, e.g. [{\"type\":\"ITEM\",\"name\":\"Vase\",\"quantity\":2,\"unitPrice\":\"40.00\",\"amount\":\"80.00\"},{\"type\":\"SHIPPING\",\"name\":\"Delivery\",\"amount\":\"5.00\"}]. The lines must sum EXACTLY to amount (400 ERR_ITEMS_DO_NOT_SUM otherwise; anything else malformed is 400 ERR_INVALID_ITEMS; an empty list is 400 ERR_ITEMS_EMPTY: send at least one line or leave items out). ITEM: quantity 1-99, unitPrice 0 or more, amount = quantity x unitPrice. DISCOUNT: amount below 0. Every other type: amount 0 or more. Amounts are decimal strings at the currency's payable scale, at most 15 significant and 15 integer digits. Needs an amount above zero. No images, product ids or country here: payware sets country only on the delivery lines it prices."New value: +"Optional lines the payer's bank shows, 1 to 50, e.g. [{\"type\":\"ITEM\",\"name\":\"Vase\",\"quantity\":2,\"unitPrice\":\"40.00\",\"amount\":\"80.00\"},{\"type\":\"SHIPPING\",\"name\":\"Delivery\",\"amount\":\"5.00\"}]. The lines must sum EXACTLY to amount, or to amount minus tip when you send one (400 ERR_ITEMS_DO_NOT_SUM otherwise; anything else malformed is 400 ERR_INVALID_ITEMS; an empty list is 400 ERR_ITEMS_EMPTY: send at least one line or leave items out). ITEM: quantity 1-99, unitPrice 0 or more, amount = quantity x unitPrice. DISCOUNT: amount below 0. Every other type: amount 0 or more. Amounts are decimal strings at the currency's payable scale, at most 15 significant and 15 integer digits. Needs an amount above zero. No images, product ids or country here: payware sets country only on the delivery lines it prices. No TIP line (400 ERR_INVALID_ITEMS): a tip is never a line. Your own goes in tip; the payer's, added in their bank where your shop allows tips, comes back as tip too."
    • changedInput schema / properties / timeToLive / description
      Previous value: -"โš™๏ธ TRANSACTION OPTIONS: Time allowed for payment initiation in seconds. Once the payer's institution has started the payment, the transaction stays ACTIVE past it until the money has moved (seconds for an instant transfer, days with deferredAllowed); never infer EXPIRED from the clock."New value: +"โš™๏ธ TRANSACTION OPTIONS: Time allowed for payment initiation in seconds (sent as trOptions.timeToLive; 120 when left out). payware accepts 60 up to the merchant's own ceiling: 600 by default, which the merchant can raise in the portal (Settings > Authentication, Longest payment lifetime) up to 2592000 (30 days). Above the ceiling is 400 ERR_INVALID_TTL; this tool checks 60 to 2592000 only, as it cannot see the ceiling. An ISV acting for a merchant gets that merchant's ceiling and cannot change it. The e-commerce plugins keep 60-600, because their buyer is waiting at the checkout. Once the payer's institution has started the payment, the transaction stays ACTIVE past it until the money has moved (seconds for an instant transfer, days with deferredAllowed); never infer EXPIRED from the clock."
    • changedInput schema / properties / timeToLive / maximum
      Previous value: -600New value: +2592000
    • addedInput schema / properties / tip
      Added value: +{
      +  "description": "๐Ÿ’ฐ TRANSACTION DATA: your own tip inside amount, sent as trData.tip, e.g. \"2.00\": a tip the payer chose at your till before you showed the code. A plain decimal above 0 at the currency's scale, at most the amount before it, so at most half of amount (400 ERR_INVALID_TIP). amount is what the payer pays, tip included; items, if any, add up to amount minus tip. The payer's bank shows the tip, pays exactly amount and offers no second tip. Needs no shop setting. Leave it out to let the payer add a tip in their bank, where your shop allows tips.",
      +  "type": [
      +    "string",
      +    "number"
      +  ]
      +}
  2. Changed2 schema fields changedv2.3.0
    • changedInput schema / properties / amount / description
      Previous value: -"Amount as currency value (e.g., 25.50 for โ‚ฌ25.50 or '15.75' for $15.75). Can be 0 for amount-flexible transactions. Max 36 chars including decimals"New value: +"Amount as currency value (e.g., 25.50 for โ‚ฌ25.50 or '15.75' for $15.75). Can be 0 for amount-flexible transactions. At most 15 significant digits and 15 integer digits (400 ERR_INVALID_AMOUNT_LENGTH)"
    • addedInput schema / properties / items
      Added value: +{
      +  "description": "Optional lines the payer's bank shows, 1 to 50, e.g. [{\"type\":\"ITEM\",\"name\":\"Vase\",\"quantity\":2,\"unitPrice\":\"40.00\",\"amount\":\"80.00\"},{\"type\":\"SHIPPING\",\"name\":\"Delivery\",\"amount\":\"5.00\"}]. The lines must sum EXACTLY to amount (400 ERR_ITEMS_DO_NOT_SUM otherwise; anything else malformed is 400 ERR_INVALID_ITEMS; an empty list is 400 ERR_ITEMS_EMPTY: send at least one line or leave items out). ITEM: quantity 1-99, unitPrice 0 or more, amount = quantity x unitPrice. DISCOUNT: amount below 0. Every other type: amount 0 or more. Amounts are decimal strings at the currency's payable scale, at most 15 significant and 15 integer digits. Needs an amount above zero. No images, product ids or country here: payware sets country only on the delivery lines it prices.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "description": "The line total. Negative only on a DISCOUNT",
      +        "pattern": "^-?\\d+(\\.\\d+)?$",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "What the line is, 1 to 100 characters, no control characters",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "description": "ITEM lines only: 1 to 99",
      +        "maximum": 99,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "description": "Kind of line. Default ITEM",
      +        "enum": [
      +          "ITEM",
      +          "SHIPPING",
      +          "DISCOUNT",
      +          "TAX",
      +          "SURCHARGE"
      +        ],
      +        "type": "string"
      +      },
      +      "unitPrice": {
      +        "description": "ITEM lines only: price of one unit, 0 or more",
      +        "pattern": "^-?\\d+(\\.\\d+)?$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. First observedv2.2.0

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare that this is a non-read-only, open-world, non-idempotent call. The description goes far beyond them, disclosing the 24-hour idempotency-key replay semantics, that the three POS fields are never returned in any response or callback, that deferred payments stay ACTIVE past timeToLive and must not be treated as expired, and that items/tip are echoed back. Error codes and their triggers are spelled out instead of being left to discovery.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded and well sectioned with emoji headers, but it is markedly oversized for a tool definition: the tip-is-never-a-line rule, the items summation rule and the deferred-transfer caveat are each restated multiple times, and large parts duplicate what the schema descriptions already say.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 31 parameters, no output schema and a mutation that moves money, the description still covers what is missing elsewhere: the amount/items/tip arithmetic and its 400 codes, the TTL ceiling nuance, deferred settlement behavior, and what the response and callback carry back. An agent has enough to call it correctly without extra context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description earns a step above by mapping the flat parameters onto the actual nested API request (trData, trOptions, qrOptions, barOptions, root level) and by separating the authentication parameters that sign the JWT from those actually sent to the API, which the schema lists but does not group.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line gives a specific verb and resource: 'Create a new payware transaction.' That is unambiguous. However, it never differentiates itself from the sibling payware_operations_process_transaction, so an agent must guess which of the two creates a transaction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The definition gives explicit when-to-use guidance for the optional features: omit deferredAllowed for instant or internal only, leave out items rather than sending an empty list, omit producerPartnerId entirely when there is no arrangement, use tip only for a till that asks the payer first. What it does not give is tool-selection guidance against siblings such as process_transaction or get_transaction_status.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools