Purchases
{
"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.
There are two types of purchase payloads that are sent:
- Data Sharing - sent if the webhook consumer qualifies for data sharing
- No Data Sharing - sent if the webhook consumer does not qualify for data sharing
No data sharing payloads are sent, for example, for mall merchants with locations that have not yet opted into data sharing.
Payload Description
The ID of the purchase record in Thanx
User information
Merchant information
Location information
Time the purchase was made in ISO8601-format
The purchase amount
The order information, if this purchase reflects an online order
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
{
"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"]
}
}