Skip to content
Pandus
Pandus SDK documentation

Server events

Send purchases, refunds and other backend events to the Pandus SDK over the REST API: endpoint, token, payload, limits and how to join them to a visit.

Updated:

Orders, refunds and other events that happen on your backend can go to Pandus from your server, like the GA4 Measurement Protocol. A blocker in the browser cannot lose them.

Endpoint

POST https://pandus.online/api/v1/sites/{site}/events
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

Create the token in API and webhooks. Use a token with write, or one made only for this: “Only sends events from your server”. The full reference is in the API documentation.

Payload

{
  "events": [
    {
      "name": "purchase",
      "client_id": "k3j9x0a1b2c3d4e5f6g7",
      "page": "/checkout/thank-you",
      "params": {
        "transaction_id": "A-1042",
        "value": 89.9,
        "currency": "EUR",
        "items": [{ "item_id": "kettle-1", "item_name": "Kettle", "price": 89.9, "quantity": 1 }]
      }
    }
  ]
}
Field Notes
name Required, the same rules as in the browser
params Up to 25 parameters; items for e-commerce
client_id From the _pandus_id cookie, when the visitor agreed: joins the event to their visit
session_id Optional
user_id Only as a SHA-256 hash
timestamp_ms Optional; within the last 72 hours, otherwise the time of arrival
page A path or a URL of your site

Up to 25 events a request. The answer is 202 with the number of accepted events; they show in reports within a minute. Values that look like an e-mail, a phone or a card number are dropped. Server events count against the plan's monthly events.

Example with curl

curl -X POST https://pandus.online/api/v1/sites/SITE_ID/events \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"events":[{"name":"refund","params":{"transaction_id":"A-1042","value":89.9,"currency":"EUR"}}]}'

Send client_id only for visitors who agreed to analytics; without it the event is counted without being joined to a visit.

Reading the numbers

The analytics reports are available through GET /api/v1/sites/{site}/analytics/{report}: see Analytics.

The Pandus SDK and the scanner are automated checks, not a full audit, and not legal advice. The SDK changes nothing on your site and does not determine which visitors use assistive technology.