Skip to main content
Skip to content
Agentic Finance

One Checkout, Three Shipments, One Partial Refund: Agent Order Accounting in 2027

One checkout can produce three packages, repeated messages and a partial refund. DN’s executed synthetic UCP fixture checks goods and posted money separately.

Editorial illustration of three shipping boxes connected by one receipt, captioned One order. Three boxes.
Reading options: audio, text size & sections

Decentralised News · Agentic finance · Order reconciliation · 2027 planning edition · Sources verified 26 November 2026

What Matters

An agent should close a purchase only when the goods, the agreed charge and the posted payment record reconcile independently. One checkout can produce three packages, six shipment-status events and a partial refund without representing six deliveries or two purchases. A repeated message can describe an existing economic event.

DN built and executed a synthetic Universal Commerce Protocol order fixture: four units, three packages, an original customer total of R109.98 and a R10 concession on an item the customer keeps. The final expected obligation and net posted debit are both R99.98. Eighteen local fixture checks examine that result and deliberate failure cases. No merchant, carrier, payment processor or bank was tested.

The Signal

The dangerous reconciliation error can be a perfect-looking total. If R10 of capture is missing and a R10 refund is also missing, the net debit can still equal the expected final charge. A checker that compares only those totals can announce success while both component records remain wrong.

The fixture therefore requires original capture, agreed refund, delivered quantities and the released authorization hold to match separately. It also uses an explicit final authoritative order snapshot. A delayed webhook cannot establish the latest business state merely because it arrived last.

DN Alpha Thesis

Agent commerce needs an auditable account of what remains unresolved after checkout. A useful completion record should preserve line identities, package stages, monetary adjustments, payment postings and their evidence boundaries. A single “success” flag discards the distinctions an operator needs when a customer asks where the missing item or refund went.

This worked case extends DN’s purchase-lifecycle record with an executed, version-pinned protocol fixture. That companion explains the fields to preserve; this article tests a specific three-package history and its deliberately broken variants.

Pin the protocol before describing the result

This case uses the official UCP 2026-08-25 schema URLs and records SHA-256 hashes of the twelve schema documents actually used in validation. The versioned order specification describes the order as a current-state snapshot. Responses and update webhooks carry the full entity. They are not a list of new amounts that should all be added.

The same specification provides Get Order for retrieving current state. DN models that response as an explicit reconciliation input. This does not mean the local checker contacted a merchant: its response object, like the webhooks, is invented. The distinction separates a protocol-supported operation from an integration that has actually been exercised.

Start with one small order

DN’s synthetic starting order; all amounts in ZAR
LineQuantityPrice per unitLine amount
A2R19.99R39.98
B1R35.00R35.00
C1R25.00R25.00
Items subtotal4 units—R99.98
ShippingOne order charge—R10.00
Original customer total——R109.98

No additional tax is modelled: these stated item amounts and shipping form the complete illustrative charge. The amounts are neither a retailer’s offer nor a representation of a tax invoice. Keeping the example small makes its identities inspectable without hiding the accounting behind a large purchase.

The identity chain begins with a checkout reference, continues to the order and reaches each line identifier. The order schema says currency must match the originating checkout. This fixture uses ZAR throughout and rejects a payment-sidecar record labelled in another currency.

The item schema represents price in minor units. The order-line schema distinguishes original, current and fulfilled quantities. Here the authoritative item records omit a quantity-unit descriptor, so their default basis is whole items. Weighted goods or a different sale basis would require a different example.

Three packages do not mean three purchases

Package contents and the two stages recorded for each
PackageContentsRecorded stagesUnits delivered
P1A ×1; B ×1Shipped, then delivered2
P2A ×1Shipped, then delivered1
P3C ×1Shipped, then delivered1

Adding every event’s quantities yields eight: four at shipping and four again at delivery. That is the wrong aggregation for “how many units were delivered?” DN’s fixture groups stages by the declared package identity, then counts a package’s contents once at delivery. It reconciles A = 2, B = 1 and C = 1 against the final line state.

The fulfillment-event schema supplies event identity, occurrence time, type, line references and tracking fields. Type is an open string. DN deliberately narrows the case to shipped and delivered, with a package identified by carrier plus tracking number within the order. That convention is an assumption of this fixture.

Replacements, reshipments, tracking reuse and returned goods need additional rules. Even a delivered event describes a recorded assertion; the checker has no independent knowledge of a customer’s doorstep. Its result establishes consistency within the supplied synthetic records, not physical receipt.

A refund can change money without changing goods

The customer keeps item B but receives a R10 price concession. Its quantity remains one. The adjustment references B, records zero quantity change and a negative R10 monetary total. Treating every refund as a returned unit would make the goods ledger wrong.

The adjustment schema separates status, signed quantities and monetary totals. Zero quantity is permitted. The specification prefers preserving adjustment history, while allowing an existing entry’s status to change where history is not maintained. The fixture uses one refund identifier that moves from pending to completed; this transition is not a second refund.

