Skip to main content
Glama
alamedaim-apps

Authorize.net MCP Server

get_transaction_details

Retrieve complete transaction information using the transaction ID to view payment details, status, and history from Authorize.net.

Instructions

Get full details for a specific transaction by its transaction ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesThe transaction ID to retrieve details for.

Implementation Reference

  • The main handler function for the 'get_transaction_details' tool. It constructs a GetTransactionDetailsRequest, authenticates with merchant credentials, executes the Authorize.Net API call via controller, handles errors, and returns the transaction details.
    async function getTransactionDetails(transactionId: string) { const request = new ApiContracts.GetTransactionDetailsRequest(); request.setMerchantAuthentication(getMerchantAuth()); request.setTransId(transactionId); const ctrl = new ApiControllers.GetTransactionDetailsController(request.getJSON()); const response = await executeController(ctrl); const apiResponse = new ApiContracts.GetTransactionDetailsResponse(response); if (apiResponse.getMessages().getResultCode() !== ApiContracts.MessageTypeEnum.OK) { const errors = apiResponse.getMessages().getMessage(); throw new Error(`API Error: ${errors[0].getCode()} - ${errors[0].getText()}`); } return apiResponse.getTransaction(); }
  • src/index.ts:253-266 (registration)
    Registers the 'get_transaction_details' tool in the ListTools response, including its name, description, and input schema definition.
    { name: "get_transaction_details", description: "Get full details for a specific transaction by its transaction ID.", inputSchema: { type: "object", properties: { transactionId: { type: "string", description: "The transaction ID to retrieve details for.", }, }, required: ["transactionId"], }, },
  • Defines the input schema for the 'get_transaction_details' tool, specifying the required 'transactionId' parameter.
    inputSchema: { type: "object", properties: { transactionId: { type: "string", description: "The transaction ID to retrieve details for.", }, }, required: ["transactionId"], },
  • src/index.ts:320-322 (registration)
    Dispatches execution of the 'get_transaction_details' tool in the CallToolRequest handler by calling the handler function.
    case "get_transaction_details": result = await getTransactionDetails(args?.transactionId as string); break;
  • Shared utility function used by all tools, including 'get_transaction_details', to asynchronously execute Authorize.Net API controllers.
    function executeController(ctrl: any): Promise<any> { return new Promise((resolve, reject) => { if (ENVIRONMENT === "production") { ctrl.setEnvironment(SDKConstants.endpoint.production); } ctrl.execute(() => { const response = ctrl.getResponse(); if (response === null) { reject(new Error(ctrl.getErrorResponse() || "No response from API")); } else { resolve(response); } }); }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alamedaim-apps/authnet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server