Theme

Guides

Webhooks

Webhooks allow you to receive HTTP callbacks when events occur in your Liveday account. Instead of polling the API, you configure a URL and Liveday will send a POST request to it whenever a subscribed event fires.

Setup

Webhooks are configured through the Integrations section of your Liveday dashboard. Create a new webhook integration, provide a URL, and select which events you want to subscribe to.

Events

EventDescription
OrderCompletedFired when an order is successfully completed

Delivery

When an event fires, Liveday sends an HTTP POST request to your configured URL with the event payload as JSON.

Headers

Every webhook request includes these headers:

HeaderDescription
Content-Typeapplication/json
X-Webhook-Delivery-IDUnique ID for this delivery (UUID)
X-Webhook-Event-TypeThe event type (e.g. OrderCompleted)
X-Webhook-AttemptAttempt number (starts at 1)

Example payload (OrderCompleted)

{
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "email": "anna@example.com",
  "phone_number": "+46701234567",
  "shipping": {
    "name": "Anna Svensson",
    "address": "Storgatan 1",
    "city": "Stockholm",
    "postal_code": "11122"
  },
  "billing": null,
  "terminal_id": null,
  "order_id": "ord_abc123",
  "transaction_id": "txn_xyz789",
  "payment_intent": "pi_stripe_123",
  "original_order_uuid": null,
  "is_refunded": false,
  "total_price": 59800,
  "payment_method": "card",
  "payment_method_brand": "visa",
  "split_payment_methods": null,
  "control_code": null,
  "control_server_id": null,
  "control_server_terminal_id": null,
  "live_sales_point_id": null,
  "live_sales_point_table": null,
  "live_sales_point_status": null,
  "cart": {
    "organization": "your-org-id",
    "event": "evt_summer2026",
    "currency": "SEK",
    "items": [
      {
        "product_type": "Ticket",
        "name": "General Admission",
        "quantity": 2,
        "price": 29900,
        "vat": 6.0,
        "event": "evt_summer2026",
        "event_name": "Summer Festival 2026",
        "section": "sec_ga",
        "section_name": "General Admission",
        "row": null,
        "seat": null,
        "item_id": "item_abc",
        "category": "ticket"
      }
    ],
    "total_price": 59800,
    "original_price": 69800,
    "campaigns": [
      {
        "uuid": "camp_earlybird",
        "name": "Early Bird",
        "code": "EARLY2026",
        "discount_amount": 10000
      }
    ]
  },
  "created_at": "2026-03-01T14:30:00Z",
  "order_number": 10042,
  "order_source": "webshop",
  "refund_reason": null,
  "refund_reason_comment": null,
  "settled_status": null
}

Responding

Your endpoint should return a 2xx status code to acknowledge receipt. Any other status code is treated as a failure and triggers a retry.

Respond quickly

Your endpoint should return a response within 30 seconds. If processing takes longer, acknowledge the webhook immediately and process it asynchronously.

Retries

Failed deliveries are retried with exponential backoff:

AttemptDelay
1Immediate
2~5 seconds
3~10 seconds
4~20 seconds
5~40 seconds
6~80 seconds (capped at 5 minutes)
  • Maximum 5 retry attempts per delivery
  • Backoff includes ±15% jitter to avoid thundering herds
  • After all retries are exhausted, the delivery is marked as PermanentlyFailed

Delivery statuses

StatusDescription
PendingQueued for delivery
InProgressCurrently being delivered
SuccessEndpoint returned 2xx
FailedAttempt failed, will retry
PermanentlyFailedAll retry attempts exhausted

Monitoring deliveries

You can monitor webhook delivery status through the API:

List deliveries

curl -G "https://api.liveday.se/webhooks/deliveries" \
  -H "Authorization: Bearer sk_your_api_key"

Get delivery details

curl "https://api.liveday.se/webhooks/deliveries/{delivery_uuid}" \
  -H "Authorization: Bearer sk_your_api_key"

Get delivery attempts

curl "https://api.liveday.se/webhooks/deliveries/{delivery_uuid}/attempts" \
  -H "Authorization: Bearer sk_your_api_key"

Each attempt record includes the HTTP status code, response body (truncated to 5000 characters), duration in milliseconds, and any error message.

Payload reference

OrderCompleted fields

FieldTypeDescription
uuidstringUnique order identifier
emailstring?Customer email
phone_numberstring?Customer phone number
shippingobject?Shipping address (name, address, city, postal_code)
billingobject?Billing address (same structure as shipping)
terminal_idstring?Physical terminal ID (POS orders)
order_idstring?External order reference
transaction_idstring?Payment transaction ID
payment_intentstring?Payment provider intent ID
original_order_uuidstring?Original order UUID (for refund orders)
is_refundedboolean?Whether the order has been refunded
total_priceintegerTotal price in smallest currency unit (e.g. öre)
payment_methodstring?Payment method (card, swish, invoice, etc.)
payment_method_brandstring?Card brand (visa, mastercard, etc.)
split_payment_methodsstring[]?Payment methods used in split payment
control_codestring?Fiscal control unit code
control_server_idstring?Control server identifier
control_server_terminal_idstring?Control server terminal ID
live_sales_point_idstring?Live sales point ID (restaurant/kiosk)
live_sales_point_tablestring?Table number
live_sales_point_statusstring?Order status at POS
cartobjectCart contents (see below)
created_atstring?ISO 8601 timestamp
order_numberinteger?Sequential order number
order_sourcestring?Order source (webshop, pos, app, etc.)
refund_reasonstring?Reason for refund
refund_reason_commentstring?Additional refund comment
settled_statusstring?Payment settlement status

Cart object

FieldTypeDescription
organizationstring?Organization ID
eventstring?Event ID
currencystring?ISO 4217 currency code
itemsarrayCart items (see below)
total_priceinteger?Cart total in smallest currency unit
original_priceinteger?Price before discounts
campaignsarray?Applied campaigns

Cart item object

FieldTypeDescription
product_typestring?Ticket, Item, Membership, Restaurant, Kiosk, Fee, Package, Form, GenericItem
namestring?Product name
quantityinteger?Quantity
priceinteger?Unit price in smallest currency unit
vatnumber?VAT percentage
eventstring?Event ID
event_namestring?Event name
sectionstring?Section ID
section_namestring?Section name
rowinteger?Row number (seated tickets)
seatinteger?Seat number (seated tickets)
item_idstring?Item identifier
categorystring?Product category

Campaign object

FieldTypeDescription
uuidstring?Campaign ID
namestring?Campaign name
codestring?Discount code used
discount_amountinteger?Discount in smallest currency unit

Best practices

  • Verify the event type — check the X-Webhook-Event-Type header before processing
  • Use the delivery ID for idempotency — the X-Webhook-Delivery-ID header uniquely identifies each delivery; use it to avoid processing duplicates
  • Return 2xx quickly — acknowledge receipt immediately and process asynchronously if needed
  • Handle retries gracefully — your endpoint may receive the same event multiple times if a previous acknowledgement was lost
Previous
Explorer