The accounting convention is explicit: order totals retain the original R109.98 gross charge, while the completed adjustment records minus R10 separately. Expected final obligation is 10,998 − 1,000 = 9,998 cents. If another system already returns an adjusted total, subtracting the same refund again would understate the obligation.

The model limits this concession to B’s R35 line amount. That is a scope check, not a legal entitlement calculation. Shipping refunds, goodwill payments, exchanges or compensation above a line value need their own commercial event and a model that supports it.

The payment record sits beside the order

DN’s supplementary payment ledger is deliberately outside the UCP Order payload. It contains an authorization hold, posted capture, hold release and posted refund linked to the adjustment identifier. Its IDs, times and amounts are invented. It is not a claim that the UCP Order schema itself supplies bank postings.

Separate synthetic payment-sidecar records
RecordAmountTreatment
Authorization holdR109.98Reserved amount; not added to posted debit
Posted captureR109.98Original posted debit
Hold releaseR109.98Closes the reservation
Posted refundR10.00Reduces posted debit and links to the agreed concession

Capture less posted refund gives R99.98. Adding the authorization hold to capture would double count a different kind of record. Conversely, ignoring an unreleased hold can overlook an unresolved reservation even when posted cash reconciles. The checker therefore reports the remaining hold separately.

A completed merchant adjustment also does not prove that a refund appears in a payment record. Removing the posted refund from this fixture leaves R10 of excess debit relative to the final agreed obligation. It stays unresolved even though the merchant-side adjustment says completed.

Retries, late messages and the source of final state

The fixture contains nine distinct order snapshots: creation, six shipment-stage updates, a pending refund and a completed refund. Its transport stream has eleven receipts because the final message is retried and an older snapshot arrives late under a new receipt identifier.

Receipt, event, tracking and adjustment identifiers perform different jobs. The receipt detects repeated delivery of a business body. The event names a shipment-stage assertion. The tracking reference groups package stages under the declared convention. The adjustment names the commercial correction. Replacing one with another can accidentally duplicate or suppress an economic event.

The retry has a later receipt time but the same business body. It produces no extra effect. Reusing its receipt identifier with different content fails as a conflict. The payment sidecar similarly repeats its capture ID, which is counted once. These tests establish local deduplication behaviour, not exactly-once delivery by a network.

The delayed older snapshot is different: its receipt is new, while its business state is old. DN resolves final state from the explicit authoritative Get Order object at the stated cutoff. Reversing the receipt order leaves the result unchanged. A production integration needs comparable authorized evidence and cannot invent an undocumented revision sequence from arrival times.

What the executed checks establish

DN ran eighteen fixture checks. The first validates all nine distinct snapshots and the final GET object against the twelve downloaded official schema documents. The remaining checks exercise DN’s stronger accounting and identity rules. Schema validity establishes document structure within the tested schemas; it does not establish correct commercial accounting.

This deliberately bounded checker rejects duplicate authoritative line identifiers and more than one distinct concession. Its regression cases include two concessions exceeding B’s price and two refunds incorrectly linked to the first of two concessions. Supporting several adjustments would require a broader allocation ledger and additional tests; this fixture does not claim that capability.

Selected executed cases and expected outcomes
CaseExpected result
Default completed orderFour units, three packages, R99.98 obligation and net debit; no hold
Repeated final receipt and capture IDNo duplicated economic effect
Reversed transport orderSame authoritative final result
Unknown line, excess quantity or conflicting identifierRejected
Mixed currency, fractional cents or unlinked refundRejected
Merchant adjustment completed; posted refund missingR10 unresolved difference
Posted money reconciles; hold remains openClosure withheld
R99.98 capture and no refundZero net difference, but component checks prevent closure

The last case explains why matching totals alone is insufficient. A R99.98 capture with no refund has the same net debit as a R109.98 capture followed by a R10 refund. Only the second matches this fixture’s agreed payment history. The checker requires original capture and posted concession independently.

Change the refund assumptions

The compact calculator adjusts agreed concession, posted refund, posted capture and remaining hold while retaining the fixed order and package structure. Six separate calculator checks cover pending refunds, holds, cent arithmetic, offsetting errors and invalid inputs. It does not ingest UCP messages; the downloadable fixture provides that separate evidence.

DN Partial-Refund Reconciliation

Change the assumptions to calculate an illustrative scenario. Calculations run in your browser. Choosing Export downloads your inputs and results as a JSON file. This page also uses the site’s standard analytics. Scenario exports are separate from the article’s source evidence.

Illustrative default example shown. Interactive controls initialise when the page is ready. The static worked example remains available.

Original fixed order total in ZAR109.98
Expected final customer obligation in ZAR99.98
Net posted customer debit in ZAR99.98
Posted debit minus expected obligation in ZAR0.00
Agreed refund still unposted in ZAR0.00
Authorization still held in ZAR0.00
Packages in the fixed fixture3
Delivered units in the fixed fixture4
All fixture money checks balanceYes

