transaction_get
Retrieve detailed transaction information including status, amount, payment method, associated purchase, and customer data with a transaction ID.
Instructions
Get detailed information about a specific transaction.
Returns complete transaction details including:
Transaction status
Amount and currency
Payment method details
Associated purchase information
Customer information
Timestamps and audit data
Required: transactionId parameter
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transactionId | Yes | Unique identifier of the transaction |
Implementation Reference
- src/tools/transactions.ts:147-154 (handler)The handler function that executes transaction_get logic. It calls this.api.getTransaction() with the transactionId and optional appName, returning the transaction details as a formatted JSON string.
case 'transaction_get': const transaction = await this.api.getTransaction(args.transactionId, { appName: args.appName }); return { content: [{ type: "text", text: JSON.stringify(transaction, null, 2) }] }; - src/tools/transactions.ts:67-93 (schema)The input/output schema definition for transaction_get. Defines transactionId (required) and optional appName (required when using master key).
{ name: "transaction_get", description: `Get detailed information about a specific transaction. - Returns complete transaction details including: - Transaction status - Amount and currency - Payment method details - Associated purchase information - Customer information - Timestamps and audit data - Required: transactionId parameter${appNameRequired ? '\n- Requires appName parameter when using master key' : ''}`, inputSchema: { type: "object", properties: { transactionId: { type: "string", description: "Unique identifier of the transaction" }, ...(appNameRequired ? { appName: { type: "string", description: "Name of the app to fetch data from. Required when using master key." } } : {}) }, required: appNameRequired ? ["transactionId", "appName"] : ["transactionId"] } - src/server.ts:71-82 (registration)Registration of all tools including transaction_get via ListToolsRequestSchema handler which calls TransactionTools.getTools() to expose the tool definition.
return { tools: [ ...this.tools.customers.getTools(), ...this.tools.purchases.getTools(), ...this.tools.transactions.getTools(), ...this.tools.statistics.getTools(), ...this.tools.stripe.getTools(), ...this.tools.events.getTools(), ...this.tools.app.getTools() ] }; }); - src/server.ts:96-97 (registration)Routing registration: when a tool name starts with 'transaction_', the call is routed to TransactionTools.handleTool() which dispatches to the correct case including 'transaction_get'.
if (name.startsWith('transaction_')) { return await this.tools.transactions.handleTool(name, args); - src/iaptic-api.ts:204-207 (helper)The API helper method that makes the actual HTTP GET request to /transactions/{transactionId} on the Iaptic API (validator.iaptic.com/v3).
async getTransaction(transactionId: string, params?: { appName?: string }) { const response = await this.client.get(`/transactions/${transactionId}`, { params }); return response.data; }