get_unsettled_transaction_list
Retrieve pending Authorize.net transactions awaiting settlement to monitor unbatched payments and track pending revenue.
Instructions
Get all transactions that are pending settlement (not yet batched).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:95-109 (handler)The core handler function for the 'get_unsettled_transaction_list' tool. It constructs an AuthorizeNet API request, authenticates with merchant credentials, executes the GetUnsettledTransactionListController via the executeController helper, handles errors, and returns the list of unsettled transactions.async function getUnsettledTransactionList() { const request = new ApiContracts.GetUnsettledTransactionListRequest(); request.setMerchantAuthentication(getMerchantAuth()); const ctrl = new ApiControllers.GetUnsettledTransactionListController(request.getJSON()); const response = await executeController(ctrl); const apiResponse = new ApiContracts.GetUnsettledTransactionListResponse(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.getTransactions() || []; }
- src/index.ts:231-238 (schema)Tool specification including name, description, and input schema (empty object as no parameters are required). This is returned by the ListTools handler.{ name: "get_unsettled_transaction_list", description: "Get all transactions that are pending settlement (not yet batched).", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:312-314 (registration)Registration/dispatch logic in the CallTool request handler switch statement, which invokes the handler function when the tool is called.case "get_unsettled_transaction_list": result = await getUnsettledTransactionList(); break;
- src/index.ts:37-51 (helper)Helper function used by all tool handlers, including getUnsettledTransactionList, to execute AuthorizeNet controllers asynchronously with proper environment setting and error handling.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); } }); }); }
- src/index.ts:29-34 (helper)Helper function to create merchant authentication object using environment variables, used by all API requests including this tool.function getMerchantAuth() { const merchantAuth = new ApiContracts.MerchantAuthenticationType(); merchantAuth.setName(API_LOGIN_ID); merchantAuth.setTransactionKey(TRANSACTION_KEY); return merchantAuth; }