When a customer, a colleague or your accountant asks why a refund came to £18.00, the answer should be a record, not a recalculation. Valulog keeps that record for every calculation and refund.
What is recorded
For each calculation: the basket and rules exactly as sent, how each discount was split across lines (with the rule that produced it), the totals, the engine version and a SHA-256 hash over all of it.
For each refund: the line, units, amount, reason, your metadata and the time, linked to the original transaction. GET /v1/transactions/{id} returns the snapshot with its refund ledger.
Checking a record has not changed
GET /v1/transactions/{id}/integrity recomputes the hash and compares it with the stored one. The rows are append-only in the database: snapshots cannot be updated and refunds cannot be edited or deleted.
This shows a record is unchanged since it was written. It is not an external audit or certification, and it does not replace your own accounting records.
Exporting for your records
Page through refunds per transaction with GET /v1/transactions/{id}/refunds and an opaque cursor, and store the results wherever you keep financial records.
Valulog is not a payment processor and does not give tax advice. Payments stay with your payment provider; Valulog records how prices, discounts and refunds were calculated.
Run this exact payload in Sandbox
10% off two T-shirts and a mug: calculate the basket, then refund 1 unit of line-1 from the frozen snapshot. Free test key, no card.
The button keeps this payload in your browser and opens your dashboard (sign in with your email first if you are not already), where it is ready to run with your vl_test_ key.
Change the numbers and watch the refund
No sign-in. Edit the basket and the discount rules, then refund a line. This runs Valulog’s own pricing engine (engine 1.3.0) in your browser: nothing is sent or stored, and the IDs, hash and timestamps are generated for this simulation.
Result: how each discount was split
Refund part of the order
Refunds come from the frozen line, not today’s prices. Refund the same line again to see the over-refund guard; the last unit takes any leftover penny.
POST /v1/calculate · … response
…
Copies a ready-to-run curl script for this exact basket and refund, and keeps it on your dashboard. Free sandbox: no card, 1,000 operations a month.