payware_operations_simulate_callback
Simulate payware callback payloads to build and test webhook handlers against the real shape, including absent fields, fee breakdowns, items, tips and retry deduplication.
Instructions
[Merchant] Simulate callback scenarios for testing webhook handling.
Generates the payload a merchant's callbackUrl actually receives, so a handler can be built and
tested against the real shape. Four properties of that shape are easy to get wrong:
1. Absent means absent, not zero. The payload omits properties with no value rather than sending
null or 0. statusMessage, passbackParams, fee, feeFixed and feeRate are all simply
missing when they do not apply. A missing fee means the fee is unknown for that transaction - it
does not mean the transaction was free. Do not write a handler that reads payload.fee as a number
without checking it is there.
2. finalized is absent on EXPIRED. An expired transaction is closed by the platform's expiry
sweep, which sets no finalization moment. Every other status carries one.
3. EXPIRED is a non-payment, not a failure. The payer never paid within timeToLive. Release
the order or the stock, as you would for a cancellation - do not treat it as an error to retry.
4. Deduplicate on (transactionId, callbackType). payware retries a callback up to 15 times,
backing off from about a second to at most 5 minutes between attempts, until the endpoint answers any
2xx. That pair is stable across every retry of the same event, and it is the key payware guarantees.
A handler that does not deduplicate will eventually process one payment twice.
Payments with a product, a placement, a session or lines. The payload also carries, when they apply and absent otherwise: productId (the product the payment came from), placementId (the placement it is attributed to, Premium only), sessionId (the purchase session's pa id) and items with their total (type, productId, name, quantity, unitPrice, amount, and country on a delivery line payware priced; no images). total is the sum of the lines, what was sold. A tip is never a line: the payload carries it as tip (absent without one), yours, sent when you created the payment, or the payer's, added in their bank where your shop allows tips; the payer paid total + tip and the fee applies to the whole of it. On CONFIRMED amount is net of the fee, so amount + fee = total + tip; on any other status nothing was paid and amount equals total + tip. Give items (and tip) and leave amount out: the tool works it out, and refuses an amount the server would never send with those lines.
Not on this payload: deliveryAddress (removed 2026-08-07 - fetch it from
payware_operations_get_transaction_history, which is authenticated and tenant-scoped),
producerPartnerId, transactionType and initiatedBy (the last two are carried on
TRANSACTION_PROCESSED, which merchants do not receive).
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": {
"transactionId": "<transactionId>"
},
"name": "payware_operations_simulate_callback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | payware's fee on this transaction plus VAT where it applies, at the currency's smallest payable unit (e.g. '0.29'). The payer's institution transfers it to payware alongside the merchant's payment, and amount is net of it. Not always two decimals - it follows the currency. Pass null to model the anomaly case, where a transaction has no recorded fee and the server OMITS the property entirely; that is deliberately distinguishable from a genuine '0.00'. | |
| tip | No | The payment's tip, a decimal string (e.g. '2.00'): the merchant's own, sent when it created the payment, or the payer's, added in their bank where the shop allows tips. Never a line: the callback carries it as tip, absent without one. With items the payer paid total + tip, so on CONFIRMED amount + fee = total + tip, and on any other status amount = total + tip. | |
| items | No | Lines of a payment that has them (a product payment with a quantity, a purchase session, a merchant payment created with items): the callback then carries items and their total (the sum of the lines: what was sold). Each line: type (ITEM, SHIPPING, DISCOUNT, TAX or SURCHARGE), name, amount, and for an ITEM productId, quantity and unitPrice, for a SHIPPING line payware priced the country (a merchant's own lines carry none). A tip is never a line: give it as tip. Callback lines carry no images or terms. With items, leave amount out: on CONFIRMED it is worked out as total + tip minus fee, on any other status it is total + tip. | |
| poiId | No | Set to simulate a POI sale: the callback then carries the poiId of the POI that created the transaction | |
| amount | No | Transaction amount (e.g., '57.60'; that is the default without items). With items leave it out: on CONFIRMED it is total minus fee, on any other status the total; a different value is refused | |
| feeVat | No | The VAT included in fee (fee minus feeVat is payware's fee excluding VAT), at the same scale; zero when no VAT applies (reverse charge, or a merchant outside the EU). Present exactly when fee is (server TransactionCallbackPayload). Defaults to zero. | |
| status | No | Transaction status to simulate | CONFIRMED |
| feeRate | No | Variable rate of the applicable fee configuration, e.g. '0.0150' = 1.5%. Informational, same as feeFixed. Pass null to model a transaction with no fee configuration. | 0.0150 |
| currency | No | Transaction currency | EUR |
| feeFixed | No | Fixed fee component of the applicable fee configuration, e.g. '0.1000'. Informational, for reconciliation. Present on FINALIZED callbacks since 2026-08-21 - before that a merchant got the total fee but not the breakdown that produced it. Pass null to model a transaction with no fee configuration, where it is omitted. | 0.1000 |
| productId | No | Set to simulate a payment that came from a product: the callback then carries the productId (from the product snapshot) | |
| sessionId | No | Set to simulate a payment that came from an agent purchase session: the callback then carries the session's pa id | |
| callbackUrl | No | URL where callback would be sent (for simulation only) | |
| placementId | No | Set to simulate a payment attributed to a placement (Premium merchants): the callback then carries the placementId | |
| tipEnteredBy | No | With tip: who entered it, MERCHANT (on create) or PAYER (in the bank app). Default PAYER. The callback carries it only with a tip. | |
| paymentMethod | No | Payment method chosen by customer. A2A = direct transfer. CARD_FUNDED = card-linked account. BNPL = buy now pay later. INSTANT_CREDIT = credit line. | |
| statusMessage | No | Custom status message for the transaction callback | |
| transactionId | Yes | Transaction ID to simulate callback for |