Fixed synthetic order: three packages, four delivered units, original total R109.98 including R10 shipping. Only the quantity-neutral concession on line B changes, up to R35. A zero net difference does not close the case unless capture, refund posting and zero remaining hold also reconcile. Negative difference means undercapture or another mismatch. This compact calculator does not ingest UCP messages; the separately executed downloadable fixture documents those checks. No merchant, bank, processor, signature or carrier was tested.

A positive difference means posted debit exceeds the expected obligation. A negative difference means undercapture or another mismatch; it is not an automatic credit instruction. The tool refuses a posted refund greater than the agreed concession or capture. No action is sent to a bank, agent or merchant.

Keep the exception attached to the customer promise

A useful exception record should say which component failed, what evidence is missing and who owns the next action. In the missing-refund case, the unresolved item is the linked payment posting. Re-running the shipment count cannot resolve it. In a quantity mismatch, a correct bank total cannot establish which parcel contained the missing unit.

Preserve the original promise and its approved change. A R10 concession is meaningful because it refers to a particular line and an agreed adjustment; an unexplained R10 credit may have another purpose. A real workflow would also need to identify the authority that approved the change and the evidence accepted for closure. The synthetic fixture deliberately does not manufacture either a customer’s approval or a bank’s confirmation.

The practical handoff is therefore a record of remaining obligations, not merely an error message. An operator should be able to see the order, the disputed component, its source references and the next review point without reconstructing the whole conversation. Completion should follow those requirements, rather than a timer or the final message in a queue.

Reproduce the result and retain its limits

Start with the complete reproduction ZIP, which keeps the required filenames together.

Download the synthetic fixture, Python checker, schema hash pins and reproduction instructions. The accompanying results and runtime-version records identify the executed local environment.

The checker verifies cached or freshly downloaded schema bytes against the recorded hashes before accepting them. A changed or unlisted schema stops reproduction for review. A versioned URL alone is not treated as proof of immutable contents. The public pack supplies DN’s data and code; official schemas are fetched from their source when needed.

All dates within the order are synthetic. The source review and local execution occurred on 26 November 2026. No real signatures, authentication, merchant semantics, bank credits or carrier events were tested. Production integration also needs access controls, recovery ownership and retention rules. DN’s three-supplier architecture guide addresses that separate governance decision.

This case’s reusable contribution is a small, inspectable example whose expected quantities and money can be recomputed independently. It is not a certification of a protocol implementation. Refresh the schema evidence after a specification change and extend the case explicitly before using it for weighted goods, returns, multi-currency settlement or replacement shipments.

Frequently asked questions

Does a UCP order webhook contain only the latest change?

The reviewed order specification uses the full current-state entity. The fixture does not add each snapshot’s totals as a separate purchase.

Do six shipment events mean six delivered packages?

No. This fixture records shipped and delivered stages for each of three packages, containing four units in total.

Can a partial refund leave item quantities unchanged?

Yes in this case: the customer keeps B and receives a R10 price concession, with zero quantity change.

Does a completed merchant refund prove the money was posted?

No. The fixture requires a separately linked refund in its supplementary payment ledger. Without it, R10 remains unreconciled.

Why is zero net difference insufficient for closure?

Missing capture and refund amounts can offset. Original capture, agreed refund, delivered quantities and authorization holds must independently reconcile.

Was an actual merchant or payment provider tested?

No. The evidence consists of a synthetic fixture, official schema validation and local arithmetic checks. It establishes no live vendor behaviour.

Author: Heath Muchena. Fixture and calculator: DN order reconciliation 1.0.0. Corrections: press@decentralised.news. No affiliate recommendation or paid placement is included.

Primary sources and evidence

UCP2026-08-25 Order Capability

Read the primary source. Reviewed 2026-11-26.

Snapshot and retrieval semantics.

UCP2026-08-25 Order JSON Schema

Read the primary source. Reviewed 2026-11-26.

Order fields and currency scope.

UCP2026-08-25 Order Line Item schema

Read the primary source. Reviewed 2026-11-26.

Quantity and status structure.

UCP2026-08-25 Item schema

Read the primary source. Reviewed 2026-11-26.

Minor-unit prices and default whole-item basis.

UCP2026-08-25 Fulfillment Event schema

Read the primary source. Reviewed 2026-11-26.

Event references and tracking fields.

UCP2026-08-25 Adjustment schema

Read the primary source. Reviewed 2026-11-26.

Signed monetary and quantity adjustments.

UCP2026-08-25 Totals schema

Read the primary source. Reviewed 2026-11-26.

Subtotal/total structure validated in fixture.

Use and inspect the evidence

Download the dated evidence register (JSON) · Executed fixture test results · Executed Python dependency versions.

Source observations keep their dates and scope. Scenario outputs and local fixture checks are identified separately; they do not establish live vendor performance.

Original cover: AI-generated editorial illustration, not a photograph of a real project or event. The 2027 label identifies the planning edition; sources were reviewed on 2026-11-26.

Get the most talked about stories directly in your inbox

Join the Decentralised News briefing for independent crypto, DeFi and AI analysis. No spam, unsubscribe anytime.