Skip to main content
Glama
Pletopay MCP Server

Pletopay MCP Server

Official
by pletopay

Refund a payment (fully or partially)

create_refund
DestructiveIdempotent

Refund a payment fully or partially by bank transfer, using an idempotency key to prevent duplicate payouts and an optional destination when the original sender is unknown.

Instructions

Refund a payment (fully or partially).

Refund a payment, fully or partially, by bank transfer from your available balance. Idempotency-Key is required.

Without amount, the whole refundable amount is refunded. Only succeeded or partially_refunded payments can be refunded (409 payment_not_refundable).

Destination. When the sender’s full account details are known, the refund always goes back to that account: omit destination (a different one returns 400 refund_destination_mismatch). When the sender isn’t known, pass destination (400 refund_destination_required otherwise); it is verified by name enquiry. In live mode a custom destination also needs outbound transfers enabled (403 transfers_disabled).

The payment becomes partially_refunded or refunded only once the refund has actually been paid out (refund.succeeded). Without a reference, one is derived from the Idempotency-Key, so a retried request can’t create a second refund.

In live mode this sends real money or changes where money is paid, and it cannot be undone. Before calling, confirm the exact amount (in kobo) and the destination with the user.

Choose an idempotency_key and reuse it if you retry this call, so it can never happen twice.

Input Schema

NameRequiredDescriptionDefault
amountNoAmount in kobo; defaults to the full refundable amount (partial refunds allowed)
reasonYes
paymentYesThe original payment (pay_…)
metadataNo
referenceNoYour unique refund reference
destinationNoWhere to send the money. Defaults to the original sender when their full account details are known.
idempotency_keyYesRequired. A unique key you choose for this request (for example a UUID). If you retry, send the SAME key: the API returns the original result instead of acting twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses that this sends real money in live mode, cannot be undone, affects payment status only after payout, and requires confirming amount and destination with the user. It also explains idempotency behavior and the resulting error conditions in useful detail.

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

Conciseness4/5

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

The content is front-loaded and organized around key concerns such as destination and idempotency. However, the opening repeats the title and then restates the same sentence, which is unnecessary.

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?

For a destructive, live-money mutation with seven parameters and no output schema, the description covers refundability, destination rules, idempotency, payout timing, and confirmation requirements. Nothing essential for correct invocation appears to be missing.

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?

The description adds substantial meaning beyond the schema for `amount`, `destination`, `reference`, and `idempotency_key`, including defaults and relevant error cases. It does not explain `reason` or `metadata`, so it is strong but not exhaustive.

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

Purpose5/5

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

The description states a specific verb and resource: refund a payment, fully or partially. It clearly distinguishes this mutation from read-oriented siblings such as get_refund and list_refunds.

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?

It gives clear when-to-use conditions, including that only `succeeded` or `partially_refunded` payments can be refunded, and explains when to omit or pass `destination`. It does not explicitly name sibling alternatives, so it falls just short of the top score.

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