Notifications
Post sales to Discord, keep a daily purchase log, and tell staff in game about sales, refunds and orders that need a look.
Emberstore can report order events in three places, each with its own switch: a Discord channel, a daily log file, and chat messages in game.
Discord
discord:
# Post sales to a Discord webhook
enabled: false
# Discord webhook URL
url: "https://discord.com/api/webhooks/YOUR_WEBHOOK"
# Name shown as the sender
username: "Store"
# Events to post: completed, refunded, disputed, needs-review, subscription-cancelled
events: [completed, refunded, disputed, needs-review]Make a webhook
In your Discord channel settings, create a webhook and copy its URL.
Paste it in
Set discord.url to it, set enabled: true, pick the events, and run /store admin reload.
Each event is posted as an embed. The title comes from the discord section of the language file and the body is <player> / <item> x<quantity> / <price> / <gateway> / <order>. Completed orders and renewals are green, refunds and needs review orange, disputes red, cancelled subscriptions gold. Test orders end with [TEST]. Sending never slows a payment down, and if Discord asks to wait it is tried once more. The webhook URL is never written to the logs.
| Event | Sent when |
|---|---|
completed | An order is paid, and on every subscription renewal |
refunded | An order is refunded |
disputed | A chargeback or dispute is opened |
needs-review | A payment needs a look (short, wrong currency, late) |
subscription-cancelled | A recurring subscription is cancelled |
Purchase log
purchase-log:
# Write every order event to a daily log file in the plugin folder
enabled: trueEvery order event (created, completed, failed, expired, refunded, disputed, needs review, renewed, given by staff, subscription cancelled) is written as one line to plugins/Emberstore/logs/purchases-YYYY-MM-DD.log:
time | event | order id | gateway | buyer=... | recipient=... | category/item | x1 | $4.99 usd | COMPLETED | LIVEDashboard login links and logins are written there too.
In game
notify:
# Tell players with emberstore.notify in-game when a sale completes
in-game: true
| Who | Gets |
|---|---|
Players with emberstore.notify | One line per completed sale (admin.notify-sale), while notify.in-game is true |
Players with emberstore.admin and the console | Every refund, dispute and needs review notice, always |
These are sent on the server that handles payments. On a network, that is the server with webhook.enabled: true.