Reference

Events

The events Uncart sends to your webhook endpoint, with their payloads. Webhooks says how to check that a delivery came from Uncart.

discount_pool.low

Your discount pool is low

Sent once per low spell: when adding codes, or Uncart giving one, leaves the codes Uncart may still give in your pool (each mode its own) at its low mark or below (low_at of GET /discount-codes). Sent again only after you added codes and the pool fell low again. Add codes with POST /discount-codes.

FieldTypeRequiredWhat it is
idstringRequiredThe event's id: the same in every try of its delivery. Drop an event whose id you have handled.
typestringRequired
createdintegerRequiredWhen it happened, in whole seconds since 1970 (Unix time).
modestring: "live", "test"RequiredLive data, or test data (free, never billed, never sent to a shopper). A key's mode decides it.
dataobjectRequired
data.availableintegerRequiredCodes Uncart may still give.
JSONPayload
{
  "id": "evt_ExampleEvent000000000004",
  "type": "discount_pool.low",
  "created": 1793091600,
  "mode": "live",
  "data": {
    "available": 20
  }
}

go_live.changed

Your shop's go-live changed

Sent when where your shop stands with the go-live changes: the round trip passed (POST /v1/test-links), sending paused by itself because your order reports stopped or fell far below the taps on your links, or an order report lifted that pause. state is where it stands now: live (it sends), paused (it sends nothing Uncart starts; reason says why), or billing_lapsed (the pause was lifted, but your shop's payment method is gone: add one on the dashboard). Once per change, to your live endpoint only.

FieldTypeRequiredWhat it is
idstringRequiredThe event's id: the same in every try of its delivery. Drop an event whose id you have handled.
typestringRequired
createdintegerRequiredWhen it happened, in whole seconds since 1970 (Unix time).
modestring: "live", "test"RequiredLive data, or test data (free, never billed, never sent to a shopper). A key's mode decides it.
dataobjectRequired
data.statestring: "live", "paused", "billing_lapsed"RequiredWhere your shop stands now: live, paused (sending paused by itself; see reason) or billing_lapsed (no payment method: add one on the dashboard).
data.reasonstring: "reports_stopped", "reports_below_taps"OptionalOnly with paused: reports_stopped (no order reported for 7 days while your links were tapped; your next order report lifts it) or reports_below_taps (orders on your Uncart links far below their taps; the next order that names an Uncart link lifts it). A new round trip lifts either.
JSONPayload
{
  "id": "evt_ExampleEvent000000000004",
  "type": "go_live.changed",
  "created": 1793696400,
  "mode": "live",
  "data": {
    "reason": "reports_stopped",
    "state": "paused"
  }
}

order.matched

An order is billed on an Uncart link

Sent when an order you reported (POST /orders) is billed on a tap on one of your Uncart links: the link's click id came back with it, or it closed the cart the link's message was about. Once per order.

FieldTypeRequiredWhat it is
idstringRequiredThe event's id: the same in every try of its delivery. Drop an event whose id you have handled.
typestringRequired
createdintegerRequiredWhen it happened, in whole seconds since 1970 (Unix time).
modestring: "live", "test"RequiredLive data, or test data (free, never billed, never sent to a shopper). A key's mode decides it.
dataobjectRequired
data.order_idstringRequiredYour own id of the order: 1 to 64 letters, digits, ., _, : and -, once per shop and mode.
data.link_kindstringRequiredWhich message the tapped link was in: reminder, requested_link, assistant, order_update or alert.
data.matched_bystringRequiredHow the order named the link: link_token (its click id) or checkout_token (the cart it names).
JSONPayload
{
  "id": "evt_ExampleEvent000000000002",
  "type": "order.matched",
  "created": 1793093400,
  "mode": "live",
  "data": {
    "link_kind": "reminder",
    "matched_by": "link_token",
    "order_id": "order-1001"
  }
}

refund.recorded

A refund is taken off a billed order

Sent when a refund or cancellation you reported (POST /orders/{order_id}/refunds) is taken off an order Uncart billed. Once per refund id.

FieldTypeRequiredWhat it is
idstringRequiredThe event's id: the same in every try of its delivery. Drop an event whose id you have handled.
typestringRequired
createdintegerRequiredWhen it happened, in whole seconds since 1970 (Unix time).
modestring: "live", "test"RequiredLive data, or test data (free, never billed, never sent to a shopper). A key's mode decides it.
dataobjectRequired
data.order_idstringRequiredYour own id of the order: 1 to 64 letters, digits, ., _, : and -, once per shop and mode.
data.refund_idstringRequiredYour own id of the refund (for a cancellation, any id of yours, such as cancelled): once per order. The same id again is the same refund.
data.kindstring: "refund", "cancellation"Required
JSONPayload
{
  "id": "evt_ExampleEvent000000000003",
  "type": "refund.recorded",
  "created": 1793178000,
  "mode": "live",
  "data": {
    "kind": "refund",
    "order_id": "order-1001",
    "refund_id": "refund-1"
  }
}

webhook.test

A test event

Sent when you ask for one (POST /webhook-endpoint/test).

FieldTypeRequiredWhat it is
idstringRequiredThe event's id: the same in every try of its delivery. Drop an event whose id you have handled.
typestringRequired
createdintegerRequiredWhen it happened, in whole seconds since 1970 (Unix time).
modestring: "live", "test"RequiredLive data, or test data (free, never billed, never sent to a shopper). A key's mode decides it.
dataobjectRequired
JSONPayload
{
  "id": "evt_ExampleEvent000000000001",
  "type": "webhook.test",
  "created": 1793091600,
  "mode": "test",
  "data": {}
}