{
  "purchase": {
    "id": "92b7b0dac4",
    "user": {
      "id": "weori235",
      "email": "bob@bob.com",
      "first_name": "Bob",
      "last_name": "McBob"
    },
    "merchant": {
      "id": "9a1f0772c9ac",
      "name": "Pizza Shack"
    },
    "location": {
      "id": "e7183da044",
      "name": "Pizza Shack 12",
      "street": "123 Pizza Lane",
      "city": "Smalltown",
      "state": "CA",
      "zip": "12345",
      "time_zone": "America/New_York",
      "latitude": "37.76271750294678",
      "longitude": "-122.42438230349147"
    },
    "purchased_at": "2020-01-01T20:00:00Z",
    "amount": 9.99,
    "order": {
      "id": "RTF234S",
      "provider": "OLO"
    },
    "products": ["Snickers", "Twix"]
  }
}

These webhooks are sent anytime Thanx detects a qualifying user purchase.

Payload Description

id
string

The ID of the purchase record in Thanx

user
hash

User information

merchant
hash

Merchant information

location
hash

Location information

purchased_at
string

Time the purchase was made in ISO8601-format

amount
decimal

The purchase amount

order
hash

The order information, if this purchase reflects an online order

products
array(string)

By default, these webhooks are sent 10 minutes after a purchase record is initially captured by the Thanx platform (usually initially from the credit card networks or ordering providers). Due to the nature of how Thanx collects item-level data, this data may not always be captured by Thanx by the time this webhook is sent out. If the purchase is digital (placed via Thanx-managed ordering experiences), this attribute will be populated. If the purchase is an in-store purchase, this attribute may not be populated depending on how quickly the webhook is configured to send.

This data can be collected by working with the Thanx team to adjust the webhook latency, send an additional webhook at the time of item matching, or looked up via other mechanisms.

The list of products the user bought