ValulogDashboard

Use cases

Worked examples with real request bodies and the amounts the API returns for them.

Try it: basket and partial refund simulator

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.

Basket (prices in pence)
LineSKUUnit priceQtyDiscountableRemove
line-1
line-2
line-3
Discount rules (applied in this order)

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.

Who these use cases are for

They are written for developers and finance teams who build or run shops, marketplaces and order systems, and who have to answer one awkward question reliably: when a customer returns part of a discounted order, how much should they get back?

Each use case starts from a real basket, shows the exact request you send to /v1/calculate or /v1/refunds, and gives the amounts the API returns for it. Every amount is an integer in minor units (pence or cents), so the examples add up to the penny.

The pattern behind every example

  1. Send the basket and its discount rules once, at checkout. Valulog splits each discount across the lines and stores a frozen, hashed snapshot.
  2. Keep the transaction_id it returns alongside your order.
  3. When a line comes back, ask for the refund from that snapshot. The amount is worked out from what was actually paid for that line, never recalculated from today’s prices or rules.
  4. Send an Idempotency-Key with every write, so a retried request returns the original result and never refunds twice.

Valulog is not a payment processor and does not give tax advice: you still pay refunds out through your own provider. To try any example yourself, follow the five-minute quickstart with a free sandbox key (no card, 1,000 operations a month). Paid plans start at £49 a month, including any VAT due; see pricing.