Access a direct feed of your support payments with WebSockets.
Our WebSockets feed is currently in Beta and subject to changes. We do our best to make backwards compatible changes. If you have questions or feedback, please come chat with us in our Discord.
WebSockets give creators a direct feed of the support payments that are left on their pages. Once a Support Payment is processed, a simple payload is pushed to your WebSocket connection so you can handle it in real-time.
You can get an API key under API Keys on your dashboard.We recommend creating a new API key for each integration or service you use. This way, you can easily revoke access to a specific service without affecting others.
API keys are private and should never be made public.
With WebSockets, events are only sent/received when a connection is open. We only send events once to all open WebSocket connections after the payment is received.To ensure you receive the events, there are several ways to make sure your connection stays alive:
Implement retry and reconnect mechanisms in your client.
Send a simple ping message every 60 seconds to keep the connection alive. The server should respond with pong.
You can test receiving events by sending an echo message to an open WebSocket connection. The server will respond by sending the payload of the message back.Below is an example of an echo message that can be sent to test receiving a campaigntip.notify event.
This example is formatted but should be sent as a string. It can be pasted in websocketking.com but would be surrounded in quotes in code.