ValulogDashboard

For developers building shops, marketplaces and order systems

Refund the right amount, even when the discount was messy.

Freeze how every discount was split across the lines, then refund any line from that record, not from today’s prices. Send a basket and its discount rules; Valulog does the split and the refund maths.

Free sandbox, no card · paid plans from £15 a month

Engine output for the example request on this page · fictional IDs

Basket £50.00Rule: £5.00 off the order

  1. line-1T-shirt ×2£36.00

    £40.00 shelf · £4.00 of the discount recorded here

  2. line-2Mug ×1£9.00

    £10.00 shelf · £1.00 of the discount recorded here

Refund 1 T-shirt, from the record£18.00not the £20.00 shelf price

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.

Free sandbox · no card · 1,000 operations a month. Paid plans from £15 a month (Indie). Starter is £49 a month or £490 a year; Growth is £199 a month or £1,990 a year. Prices include any VAT due, for businesses only. Cancel any time.

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.

Example request and response

curl https://api.valulog.com/v1/calculate \
  -H "Authorization: Bearer $VALULOG_KEY" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "GBP",
    "items": [
      { "id": "line-1", "sku": "TEE", "unit_price_cents": 2000, "quantity": 2 },
      { "id": "line-2", "sku": "MUG", "unit_price_cents": 1000, "quantity": 1 }
    ],
    "discounts": [
      { "rule_id": "TENOFF", "type": "PERCENTAGE", "basis_points": 1000 }
    ]
  }'
Sample response (fictional IDs; real amounts for this request)
{
  "transaction_id": "3b0c6f1e-8d2a-4c47-9f5e-2a7d1c9b4e60",
  "currency": "GBP",
  "allocations": [
    { "line_item_id": "line-1", "quantity": 2, "original_cents": 4000,
      "allocated_discount_cents": 400, "final_cents": 3600 },
    { "line_item_id": "line-2", "quantity": 1, "original_cents": 1000,
      "allocated_discount_cents": 100, "final_cents": 900 }
  ],
  "totals": { "subtotal_cents": 5000, "total_discount_cents": 500,
              "final_total_cents": 4500, "item_count": 3 },
  "snapshot_hash": "sha256:…"
}

£5.00 off a £50.00 basket: £4.00 is recorded on the T-shirts and £1.00 on the mug. Refunding one T-shirt later returns £18.00.

How it works

  1. Get a test key

    Sign in with your email (no password, no card) and create a vl_test_ key.

  2. Send a basket

    POST /v1/calculate with the lines and discount rules. Store the transaction_id.

  3. Refund a line

    POST /v1/refunds with the transaction_id, line and quantity. Pay it out through your provider.

Frozen snapshots

Each calculation is stored as an immutable, hashed snapshot of the basket, the rules and how each discount was split across lines.

Refunds from the record

A refund is worked out from the snapshot, never recalculated, so a customer gets back what they actually paid for that line.

Integer money

Every amount is an integer in minor units (pence, cents, yen). No floating point, no rounding drift.

Idempotent writes

Every calculation and refund needs an Idempotency-Key. A retried request returns the original result and never refunds twice.

Over-refund guard

The database refuses refunds beyond what was paid or units beyond what was bought, even under concurrent requests.

Integrity check

Recompute any transaction’s snapshot hash with one call to show the record has not changed since it was written.

Measured, not claimed

Numbers we measured or counted ourselves, with how and when. No logos, no customer quotes, no invented benchmarks.

API response time

331 ms p95, reused connection

p50 310 ms. On a new connection each time (TLS included): p50 415 ms, p95 589 ms.

Method: 200 + 200 sequential requests to GET https://api.valulog.com/v1/health, the public health check, which makes a live round trip to the API’s Postgres database and its Redis store, from a client on UK broadband in England, over the public internet, on 1 December 2026, 00:51–00:58 UK time. 0 failed. These are end-to-end times seen by a client, including network distance to the hosting region. Calculations and refunds were not timed here because they need an API key; they also include a write to the ledger, so do not read the health-check figure as a calculation time.

Automated tests

166 passing tests

102 on the API and pricing engine (13 files, 2 skipped that need a Redis server), 64 on the website and billing (4 files). Counted 1 December 2026.

  • Concurrent duplicate requests with one Idempotency-Key write exactly once
  • A replayed refund never refunds twice
  • Refunds cannot exceed the frozen line, in money or units
  • Ledger rows are immutable at the database level
  • Penny-splitting: the last unit on a line takes any leftover penny
  • Stacked discounts: REMAINING_BALANCE and ORIGINAL_SUBTOTAL give the documented line splits

