Skip to main content
Webhooks tell your server when something happens to your game on Gamavas, so you don’t have to poll. Each event’s exact fields are in the API reference, under Webhooks.

Add an endpoint

On your app’s Webhooks page in the developer portal, add your server’s public https:// address and pick the events it wants. You get a signing secret (whsec_…). An app can have up to 5 endpoints. Press Send test event to check it works.

What Gamavas sends

A POST with a JSON body:
livemode is false for test purchases and test events. The headers include Gamavas-Event, Gamavas-Event-Id and Gamavas-Signature.

Verify the signature

Check every request before trusting it, using the raw body:
The header is t=<unix seconds>,v1=<signature>, where the signature is the hex HMAC-SHA256 of <t>.<raw body> with your signing secret. Refuse requests more than 5 minutes old, and compare in constant time.

Answer quickly, and expect retries

Answer any 2xx within 10 seconds. Do slow work afterwards. If your server fails or times out, Gamavas retries after 1 minute, 5 minutes, 30 minutes, then 2, 6 and 12 hours: about a day in all. The event id stays the same on every retry, so skip IDs you’ve already handled. The Webhooks page shows every delivery, with its status and your server’s answer, and you can resend any of them.
Rotate the signing secret from the Webhooks page if it leaks. Your old secret stops working at once.