Skip to main content
Glama

whmcs_cancel_order

Cancel WHMCS orders by order ID, optionally terminating subscriptions and suppressing email notifications.

Instructions

Cancel an order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderidYesOrder ID
cancelsubNoCancel subscription
noemailNoDo not send email

Implementation Reference

  • Core handler method in WhmcsApiClient that performs the WHMCS API call to CancelOrder action with provided parameters.
    /** * Cancel an order */ async cancelOrder(params: { orderid: number; cancelsub?: boolean; noemail?: boolean; }) { return this.call<WhmcsApiResponse>('CancelOrder', params); }
  • src/index.ts:797-813 (registration)
    Tool registration in MCP server, including schema definition and thin wrapper handler that delegates to WhmcsApiClient.cancelOrder
    'whmcs_cancel_order', { title: 'Cancel Order', description: 'Cancel an order', inputSchema: { orderid: z.number().describe('Order ID'), cancelsub: z.boolean().optional().describe('Cancel subscription'), noemail: z.boolean().optional().describe('Do not send email'), }, }, async (params) => { const result = await whmcsClient.cancelOrder(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Zod input schema validation for the whmcs_cancel_order tool parameters.
    inputSchema: { orderid: z.number().describe('Order ID'), cancelsub: z.boolean().optional().describe('Cancel subscription'), noemail: z.boolean().optional().describe('Do not send email'), },

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/scarecr0w12/whmcs-mcp-server'

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