Skip to main content
Glama

create_buyer

Create a new buyer identity in Finix by providing email, first name, last name, and phone number to establish payment processing profiles.

Instructions

This tool creates a new Buyer Identity in Finix.

It takes the following arguments:

  • email (str): The email address of the buyer.

  • first_name (str): The first name.

  • last_name (str): The last name.

  • phone (str): The phone number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesThe email address of the buyer
first_nameYesThe first name
last_nameYesThe last name
phoneYesThe phone number

Implementation Reference

  • The main handler function that implements the create_buyer tool. It validates credentials, constructs the buyer payload, posts to Finix /identities endpoint, and returns the new identity ID.
    const createBuyer = async (client: FinixClient, _context: FinixContext, params: any): Promise<any> => { try { if (!client.hasCredentials()) { throw new Error('Finix username and password are required for this operation. Please configure FINIX_USERNAME and FINIX_PASSWORD in your environment.'); } const { email, first_name, last_name, phone } = params; const payload = { entity: { email, first_name, last_name, phone }, type: 'PERSONAL', identity_roles: ['BUYER'] }; const response = await client.post('/identities', payload); if (response.error) { throw new Error(`Error creating buyer: ${response.error.message}`); } // Return just the ID like Stripe MCP return { id: response.data.id }; } catch (error) { throw error; } };
  • Zod schema defining the input parameters for the create_buyer tool: email, first_name, last_name, phone.
    const createBuyerParameters = () => z.object({ email: z.string().email().describe('The email address of the buyer'), first_name: z.string().describe('The first name'), last_name: z.string().describe('The last name'), phone: z.string().describe('The phone number') });
  • Tool factory registration defining the 'create_buyer' method, its description, parameters, annotations, and linking to the execute handler.
    const tool: ToolFactory = () => ({ method: 'create_buyer', name: 'Create Buyer', description: createBuyerPrompt(), parameters: createBuyerParameters(), annotations: createBuyerAnnotations(), actions: { identities: { create: true } }, execute: createBuyer });
  • Central registry where the createBuyer tool is included in the allTools array for export.
    export const allTools: ToolFactory[] = [ // Search & Documentation searchDocs, // Identities (Buyers/Sellers) createBuyer, createSeller, listBuyers, listSellers, // Payment Links createPaymentLink, ];

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/bquigley1/finix-mcp'

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