> For the complete documentation index, see [llms.txt](https://kbase.whitelabel-loyalty.com/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbase.whitelabel-loyalty.com/developer/guides/enable-users-to-extract-value-burn/reporting-events-to-deduct-points.md).

# Reporting events to deduct points

## Overview

You can report a [custom event](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/events/event-types#custom-event-types) that directly deducts points from the user’s wallet, for example an event like `REDEEMED_POINTS`.  This gives you the highest amount of flexibility in terms of handling who/what provides real-world value to the customers.

This follows the normal [Reporting events](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/events/reporting-events) flow.

***

## Implementation steps

{% hint style="info" %}

### API References

* [Events: POST /events](https://docs.whitelabel-loyalty.com/rewards.html#events-events-collection-post)
  {% endhint %}

{% stepper %}
{% step %}

### Create a custom event type

Create an [event type](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/events/event-types) such as `REDEEMED_POINTS`, and include a payload schema with a property called points (or any other property which represents a value related to the points adjustment, like a currency amount).
{% endstep %}

{% step %}

### Create a reactor

Create a [reactor](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/reactors/creating-reactors) triggered by the `REDEEMED_POINTS` event, and configure it with an [Adjust Points reaction](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/reactors/reactions#adjust-points). This reaction should adjust the user’s points balance by the value of the `points` property multiplied by 1.
{% endstep %}

{% step %}

### Report the event

Use the API to [report the `REDEEMED_POINTS` event](/developer/tutorials/reporting-your-first-event.md) before giving the real world value to the user, specifying the number of points to adjust in the points property of the event payload.

```json
{
  "type": "REDEEMED_POINTS",
  "payload": {"amount": 500, "venue": "XYZ"},
  "subject": "9cb2cc08-e033-4200-86a7-95a03ba09462",
  "occurredAt": "2024-06-08T08:57:47.198Z"
}
```

{% hint style="info" %}
The payload above includes a `venue` property purely to show that you have full control of the shape of this event and may include any additional properties which are relevant for your use case. It is not intrinsically needed.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kbase.whitelabel-loyalty.com/developer/guides/enable-users-to-extract-value-burn/reporting-events-to-deduct-points.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
