> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows webhooks

> Receive Loyalty v2 transaction and activity events from Workflows webhook callouts

Workflows can send Loyalty v2 events to your application through a **Webhook callout** action. When a configured Loyalty transaction or Loyalty activity triggers a workflow and the callout step runs, Voucherify sends an HTTP `POST` request to the target URL defined in that step.

Workflows webhooks use the [shared Voucherify webhook structure](/api-reference/introduction-to-webhooks#voucherify-webhook-structure). For these webhooks, `source.object` is always `workflow`. `source.id` is the workflow definition ID. `source.workflow` identifies the definition version, node, run, and step.

`data.trigger` is always the trigger that started the workflow. Later steps in the same run do not replace it.

Each event reference page describes the Loyalty v2 event. Workflows send that event in `data.trigger`.

## Webhooks available in Workflows

These webhooks are triggered by Loyalty v2 events that start a workflow. If the workflow reaches a **Webhook callout** action, Voucherify sends the event in `data.trigger`.

<AccordionGroup>
  <Accordion title="Loyalty transactions">
    * Card transactions:
      * [Admin credit](/api-reference/loyalty-transactions/card/admin-credit "Admin credit event documentation")
      * [Admin debit](/api-reference/loyalty-transactions/card/admin-debit "Admin debit event documentation")
      * [Admin points expiration](/api-reference/loyalty-transactions/card/admin-points-expiration "Admin points expiration event documentation")
      * [Points earned](/api-reference/loyalty-transactions/card/points-earned "Points earned event documentation")
      * [Points spent on reward](/api-reference/loyalty-transactions/card/points-spent-on-reward "Points spent on reward event documentation")
      * [Points purchased](/api-reference/loyalty-transactions/card/points-purchased "Points purchased event documentation")
      * [Points purchase reversed](/api-reference/loyalty-transactions/card/points-purchase-reversed "Points purchase reversed event documentation")
      * [Points spent on order](/api-reference/loyalty-transactions/card/points-spent-on-order "Points spent on order event documentation")
      * [Points refunded](/api-reference/loyalty-transactions/card/points-refunded "Points refunded event documentation")
      * [Points returned](/api-reference/loyalty-transactions/card/points-returned "Points returned event documentation")
      * [Points expired](/api-reference/loyalty-transactions/card/points-expired "Points expired event documentation")
      * [Pending points added](/api-reference/loyalty-transactions/card/pending-points-added "Pending points added event documentation")
      * [Pending points activated](/api-reference/loyalty-transactions/card/pending-points-activated "Pending points activated event documentation")
      * [Pending points canceled](/api-reference/loyalty-transactions/card/pending-points-canceled "Pending points canceled event documentation")

    * Order transactions:
      * [Pay with points](/api-reference/loyalty-transactions/order/pay-with-points "Pay with points event documentation")

    * Tier transactions:
      * [Upgraded](/api-reference/loyalty-transactions/tier/upgraded "Upgraded event documentation")
      * [Downgraded](/api-reference/loyalty-transactions/tier/downgraded "Downgraded event documentation")
      * [Joined](/api-reference/loyalty-transactions/tier/joined "Joined event documentation")
      * [Left](/api-reference/loyalty-transactions/tier/left "Left event documentation")
      * [Expiration changed](/api-reference/loyalty-transactions/tier/expiration-changed "Expiration changed event documentation")
      * [Evaluation refreshed](/api-reference/loyalty-transactions/tier/evaluation-refreshed "Evaluation refreshed event documentation")

    * Reward transactions:
      * [Purchase](/api-reference/loyalty-transactions/reward/purchase "Purchase event documentation")
      * [Refund](/api-reference/loyalty-transactions/reward/refund "Refund event documentation")

    * Benefit transactions:
      * [Fulfillment](/api-reference/loyalty-transactions/benefit/fulfillment "Fulfillment event documentation")
  </Accordion>

  <Accordion title="Loyalty activity">
    * Program events:
      * [Program created](/api-reference/loyalty-activity/programs/created "Program created event documentation")
      * [Program updated](/api-reference/loyalty-activity/programs/updated "Program updated event documentation")
      * [Program deleted](/api-reference/loyalty-activity/programs/deleted "Program deleted event documentation")
      * [Program activated](/api-reference/loyalty-activity/programs/activated "Program activated event documentation")
      * [Program deactivated](/api-reference/loyalty-activity/programs/deactivated "Program deactivated event documentation")
      * [Program card definition assigned](/api-reference/loyalty-activity/programs/card-definition-assigned "Program card definition assigned event documentation")
      * [Program card definition unassigned](/api-reference/loyalty-activity/programs/card-definition-unassigned "Program card definition unassigned event documentation")
      * [Program earning rule assigned](/api-reference/loyalty-activity/programs/earning-rule-assigned "Program earning rule assigned event documentation")
      * [Program earning rule unassigned](/api-reference/loyalty-activity/programs/earning-rule-unassigned "Program earning rule unassigned event documentation")
      * [Program reward assigned](/api-reference/loyalty-activity/programs/reward-assigned "Program reward assigned event documentation")
      * [Program reward unassigned](/api-reference/loyalty-activity/programs/reward-unassigned "Program reward unassigned event documentation")
      * [Program reward updated](/api-reference/loyalty-activity/programs/reward-updated "Program reward updated event documentation")
      * [Program tier structure assigned](/api-reference/loyalty-activity/programs/tier-structure-assigned "Program tier structure assigned event documentation")
      * [Program tier structure unassigned](/api-reference/loyalty-activity/programs/tier-structure-unassigned "Program tier structure unassigned event documentation")

    * Card definition events:
      * [Card definition created](/api-reference/loyalty-activity/card-definitions/created "Card definition created event documentation")
      * [Card definition updated](/api-reference/loyalty-activity/card-definitions/updated "Card definition updated event documentation")
      * [Card definition deleted](/api-reference/loyalty-activity/card-definitions/deleted "Card definition deleted event documentation")
      * [Card definition activated](/api-reference/loyalty-activity/card-definitions/activated "Card definition activated event documentation")
      * [Card definition drafted](/api-reference/loyalty-activity/card-definitions/drafted "Card definition drafted event documentation")
      * [Card definition assigned](/api-reference/loyalty-activity/card-definitions/assigned "Card definition assigned event documentation")
      * [Card definition unassigned](/api-reference/loyalty-activity/card-definitions/unassigned "Card definition unassigned event documentation")

    * Earning rule events:
      * [Earning rule created](/api-reference/loyalty-activity/earning-rules/created "Earning rule created event documentation")
      * [Earning rule updated](/api-reference/loyalty-activity/earning-rules/updated "Earning rule updated event documentation")
      * [Earning rule deleted](/api-reference/loyalty-activity/earning-rules/deleted "Earning rule deleted event documentation")
      * [Earning rule activated](/api-reference/loyalty-activity/earning-rules/activated "Earning rule activated event documentation")
      * [Earning rule deactivated](/api-reference/loyalty-activity/earning-rules/deactivated "Earning rule deactivated event documentation")
      * [Earning rule drafted](/api-reference/loyalty-activity/earning-rules/drafted "Earning rule drafted event documentation")
      * [Earning rule assigned](/api-reference/loyalty-activity/earning-rules/assigned "Earning rule assigned event documentation")
      * [Earning rule unassigned](/api-reference/loyalty-activity/earning-rules/unassigned "Earning rule unassigned event documentation")

    * Reward events:
      * [Reward created](/api-reference/loyalty-activity/rewards/created "Reward created event documentation")
      * [Reward updated](/api-reference/loyalty-activity/rewards/updated "Reward updated event documentation")
      * [Reward deleted](/api-reference/loyalty-activity/rewards/deleted "Reward deleted event documentation")
      * [Reward assigned](/api-reference/loyalty-activity/rewards/assigned "Reward assigned event documentation")
      * [Reward unassigned](/api-reference/loyalty-activity/rewards/unassigned "Reward unassigned event documentation")
      * [Reward activated](/api-reference/loyalty-activity/rewards/activated "Reward activated event documentation")
      * [Reward deactivated](/api-reference/loyalty-activity/rewards/deactivated "Reward deactivated event documentation")
      * [Reward drafted](/api-reference/loyalty-activity/rewards/drafted "Reward drafted event documentation")

    * Benefit events:
      * [Benefit created](/api-reference/loyalty-activity/benefits/created "Benefit created event documentation")
      * [Benefit updated](/api-reference/loyalty-activity/benefits/updated "Benefit updated event documentation")
      * [Benefit deleted](/api-reference/loyalty-activity/benefits/deleted "Benefit deleted event documentation")
      * [Benefit activated](/api-reference/loyalty-activity/benefits/activated "Benefit activated event documentation")
      * [Benefit drafted](/api-reference/loyalty-activity/benefits/drafted "Benefit drafted event documentation")

    * Tier structure events:
      * [Tier structure created](/api-reference/loyalty-activity/tier-structures/created "Tier structure created event documentation")
      * [Tier structure updated](/api-reference/loyalty-activity/tier-structures/updated "Tier structure updated event documentation")
      * [Tier structure deleted](/api-reference/loyalty-activity/tier-structures/deleted "Tier structure deleted event documentation")
      * [Tier structure activated](/api-reference/loyalty-activity/tier-structures/activated "Tier structure activated event documentation")
      * [Tier structure deactivated](/api-reference/loyalty-activity/tier-structures/deactivated "Tier structure deactivated event documentation")
      * [Tier structure drafted](/api-reference/loyalty-activity/tier-structures/drafted "Tier structure drafted event documentation")
      * [Tier structure assigned](/api-reference/loyalty-activity/tier-structures/assigned "Tier structure assigned event documentation")
      * [Tier structure unassigned](/api-reference/loyalty-activity/tier-structures/unassigned "Tier structure unassigned event documentation")
      * [Tier created](/api-reference/loyalty-activity/tier-structures/tier-created "Tier created event documentation")
      * [Tier updated](/api-reference/loyalty-activity/tier-structures/tier-updated "Tier updated event documentation")
      * [Tier deleted](/api-reference/loyalty-activity/tier-structures/tier-deleted "Tier deleted event documentation")

    * Member events:
      * [Member created](/api-reference/loyalty-activity/members/created "Member created event documentation")
      * [Member updated](/api-reference/loyalty-activity/members/updated "Member updated event documentation")
      * [Member deleted](/api-reference/loyalty-activity/members/deleted "Member deleted event documentation")
      * [Member activated](/api-reference/loyalty-activity/members/activated "Member activated event documentation")
      * [Member deactivated](/api-reference/loyalty-activity/members/deactivated "Member deactivated event documentation")
      * [Member card assigned](/api-reference/loyalty-activity/members/card-assigned "Member card assigned event documentation")
      * [Member card unassigned](/api-reference/loyalty-activity/members/card-unassigned "Member card unassigned event documentation")

    * Card events:
      * [Card created](/api-reference/loyalty-activity/cards/created "Card created event documentation")
      * [Card assigned](/api-reference/loyalty-activity/cards/assigned "Card assigned event documentation")
      * [Card unassigned](/api-reference/loyalty-activity/cards/unassigned "Card unassigned event documentation")
      * [Card code generation succeeded](/api-reference/loyalty-activity/cards/code-generation-succeeded "Card code generation succeeded event documentation")
      * [Card code generation failed](/api-reference/loyalty-activity/cards/code-generation-failed "Card code generation failed event documentation")
  </Accordion>
</AccordionGroup>

## Transaction and activity payloads

Workflows supports two Loyalty v2 trigger types. They use the same top-level webhook structure but differ in `data.trigger` and `event`.

### Loyalty transactions

For a Loyalty transaction:

* `type` and `event.type` contain the transaction type, for example `POINTS_EARNED`.
* `data.trigger` contains the transaction.
* `data.trigger.transaction.status` contains the status matched by the workflow trigger, for example `APPROVED`.
* `event.id` and `event.entity_id` contain the transaction ID.
* `event` does not contain `event_source`.

<Note>
  Transaction statuses such as `APPROVED`, `PENDING`, and `REJECTED` are workflow trigger filters and values of `data.trigger.transaction.status`. They are not separate event types.
</Note>

See [Points earned](/api-reference/loyalty-transactions/card/points-earned) for the event schema.

### Loyalty activity

For a Loyalty activity:

* `type` and `event.type` contain the activity type, for example `vl.member.created`.
* `data.trigger` contains the activity.
* `event.id` and `event.entity_id` contain the activity ID.
* `event.event_source` describes how the activity was initiated, such as through the API, Client API, User Portal, or an internal process.

See [Member created](/api-reference/loyalty-activity/members/created) for the event schema.

## Payload examples

These examples show the complete payload sent to your endpoint.

<CodeGroup>
  ```json Loyalty transaction lines wrap expandable theme={null}
  {
    "id": "whs_7f3a8c52e1d94b607a",
    "project_id": "proj_R5kT9nQ2wX7m",
    "created_at": "2026-08-20T14:32:18.531Z",
    "type": "POINTS_EARNED",
    "data": {
      "trigger": {
        "transaction": {
          "id": "lctx_7d2f5a39b461",
          "card_id": "lcrd_28c4e7b195fa",
          "program_id": "lprg_3e8a1c74d952",
          "member_id": "lmbr_91f6b2e84a37",
          "card_definition_id": "lcdef_6a2d9f41c783",
          "card_type": "INDIVIDUAL",
          "type": "POINTS_EARNED",
          "details": {
            "reason": "Order paid",
            "rejection": null,
            "metadata": {
              "order_source": "online_store"
            },
            "points": {
              "total": 250,
              "expiration_date": "2027-08-20"
            }
          },
          "status": "APPROVED",
          "created_at": "2026-08-20T14:32:18.412Z",
          "updated_at": "2026-08-20T14:32:18.497Z",
          "object": "card_transaction"
        }
      }
    },
    "source": {
      "id": "wfdef_7d2f5a39b461",
      "object": "workflow",
      "target_url": "https://example.com/webhooks/voucherify",
      "workflow": {
        "id": "wfdef_7d2f5a39b461",
        "version": 1,
        "node": "exwfnod_webhook",
        "run": "wfrun_4c91a287d053",
        "step": "wfrnstp_4c91a287d053"
      }
    },
    "event": {
      "id": "lctx_7d2f5a39b461",
      "type": "POINTS_EARNED",
      "created_at": "2026-08-20T14:32:18.412Z",
      "group_id": "i-4e8b19d72c60",
      "entity_id": "lctx_7d2f5a39b461"
    }
  }
  ```

  ```json Loyalty activity lines wrap expandable theme={null}
  {
    "id": "whs_8a6d13f90c42b751e4",
    "project_id": "proj_R5kT9nQ2wX7m",
    "created_at": "2026-08-21T09:15:43.284Z",
    "type": "vl.member.created",
    "data": {
      "trigger": {
        "activity": {
          "id": "lambr_1c85f39e7a42",
          "type": "vl.member.created",
          "source": {
            "channel": "API",
            "api_key": {
              "name": "Server-side key",
              "app_id": "52f26ec1-33a7-4d6f-a951-243b911cf84e"
            }
          },
          "group_id": "i-62af94d1e703",
          "created_at": "2026-08-21T09:15:43.091Z",
          "member_id": "lmbr_91f6b2e84a37",
          "data": {
            "member": {
              "id": "lmbr_91f6b2e84a37",
              "customer_id": "cust_7LvqCsUB9c8WyFP8JaLXchtF",
              "program_id": "lprg_3e8a1c74d952",
              "status": "ACTIVE",
              "metadata": {
                "signup_channel": "mobile_app"
              },
              "created_at": "2026-08-21T09:15:43.091Z",
              "updated_at": null,
              "object": "member"
            },
            "program": {
              "id": "lprg_3e8a1c74d952",
              "name": "Coffee Club",
              "status": "ACTIVE",
              "start_date": "2026-01-01T00:00:00.000Z",
              "end_date": null,
              "validity_hours": {
                "type": "ANY_TIME"
              },
              "metadata": {},
              "created_at": "2025-12-10T11:24:07.635Z",
              "updated_at": "2025-12-15T08:41:29.182Z",
              "object": "program"
            }
          }
        }
      }
    },
    "source": {
      "id": "wfdef_55bfc63a8142",
      "object": "workflow",
      "target_url": "https://example.com/webhooks/voucherify",
      "workflow": {
        "id": "wfdef_55bfc63a8142",
        "version": 1,
        "node": "exwfnod_webhook",
        "run": "wfrun_c2a4769de031",
        "step": "wfrnstp_c2a4769de031"
      }
    },
    "event": {
      "id": "lambr_1c85f39e7a42",
      "type": "vl.member.created",
      "created_at": "2026-08-21T09:15:43.091Z",
      "group_id": "i-62af94d1e703",
      "entity_id": "lambr_1c85f39e7a42",
      "event_source": {
        "channel": "API",
        "api_key": {
          "name": "Server-side key",
          "app_id": "52f26ec1-33a7-4d6f-a951-243b911cf84e"
        }
      }
    }
  }
  ```
</CodeGroup>
