Skip to main content
Glama

get_payment_channels

Retrieve available payment channels for processing transactions through the Bayarcash MCP Server, with optional filtering by portal key.

Instructions

Get list of available payment channels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portal_keyNoOptional portal key to filter channels

Implementation Reference

  • MCP tool handler for get_payment_channels: validates optional portal_key and delegates to bayarcash.getChannels()
    case 'get_payment_channels': { // Validate input const validation = validateInput(portalKeySchema, args); if (!validation.success) { throw new McpError(ErrorCode.InvalidParams, `Validation error: ${validation.error}`); } const result = await bayarcash.getChannels(validation.data.portal_key); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • src/index.ts:189-201 (registration)
    Registration of get_payment_channels tool in ListToolsRequestHandler, defining name, description, and input schema
    { name: 'get_payment_channels', description: 'Get list of available payment channels', inputSchema: { type: 'object', properties: { portal_key: { type: 'string', description: 'Optional portal key to filter channels' } } } },
  • Core helper method getChannels() that returns a hardcoded list of available payment channels (portal_key parameter is unused)
    async getChannels(portalKey?: string): Promise<PaymentChannel[]> { // Return hardcoded payment channels return [ { id: '1', name: 'FPX', code: 'fpx' }, { id: '2', name: 'DuitNow', code: 'duitnow' }, { id: '3', name: 'Boost', code: 'boost' }, { id: '4', name: 'GrabPay', code: 'grabpay' }, { id: '5', name: 'Touch n Go', code: 'tng' }, { id: '6', name: 'ShopeePay', code: 'shopeepay' }, { id: '7', name: 'SPayLater', code: 'spaylater' }, { id: '8', name: 'Boost PayFlex', code: 'boostpayflex' }, { id: '9', name: 'QRIS', code: 'qris' }, { id: '10', name: 'NETS', code: 'nets' } ]; }
  • Zod schema for validating the input to get_payment_channels tool (optional portal_key)
    // Portal key schema export const portalKeySchema = z.object({ portal_key: z.string().optional() });

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/webimpianteam/bayarcash-mcp-server'

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