Skip to main content
Pump.fun provides webhook endpoints for livestream events. This guide shows you how to handle webhook callbacks for LiveKit and other streaming services.

LiveKit webhooks

LiveKit webhooks notify your application about livestream events such as room creation, participant joining/leaving, and recording status.

Webhook endpoint

The LiveKit webhook endpoint is:

Webhook authentication

Webhooks require proper authentication via the Authorization header:
Webhooks require valid JWT authentication. Ensure your webhook handler includes proper authorization headers when forwarding events.

Call webhooks

The general call webhook endpoint handles various streaming events:

Signature verification

This endpoint uses signature-based authentication via the x-signature header:
Always verify webhook signatures to ensure requests are authentic and haven’t been tampered with.

Setting up a webhook receiver

Create a webhook receiver server to handle incoming webhook events:
Python

Webhook event types

Common webhook event types you might receive:
  • room_started - A new room has been created
  • room_finished - A room has ended
  • participant_joined - A participant joined the room
  • participant_left - A participant left the room
  • recording_started - Recording started for a room
  • recording_finished - Recording finished for a room
  • track_published - A track was published
  • track_unpublished - A track was unpublished
  • call.started - A call has started
  • call.ended - A call has ended
  • call.participant_joined - A participant joined
  • call.participant_left - A participant left
  • call.recording_ready - Recording is ready for download

Forwarding webhooks

If you need to forward webhook events to Pump.fun from your streaming service:
Python

Best practices

1

Verify signatures

Always verify webhook signatures using HMAC to ensure authenticity and prevent tampering.
2

Return quickly

Process webhooks asynchronously. Respond with 200 status immediately and handle processing in background jobs.
3

Implement idempotency

Use event IDs to track processed webhooks and prevent duplicate processing.
4

Handle retries

Implement proper retry logic with exponential backoff for failed webhook deliveries.
5

Log events

Maintain detailed logs of webhook events for debugging and auditing purposes.
6

Secure your endpoint

Use HTTPS and validate all incoming requests to prevent unauthorized access.
Webhook endpoints should respond within 5 seconds. For long-running operations, use a message queue or background job processor.

Testing webhooks locally

Use tools like ngrok to expose your local webhook receiver:
This allows you to test webhook integration during development without deploying to a public server.