Skip to main content
Glama

invoice_pay

Build the plan to pay an invoice from payer, with the token payer holds (default: the invoice token). Nothing is signed or sent here. method "transfer": same token, a direct transfer built from the stored invoice (no fee, no gain; the receiver sees the payer as sender). method "swap": another token; amountIn is computed so the GUARANTEED minimum output covers the requested amount, the route is always the one with GAIN when there is one, and the output goes straight to the receiver (the receiver sees the DEX router as sender). Any surplus over the requested amount goes to the receiver. plan has the same shape as a swap_build plan: on EVM sign steps[] in order with prepare_signing (approve steps first, then the transaction); on Solana pass {transaction, executionRef} to prepare_signing and POST the signed transaction to /v1/svm/execute. If simulation.status is approval_required, send the approve and call invoice_pay again. Then call invoice_report_payment with the hash (EVM) or signature (Solana). Errors: price_moved (the minimum fell below the request between quote and build — call again), no_route, native_sol_only (an invoice in SOL can only be paid in SOL), invoice_already_paid. On a private invoice the payer is screened first (OFAC SDN list and the issuer freeze of USDC and EURC (Circle), USDT (Tether), PYUSD and USDG (Paxos) and USD1 (World Liberty)): payer_blocked (403) means this wallet cannot pay it; screening_unavailable (503) means the screening could not finish, try again in a few seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesINV-XXXX-XXXX or the 8-character id.
payerYesThe wallet that will sign and pay, on the invoice network.
tokenInNoOptional: address/mint or symbol of the token the payer pays with. Omit to pay in the invoice token.
slippageBpsNoOptional, default 50. The guaranteed minimum is computed after it, so a tighter slippage asks the payer for less.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources