Skip to main content
POST
/
api
/
webhooks
/
drop

Endpoint

POST /api/webhooks/drop

Overview

Receives and processes Polar webhooks for DROP service subscriptions. Updates user entitlements based on subscription events.

Security

Webhook secret: DROP_POLAR_SECRET environment variable

Implementation

export const POST = Webhooks({
  webhookSecret: process.env.DROP_POLAR_SECRET!,
  onPayload: async (payload) => {
    await handlePolarWebhook(payload, 'DROP')
  },
})

Supported Events

See Webhooks Overview for complete list of supported events.

Service-Specific Behavior

When processing DROP webhooks:
  • Updates UserServiceEntitlement with service: 'DROP'
  • Links Polar customer and subscription IDs
  • Updates tier and premium status
  • Sends Discord notifications (if configured)

Configuration

Set DROP_POLAR_SECRET in environment variables to match Polar webhook secret.