Skip to main content
Glama

list_payment_links

Retrieve and manage payment links from Visa Acceptance by filtering status and using pagination to view transaction records.

Instructions

This tool will list payment links from Visa Acceptance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetYesPagination offset (required)
limitYesPagination limit (required)
statusNoFilter by status (optional)

Implementation Reference

  • The main handler function that executes the logic to list payment links using the CyberSource PaymentLinksApi.
    export const listPaymentLinks = async ( visaClient: any, context: VisaContext, params: z.infer<ReturnType<typeof listPaymentLinksParameters>> ) => { try { const paymentLinkApiInstance = new cybersourceRestApi.PaymentLinksApi(visaClient.configuration, visaClient.visaApiClient); const opts: { status?: string } = {}; if (params.status) { opts.status = params.status; } const result = await new Promise((resolve, reject) => { paymentLinkApiInstance.getAllPaymentLinks( params.offset, params.limit, opts, (error: any, data: any) => { if (error) { reject(error); } else { resolve(data); } } ); }); return result; } catch (error) { return 'Failed to list payment links'; } };
  • Zod schema defining the input parameters: offset (number, required), limit (number, required), status (string, optional).
    export const listPaymentLinksParameters = ( context: VisaContext = {} as VisaContext ) => { return z.object({ offset: z.number().describe('Pagination offset (required)'), limit: z.number().describe('Pagination limit (required)'), status: z.string().optional().describe('Filter by status (optional)') }); };
  • Defines and exports the tool object with method 'list_payment_links', linking the schema, description, and handler.
    const tool = (context: VisaContext): Tool => ({ method: 'list_payment_links', name: 'List Payment Links', description: listPaymentLinksPrompt(context), parameters: listPaymentLinksParameters(context), actions: { paymentLinks: { read: true, }, }, execute: listPaymentLinks, }); export default tool;
  • Registers the listPaymentLinks tool (imported as listPaymentLinkToolModule) into the central tools array via createTools function.
    export function createTools(context: VisaContext): Tool[] { return [ createInvoiceToolModule(context), updateInvoiceToolModule(context), getInvoiceToolModule(context), listInvoicesToolModule(context), sendInvoiceToolModule(context), cancelInvoiceToolModule(context), createPaymentLinkToolModule(context), updatePaymentLinkToolModule(context), getPaymentLinkToolModule(context), listPaymentLinkToolModule(context) ]; }

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/visaacceptance/agent-toolkit'

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