Must have
customer_transactions
When it fires
This event is triggered when new transactions are detected inside the programme. This webhook pushes several transactions at a time, in an array. It is specific to mall programmes.
Payload fields
| Field | Type | Description |
|---|---|---|
event | String | The name of the webhook event. |
transactions[] | Array | The transactions pushed by this call. |
transactions[].id | uuid | The id of the transaction. |
transactions[].amount | Float | The amount of the transaction. |
transactions[].purchaseDate | String | The date of the transaction. |
transactions[].dateBankingStatement | String, nullable | The date of the banking statement. Null for non-bank transactions or if not provided by the bank. |
transactions[].customerId | String | Spaycial's member id. |
transactions[].customerExternalId | String | Your member id. |
transactions[].purchaseLocation.id | String | Spaycial's id of the purchase location. |
transactions[].purchaseLocation.externalId | String | Your external id of the purchase location. |
transactions[].purchaseLocation.type | String | The purchase location type: service or store. |
transactions[].dataProviderType | String | The origin of the transaction: bank for an open banking transaction, restaurant for restaurant card providers, scan for receipt scan, support. |
transactions[].currency | String | The currency of the transaction, three-letter format (for example EUR). |
transactions[].timeOfPurchase | String | The date and time of the transaction. Only provided when dataProviderType is scan, meaning for transactions coming from the receipt scan feature. |
transactions[].receiptId | String | The receipt id linked to this transaction. |
shoppingHubId | String | Programme id (Spaycial). |
shoppingHubExternalId | String | Programme id in your system. |
Example
{
"event": "customer_transactions",
"transactions": [
{
"id": "c84c33cf-62c6-4a44-8692-973cc0cc420c",
"amount": -10.53,
"currency": "EUR",
"purchaseDate": "2023-01-12",
"dateBankingStatement": "2023-01-15",
"customerId": "8148b7f5-fcd4-4818-aefa-5450e7dd5dad",
"customerExternalId": "87316292",
"purchaseLocation": {
"id": "6a6a578b-662b-4673-8885-e00902a34dd4",
"externalId": "18289377",
"type": "store"
},
"dataProviderType": "bank",
"receiptId": null,
"timeOfPurchase": null
},
{
"id": "e1f5316f-877a-4ea3-92ce-63b99c8a5aae",
"amount": -24.17,
"currency": "EUR",
"purchaseDate": "2023-01-15",
"dateBankingStatement": null,
"customerId": "8148b7f5-fcd4-4818-aefa-5450e7dd5dad",
"customerExternalId": "87316292",
"purchaseLocation": {
"id": "f4de5a19-5a36-4227-a2ac-a543a1902964",
"externalId": "18289514",
"type": "store"
},
"dataProviderType": "scan",
"receiptId": "9bb59173-5510-4b11-a783-71c83c3b6564",
"timeOfPurchase": "2023-01-15 13:09:00.000000 +00:00"
}
],
"shoppingHubId": "f24b4d97-8d70-4133-b685-732c69b87884",
"shoppingHubExternalId": "654564561"
}