Get transaction details
deonpay_get_transactionFetch a single transaction's full detail by UUID, including NetPay timeline, metadata, refund info, and payer IP/user-agent for debugging or refund decisions.
Instructions
Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Transaction UUID. |
Implementation Reference
- src/tools/transactions.ts:62-77 (handler)Handler for deonpay_get_transaction: makes a GET request to /transactions/{uuid} to fetch a single transaction's full details including the NetPay timeline, charge/3DS flow steps, metadata, refund details, and payer info.
// deonpay_get_transaction // ------------------------------------------------------------------------- server.registerTool( "deonpay_get_transaction", { title: "Get transaction details", description: "Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.", inputSchema: { id: z.string().uuid().describe("Transaction UUID."), }, }, safeHandler(async ({ id }) => { return client.get(`/transactions/${encodeURIComponent(id)}`); }), ); - src/tools/transactions.ts:70-72 (schema)Input schema for deonpay_get_transaction: single UUID string parameter 'id' validated with Zod.
inputSchema: { id: z.string().uuid().describe("Transaction UUID."), }, - src/tools/transactions.ts:64-77 (registration)Registration of deonpay_get_transaction tool via server.registerTool() inside registerTransactionTools().
server.registerTool( "deonpay_get_transaction", { title: "Get transaction details", description: "Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.", inputSchema: { id: z.string().uuid().describe("Transaction UUID."), }, }, safeHandler(async ({ id }) => { return client.get(`/transactions/${encodeURIComponent(id)}`); }), ); - src/tools/_helpers.ts:57-67 (helper)safeHandler wraps the tool's async handler with try/catch, converting thrown errors into MCP-shaped error results with isError=true for the LLM to react to.
export function safeHandler<TArgs>( fn: (args: TArgs) => Promise<unknown>, ): (args: TArgs) => Promise<CallToolResult> { return async (args: TArgs) => { try { const value = await fn(args); return jsonResult(value); } catch (err) { return errorResult(err); } }; - src/client.ts:72-74 (helper)DeonpayClient.get() — the HTTP GET method used by the tool handler to call /transactions/{id}.
async get<T = unknown>(path: string, query?: QueryParams): Promise<T> { return this.request<T>("GET", path, { query }); }