Webhooks
Go to Webhook in your dashboard.
Important: All activity will trigger your webhook - not only successful payments. Pick and choose from activity arriving at your webhook URL by looking at each webhook body’s v2.event.type key.
v2.event.type keys
-
SESSION_CART_PAY: successful payment -
SESSION_READ: sticker tap or QR code scan
Webhook URLs can be updated instantly; there is no delay for activity to arrive at a new URL.
Set up a free ngrok tunnel to test your webhook URL.
In the webhook body you will see keys in addition to the v2 key. Use keys under the v2 key only. Other keys are deprecated and are being removed.
Why isn’t my webhook arriving?
-
Are you using a HTTPS URL? URLs that start with
http://are not allowed -
Have you set the Method to
POSTif you are expecting a HTTPPOSTrequest? -
Are you using a strange self-signed certificate that node.js would reject out of the box?
-
Are you using a URL accessible over the public internet?
localhost, URLs behind a VPN or inside a corporate network will not work
Example body: Payment
{
"v2": {
"event": {
"type": "SESSION_CART_PAY",
"id": "[UUID]",
"customData": {
"total": 360,
"discount": 0,
"tip": 0,
"currency": "GBP",
"gateway": "GATEWAY_NOOP",
"cart": []
}
},
"payment": {
"id": "[UUID]",
"sessionId": "[UUID]",
"userId": "[UUID]",
"applicationId": "[UUID]",
"thingId": "[UUID]",
"lastFederatedUserId": null,
"originPaymentIdsDelete": [],
"originPaymentIdsPay": [],
"sessionPaidAt": 1707381745,
"refundedAt": null,
"refundedTotal": 0,
"currency": "GBP",
"total": 360,
"discount": 0,
"tip": 0,
"newStatusDone": false,
"newMaster": false,
"gateway": "GATEWAY_NOOP",
"stickypayMerchantPercentage": 100,
"stickypayPerTx": 0,
"stickypayPerTxCurrency": "GBP",
"stickypayIsCorporate": false,
"paymentGatewayId": null,
"paymentGatewayExtra": null,
"customDataPublic": "{}",
"tags": [],
"name": "Ada",
"companyName": null,
"email": "dev@sticky.to",
"phone": null,
"address": null,
"collectionTime": "10:45",
"extra": "---",
"userPrivateKey": null
},
"flow": {
"id": "[UUID]",
"userId": "[UUID]",
"name": "Food and drink",
"stickypayMerchantPercentage": 100,
"stickypayPerTx": 0,
"stickypayPerTxCurrency": "GBP",
"gateway": "GATEWAY_STICKYPAY",
"country": "GBR",
"tags": []
},
"sticky": {
"id": "[UUID]",
"userId": "[UUID]",
"designId": "v3-sticky",
"name": "Room 15",
"applicationId": "[UUID]",
"productId": "[UUID]",
"federatedUserIds": [],
"isKidSafe": false,
"tags": []
},
"session": {
"id": "[UUID]",
"crossUserSector": {
"name": "Ada",
"email": "dev@sticky.to"
},
"userSector": {},
"applicationSector": {
"paymentId": "[UUID]"
}
}
}
}Example body: Sticker tap
{
"v2": {
"event": {
"type": "SESSION_READ",
"id": "[UUID]",
"customData": {}
},
"flow": {
"id": "[UUID]",
"userId": "[UUID]",
"name": "Food and drink",
"stickypayMerchantPercentage": 100,
"stickypayPerTx": 0,
"stickypayPerTxCurrency": "GBP",
"gateway": "GATEWAY_STICKYPAY",
"country": "GBR",
"tags": []
},
"sticky": {
"id": "[UUID]",
"userId": "[UUID]",
"designId": "v3-sticky",
"name": "Room 15",
"applicationId": "[UUID]",
"productId": "[UUID]",
"federatedUserIds": [],
"isKidSafe": false,
"tags": []
},
"session": {
"id": "[UUID]",
"crossUserSector": {},
"userSector": {},
"applicationSector": {}
}
}
}