Transaction-related Events

This section describes the event types related to transactions within the Sparkfly platform. These events are triggered when transactions are modified or created. Generally speaking, transactions within the Sparkfly platform are immutable after they are created, so most transaction-related events are focused on the creation of new transactions.

This information could be used to:

  • Update remote systems with the most recent transaction
  • Trigger marketing workflows based on transaction activity

sf.transaction.completed

Fired when a transaction is completed in the Sparkfly system. This event includes detailed information about the transaction, including items purchased, amounts, store information, and associated members.

Example payload:

{
    "event_name": "sf.transaction.completed",
    /* ... standard event metadata fields ... */
    "data": {
        "transaction": {
            "business_date": "2025-04-24",
            "external_id": "",
            "id": 237517557,
            "members": [
                {
                    "id": 597418627,
                    "identifier": "559a7c8f-380c-4964-b672-1ae5135a462c"
                }
            ],
            "pos_transaction_id": "7660",
            "receipt_id": "155",
            "store_number": "38",
            "subtotal": 15000,
            "terminal_type": "Instore",
            "total": 16000,
            "transaction_items": [
                {
                    "ext_price": 5000, 
                    "item_code": "1560",
                    "name": "test item",
                    "quantity": "1"
                },
                {
                    "ext_price": 5000, 
                    "item_code": "1335",
                    "name": "testm item",
                    "quantity": "1"
                },
                {
                    "ext_price": 5000,
                    "item_code": "1336",
                    "name": "test item",
                    "quantity": "1"
                }
            ]
        }
    }
}