post https://example.com/EVENTS.VOUCHER.LOYALTY_CARD.TRANSACTION.CREATED
EVENT: "EVENTS.VOUCHER.LOYALTY_CARD.TRANSACTION.CREATED"
HTTP method: POST
HTTP method: POST
The EVENTS.VOUCHER.LOYALTY_CARD.TRANSACTION.CREATED
event indicates that a transaction has been created for a loyalty card.
The following transaction types trigger the event:
POINTS_ACCRUAL
POINTS_REDEMPTION
POINTS_REFUND
POINTS_ADDITION
POINTS_REMOVAL
POINTS_EXPIRATION
POINTS_TRANSFER_IN
POINTS_TRANSFER_OUT
Webhook documentation
This page documents only the event. If you need more details about the webhook payload data that includes this event, go to Webhook v2024-01-01 page.
Example: voucher.loyalty card.transaction.created
{
"transaction": {
"id": "vtx_0f1ad36b8992670da4",
"source_id": null,
"voucher_id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
"campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"source": "Automation",
"reason": null,
"type": "POINTS_ACCRUAL",
"details": {
"balance": {
"type": "loyalty_card",
"total": 210,
"object": "balance",
"points": 10,
"balance": 210,
"related_object": {
"id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
"type": "voucher"
}
},
"order": {
"id": "ord_0f1ad36a828d1c7c5f",
"source_id": null
},
"event": {
"id": "evcus_0f1ad36a884d1c7c69",
"type": "customer.order.paid"
},
"earning_rule": {
"id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
"source": {
"banner": "Basic points"
}
}
},
"related_transaction_id": null,
"created_at": "2024-07-24T10:51:30.608Z"
},
"voucher": {
"id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
"code": "8KBUE0M6",
"campaign": "new loyalty test",
"campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"category": null,
"category_id": null,
"categories": [],
"type": "LOYALTY_CARD",
"discount": null,
"gift": null,
"loyalty_card": {
"points": 210,
"balance": 210,
"next_expiration_date": "2025-07-24",
"next_expiration_points": 110
},
"start_date": null,
"expiration_date": null,
"validity_timeframe": null,
"validity_hours": null,
"validity_day_of_week": null,
"active": true,
"additional_info": null,
"metadata": {},
"assets": {
"qr": {
"id": "8c63e9eb-576f-4cc8-91df-b6797b6de8c6",
"url": "{{voucher_qr_code.url}}"
},
"barcode": {
"id": "a713187b-792f-47b6-993c-c83bd340ffd9",
"url": "{{voucher_barcode.url}}"
}
},
"is_referral_code": false,
"created_at": "2024-07-24T09:48:32.358Z",
"updated_at": "2024-07-24T10:51:30.608Z",
"holder_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
"redemption": {
"quantity": null,
"redeemed_quantity": 0,
"redeemed_points": 0,
"object": "list",
"url": "/v1/vouchers/8KBUE0M6/redemptions?page=1&limit=10"
},
"publish": {
"object": "list",
"count": 1,
"url": "/v1/vouchers/8KBUE0M6/publications?page=1&limit=10"
},
"object": "voucher"
},
"campaign": {
"id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"name": "new loyalty test",
"campaign_type": "LOYALTY_PROGRAM",
"type": "AUTO_UPDATE",
"is_referral_code": false,
"voucher": {
"type": "LOYALTY_CARD",
"discount": null,
"gift": null,
"loyalty_card": {
"points": 0,
"expiration_rules": {
"period_type": "MONTH",
"period_value": 12
}
},
"redemption": {
"quantity": null,
"redeemed_quantity": 0
},
"code_config": {
"pattern": "########",
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"prefix": "",
"postfix": ""
}
},
"auto_join": false,
"join_once": true,
"active": true,
"category_id": null,
"category": null,
"metadata": {},
"start_date": null,
"expiration_date": null,
"description": null,
"created_at": "2024-07-24T09:48:31.790Z",
"updated_at": "2024-07-24T10:48:29.156Z",
"object": "campaign"
},
"holder": {
"id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
"name": "John Demo",
"email": null,
"source_id": "230724-01",
"metadata": {},
"object": "customer"
},
"holder_loyalty_tier": {
"id": "ltr_0f1ac501ef53236abb",
"name": "Basic",
"campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"metadata": {},
"created_at": "2024-07-24T09:48:32.573Z",
"updated_at": null,
"earning_rules": {},
"rewards": {},
"config": {
"points": {
"from": 0,
"to": 499
}
},
"points": {
"from": 0,
"to": 499
},
"expiration": {
"customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
"campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"tier_id": "ltr_0f1ac501ef53236abb",
"start_date": "2024-07-24",
"created_at": "2024-07-24T09:52:21.616Z"
},
"object": "loyalty_tier"
},
"balance": {
"points": 10,
"total": 210,
"balance": 210,
"type": "loyalty_card",
"object": "balance",
"related_object": {
"type": "voucher",
"id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY"
}
},
"order": {
"id": "ord_0f1ad36a828d1c7c5f",
"source_id": null,
"status": "PAID",
"customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
"referrer_id": null,
"amount": 1000,
"total_amount": 1000,
"items": [
{
"id": "ordli_0f1ad36a820d1c7c5e",
"object": "order_item",
"source_id": "123123123",
"related_object": "product",
"quantity": 1,
"amount": 1000,
"price": 1000,
"subtotal_amount": 1000
}
],
"metadata": {
"location": "Katowice"
},
"created_at": "2024-07-24T10:51:29.669Z",
"object": "order"
},
"event": {
"id": "evcus_0f1ad36a884d1c7c69",
"type": "customer.order.paid",
"category": "EFFECT",
"entity_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
"created_at": "2024-07-24T10:51:29.670Z",
"group_id": "v-0f1ad36a77025ce17c"
},
"earning_rule": {
"id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
"campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
"validation_rule_id": null,
"parameters": {
"event": "order.paid",
"banner": "Basic points",
"loyalty": {
"type": "PROPORTIONAL",
"calculation_type": "ORDER_TOTAL_AMOUNT",
"order": {
"total_amount": {
"every": 100,
"points": 1
}
}
}
},
"automation_id": "auto_y1JL5lMLJXYVQUCyOP1D9gOC",
"active": true,
"metadata": {
"sponsors": [
"sponsor1"
]
}
},
"segment": null,
"loyalty_tier": null,
"redemption": null,
"rollback": null,
"reward": null,
"custom_event": null,
"source_voucher": null,
"destination_voucher": null
}