Triggered when a loyalty account is updated, including when points are adjusted, earned, or redeemed.
function onAccountUpdated(handler: function): void;
handler(event: AccountUpdatedEnvelope): void | Promise<void>
import { accounts } from "@wix/loyalty";
accounts.onAccountUpdated((event) => {
// handle your event here
});