Reporting transactions

How to report transactions directly to the Loyalty Engine via API when running a transaction loyalty program.

Reporting your customer's transactions to the Loyalty Engine lets you set up reactors and program logic to reward members in transactional loyalty programs.

You should report all transactions—including non-member transactions—to enable comparison of loyalty vs. non-loyalty performance on key metrics such as average spend.

There are two ways to report transactions to WLL: submit an order via the Receipts API, or report a custom event using the Rewards API.

Your WLL onboarding manager will tell you which method to implement.


Submit an order

This approach uses the Receipts API to process transactions in a standardized way, designed specifically for transactional loyalty programs.

  • The Receipts service receives and stores orders, and automatically reports an intrinsic ORDER_PLACED event to the Loyalty Engine when you call POST /orders.

  • The Rewards service then handles loyalty aspects such as awarding points or vouchers.

  • Setup and configuration of the Receipts service for your tenant must be completed by WLL. Do not proceed unless advised by your onboarding or success manager.

Implementation steps

1

Identify member

Retrieve the member ID via POS (QR code or manual input) – you can retrieve either the WLL ID, the WLL account number, or the auth identifier.

See User data, attributes & flags for more information.

2

Lookup member

Unless you're identifying members using their auth identifier, you will need to call GET /users/{id} using the WLL account ID or account number, and cache the authIdentifier returned in the response for all further calls.

3

Report the transaction

After payment is confirmed, send the order to the Receipts service using POST /orders from your ERP.

  • The submitter property must be an authIdentifier matching a WLL user.

  • For transactions which are not related to a loyalty member, do not include a submitter in the request.

  • Include data such as transaction ID, total amount, line items, location ID and cashier ID.

  • Never include PII in the request.

4

Once the order is submitted, the Receipts service automatically reports an ORDER_PLACED event in the Loyalty Engine, triggering any configured reactors to award points based on earning rules.


Report a custom event

This approach uses the Rewards API to report transactions as custom events. It requires you to first create a custom event type corresponding to transactions and a reactor which then awards points when an event of this type occurs.

Implementation steps

1

Identify member

Retrieve the member ID via POS (QR code or manual input).

2

Report the transaction

After payment is confirmed, call POST /events from your ERP to report an event matching your custom event type for transactions.

  • Include data such as transaction ID, total amount, branch ID, cashier ID, and basket details.

  • Never include PII in the payload.

3

The Loyalty Engine processes the event and triggers reactors to award points or rewards based on earning rules.


FAQs

How do I configure earn rate for points?

The earn rate (e.g., 1pt per £1 spent) and redemption value (e.g., 100pts = £1) are configured using reactors and can be fully customised in the Loyalty Engine.

Can I show points awarded for a transaction on a transaction's receipt?

Yes. The approach depends on how you report transactions to the Loyalty Engine:

  • Submit an order (Receipts API): After posting the order, wait 1-2 seconds, then:

    1. Fetch events (GET /events) for the user using filter on authIdentifier and ORDER_PLACED (e.g. subject.authIdentifier:(eq:abcd1234),type.name:(eq:'ORDER_PLACED') )

    2. Check if the most recent event has the same transaction id in its payload.

    3. If so, call /events/{{id}}/reactions for totalPoints

  • Report a custom event (Rewards API): After reporting the event:

    1. Collect the event ID (data.id) from the response, and then call /events/{{id}}/reactions to get the totalPoints awarded.

Last updated

Was this helpful?