Custom webhook

Your own store, recorded like any other

Sell through your own website or backend? Analyse gives your game an endpoint and a signing secret. Post signed JSON events to it and they count exactly like purchases from a store integration.

What Custom webhook does for you

Orders with line items

Send order.completed with up to 100 items, each with its own amount and discount in minor units. Every item is recorded as its own purchase.

Refunds, chargebacks, subscriptions

Send the order again as order.refunded or order.chargeback with only the items it covers, so partial refunds stay exact. subscription.updated tracks starts, changes and endings.

HMAC-SHA256 signatures

Each request carries a signature over the timestamp and the raw body. Requests signed more than 5 minutes off are rejected, so a captured request cannot be replayed.

Test without recording

A test event checks the URL and signature and records nothing. The setup dialog's delivery log shows every request with its status and error.

Minecraft and Roblox

Identify the buyer by Minecraft UUID or Roblox user id. Orders can carry a coupon and a creator code, which is matched to a campaign.

Safe to retry

Every event has your own id. Sending the same id again is acknowledged as a duplicate and not recorded twice, so you can retry on errors without double counting.

How you'd use it

A web shop for Roblox merch codes

The situation

You sell redeemable bundles for your Roblox experience on your own website, outside Robux.

With Analyse

Your backend sends each order with the buyer's Roblox user id, so those sales show on the player's profile and in revenue next to their Robux purchases.

A partial refund on a bundle

The situation

A player buys a rank and three crate keys from your own Minecraft store, then asks for the keys to be refunded.

With Analyse

You send order.refunded with only the crate key line, so the rank still counts as revenue and the keys come off.

Membership billing from your own system

The situation

You bill a monthly supporter tier through your own payment provider.

With Analyse

Each change is sent as subscription.updated and each renewal as its own order.completed, so subscriptions and their revenue are both tracked.

Set it up

  1. 1

    Create the endpoint

    In your game's Settings, Integration, choose Connect, pick Custom store and create the endpoint. Copy the URL and the secret, which is shown once.

  2. 2

    Sign each request

    Add an X-Analyse-Signature header with the time in milliseconds and a hex HMAC-SHA256 of the time and raw body. The docs have examples for Node.js, Python and the shell.

  3. 3

    Send a test event

    Post an event with type test. The setup dialog confirms it arrived and shows any signature or payload error.

  4. 4

    Send real orders

    Post orders, refunds, chargebacks and subscription changes as they happen. Retry on server errors with the same event id.

Questions

How do I send purchases from my own store to Analyse?

Create a custom store endpoint for the game, then POST one JSON event per request, signed with HMAC-SHA256 using the secret. Orders, refunds, chargebacks and subscription updates are supported.

What happens if my webhook request fails?

Errors come back with a message. Retry on a 500 or a network error with the same event id. A 401, 404 or 422 will fail again until you change the request.

Does the custom webhook work for Roblox games?

Yes. Custom webhooks work for Minecraft and Roblox. For Robux purchases made in game, the Roblox module records them itself.

Can I use one custom endpoint for several games?

No. A custom webhook connects to one game at a time. Create an endpoint for each game that sells through your store.

What if I lose the signing secret?

Choose New secret from the store menu. The old secret stops working immediately, so update your server at the same time.

Connect one game and see it for yourself.

Free to start, 14 days of Pro, and about four minutes of setup.