Skip to main content
Glama

register_webhook

Register HTTPS webhook URLs to receive real-time notifications for payment events like invoice_paid, payment_completed, and balance_changed from a Bitcoin Lightning wallet.

Instructions

Register a webhook URL to receive payment notifications. Max 5 webhooks per agent. REQUIRES AGENT KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesHTTPS webhook URL to receive events
eventsNoEvent types to subscribe to

Implementation Reference

  • Handler method to register a webhook with the Lightning Faucet API.
    async registerWebhook(
      url: string,
      events: string[] = ['invoice_paid']
    ): Promise<{
      webhookId: number;
      url: string;
      events: string[];
      secret: string;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        webhook_id?: number;
        url?: string;
        events?: string[];
        secret?: string;
      }>('register_webhook', { url, events });
    
      return {
        webhookId: result.webhook_id || 0,
        url: result.url || url,
        events: result.events || events,
        secret: result.secret || '',
        rawResponse: result,
      };
    }

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/lightningfaucet/lightning-wallet-mcp'

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