@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Function processWebhookEvent

    • Process a webhook event by calling the appropriate handler

      Parameters

      Returns Promise<void>

      Promise that resolves when handler completes

      await processWebhookEvent(event, {
      signatureKey: process.env.SQUARE_WEBHOOK_KEY!,
      handlers: {
      'payment.created': async (event) => {
      console.log('Payment created:', event.data.id);
      },
      },
      });