Vitest. The API tests run against a real, throwaway PostgreSQL 17 database, not mocks. The engine tests check the worked examples published on this site.

Uptime: there is no contractual SLA. See Status for our target and how to monitor the API, and the Stripe partial-refund recipe for a safe integration.

Use cases

Pricing

Sandbox

Build and test your integration.

£0 free

No card needed.

  • Test keys only (vl_test_)
  • 1,000 operations a month
  • 10 requests a minute
  • 1 merchant
Start free with Sandbox

Indie

Your first live shop, before volume.

£15 per month

Includes any VAT due. Businesses only.

  • Live keys (vl_live_)
  • 2,500 operations a month
  • 30 requests a minute
  • 1 merchant
  • Test keys included
  • Move up to Starter any time
Choose Indie

Starter

One shop in production.

£49 per month

or £490 per year (two months free)

Includes any VAT due. Businesses only.

  • Live keys (vl_live_)
  • 25,000 operations a month
  • 60 requests a minute
  • 1 merchant
  • Test keys included
Choose Starter

Growth

Several brands or storefronts.

£199 per month

or £1,990 per year (two months free)

Includes any VAT due. Businesses only.

  • Live keys (vl_live_)
  • 250,000 operations a month
  • 300 requests a minute
  • Up to 10 merchants
  • Test keys included
Choose Growth

Enterprise · custom price

Marketplaces and platforms above Growth.

  • More than 250,000 operations a month
  • More than 10 merchants
  • Limits and price agreed with you in writing
  • Invoice billing can be discussed
Email hello@3dcoded.com

An operation is one calculation or one refund. Reads and idempotent replays are free.

  • · Prices include any VAT due. Indie is £15 a month. Starter is £49 a month or £490 a year (two months free). Growth is £199 a month or £1,990 a year (two months free).
  • · For businesses only: you must be buying for a business, not as a consumer.
  • · Cancel any time from your dashboard; your plan runs to the end of the period you have paid for.
  • · Full refund of your first payment if you ask within 14 days of it. A refund cancels the subscription and revokes your live keys.

Details: Terms · Refunds and cancellation · Enterprise or larger volumes: contact us.

Questions

Does Valulog take payments or send refunds?

No. Your payment provider (for example Stripe, Adyen or PayPal) still takes the money and sends the refund. Valulog tells you how much to refund for each line and keeps the record of why.

Is Valulog tax or accounting advice?

No. You set the prices and discount rules; Valulog applies them exactly as sent and records the result. Ask your accountant how to treat discounts and refunds for tax.

Can I try it before paying?

Yes. The Sandbox plan is free, needs no card, and gives you test keys (vl_test_) with 1,000 operations a month. Test data never mixes with live data.

What counts as an operation?

One calculation or one refund. Reads, integrity checks, health checks and idempotent replays of a request you already sent are not counted.

What happens if I retry a request?

Every calculation and refund needs an Idempotency-Key header. Sending the same key again returns the original result and never refunds twice.

What if I go over my monthly operations?

Further calculations and refunds get a 429 QUOTA_EXCEEDED response until the 1st of the next month (UTC) or until you move to a larger plan. Nothing is charged automatically for overage.

Who can buy a paid plan?

Businesses only. Paid plans can be billed monthly or annually, include any VAT due, and can be cancelled at any time from the billing portal.

Can I get my money back?

Yes, a full refund of your first payment if you ask within 14 days of it. A refund cancels the subscription and revokes your live keys. See the Refunds page for the details.

Is there an uptime guarantee?

There is no contractual SLA on any plan. Our target is that the API is available whenever your checkout is, and outages are investigated as a priority; that is an aim, not a promise. The Status page publishes a measured record of external GET /v1/health checks, with the method and the date the record started. GET /v1/health reports whether the API, its database and its rate-limit store are reachable right now, so you can monitor it yourself. Write calls are idempotent, so a request that fails during an outage can be retried safely with the same Idempotency-Key. See the Status page and the Stripe partial-refund recipe.

Try it in the sandbox

Test keys, no card. Your test data never mixes with live data.

Get a free test key