Skip to main content
Glama

get_payment_link

Retrieve a specific payment link from Visa Acceptance using its unique ID to access payment details and processing information.

Instructions

This tool will get a specific payment link from Visa Acceptance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPayment link ID (required)

Implementation Reference

  • The main handler function that executes the tool logic by calling the Cybersource PaymentLinksApi to retrieve a payment link by ID.
    export const getPaymentLink = async ( visaClient: any, context: VisaContext, params: z.infer<ReturnType<typeof getPaymentLinkParameters>> ) => { try { const paymentLinkApiInstance = new cybersourceRestApi.PaymentLinksApi(visaClient.configuration, visaClient.visaApiClient); const result = await new Promise((resolve, reject) => { paymentLinkApiInstance.getPaymentLink(params.id, (error: any, data: any) => { if (error) { reject(error); } else { resolve(data); } }); }); return result; } catch (error) { return 'Failed to get payment link'; } };
  • Zod schema defining the input parameters for the get_payment_link tool: requires 'id' string.
    export const getPaymentLinkParameters = ( context: VisaContext = {} as VisaContext ) => { return z.object({ id: z.string().describe('Payment link ID (required)') }); };
  • Tool object definition registering 'get_payment_link' with name, description, parameters, actions, and execute handler.
    const tool = (context: VisaContext): Tool => ({ method: 'get_payment_link', name: 'Get Payment Link', description: getPaymentLinkPrompt(context), parameters: getPaymentLinkParameters(context), actions: { paymentLinks: { read: true, }, }, execute: getPaymentLink, }); export default tool;
  • Aggregation function that includes the getPaymentLinkToolModule (imported at line 23) in the list of available tools.
    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) ]; }
  • Helper function providing the tool description/prompt.
    export const getPaymentLinkPrompt = (context: VisaContext = {} as VisaContext) => ` This tool will get a specific payment link from Visa Acceptance. `;

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