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 transaction 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: retrieves a specific payment link by ID using the CyberSource REST API PaymentLinksApi.
    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 tool: a required string 'id' for the payment link ID.
    export const getPaymentLinkParameters = ( context: VisaContext = {} as VisaContext ) => { return z.object({ id: z.string().describe('Payment link ID (required)') }); };
  • Tool registration object definition, exporting a function that returns the Tool config with method 'get_payment_link', linking to schema, description, and 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;
  • Inclusion of the get_payment_link tool in the central createTools function that aggregates all tools.
    getPaymentLinkToolModule(context),
  • Import of the getPaymentLink tool module for registration in the tools list.
    import getPaymentLinkToolModule from './paymentLinks/getPaymentLink';

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