Skip to main content
Glama

list_payment_links

Retrieve and filter payment links from Visa Acceptance with pagination support to manage transaction records efficiently.

Instructions

This tool will list payment links from Visa Acceptance.

Input Schema

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

Implementation Reference

  • Handler function that lists payment links using CyberSource REST API.
    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 for the list_payment_links tool.
    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)') }); };
  • Tool definition object for 'list_payment_links' with method name, parameters, and reference to the handler function.
    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;
  • Central registration function that aggregates all tools, including listPaymentLinks by invoking its module.
    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