End-to-end · Trade × Logistics

A smartphone,
ordered in Surabaya.

One consumer purchase, two linked ION contracts — a Trade contract between the buyer app and the merchant, and a Logistics contract between the buyer app and the carrier. Joined by linkedContractId, each runs its own Beckn message exchange under the protocols ION ratifies.

14
Phases
32
Messages
5
Actors
2
Linked contracts
01 The actors

One consumer, five lanes.

Each actor shows up in exactly one lane in the sequence below. Pasar Sapa wears both buyer-app hats — Trade and Logistics — and the ION services stay quietly in the background, providing the catalogue and policy registries everyone consults.

cast A single transaction surabaya → jakarta → surabaya
Andi
Consumer in Surabaya. Pincode 35-XXXX. Opens Pasar Sapa to buy a smartphone.
Pasar Sapa
BAP for both Trade and Logistics. Wears two hats: aggregates listings, then dispatches shipments.
Toko Elektronik
BPP · Trade. Jakarta electronics merchant. PKP-registered; issues Faktur Pajak.
JNE
BPP · Logistics. LOG-PARCEL · NEXT_DAY. Operates under a Framework Agreement with Pasar Sapa.
ION Services
Catalogue · CDS · Policy Registry. Quietly in the background — consulted, never blocked on.
02 The picture

Time flows top to bottom.

Fourteen phases. Trade messages in rust. Logistics messages in teal. Unsolicited status pushes in amber, dashed. The off-network payment leg in muted grey, also dashed — ION never carries the money itself.

End-to-end ION transaction sequence Sequence diagram across five lanes — Consumer, BAP (Pasar Sapa), BPP-Trade (Toko Elektronik), BPP-Logistics (JNE), and ION Services — showing catalog discovery, Trade select-init-confirm, payment, Logistics select-init-confirm with linkedContractId, transit status events, delivery, and reconcile. Consumer Andi · Surabaya BAP Pasar Sapa trade + logistics BPP · Trade Toko Elektronik Jakarta merchant BPP · Logistics JNE LOG-PARCEL ION Services Catalogue · CDS Policy registry Phase 01 · Catalog (background) /catalog/publish Toko Elektronik publishes products + policy IRIs /catalog/publish JNE publishes rate logic + coverage /on_subscribe → catalogs Pasar Sapa keeps a fresh local index Phase 02 · Browse search "smartphone" Andi opens Pasar Sapa, finds Toko Elektronik Phase 03 · Trade · /select → /on_select /select item, qty=1, drop pincode 35-XXX /on_select quote.breakup: ITEM 5,000,000 · TAX (PPN 11%) 553,850 Phase 04 · Trade · /init → /on_init + payment /init full address, payment intent QRIS, gift wrap /on_init payment.settlement_details = QRIS string scan QRIS · pay via GoPay off-network settlement (BI-FAST rail) payment confirmed PSP webhook → BPP-Trade Phase 05 · Trade · /confirm → /on_confirm /confirm consumer identity, paymentReference /on_confirm contract ACTIVE · fakturPajakReference · fulfillingLocationId Phase 06 · Logistics · /select → /on_select /select pickup Jakarta · drop Surabaya · 1.2 kg · NEXT_DAY · declared 5,000,000 /on_select binding rate 35,000 · quoteValidityWindow PT1H Phase 07 · Logistics · /init → /on_init /init pickup + drop addresses · payment terms (FWA Pasar Sapa × JNE 2026Q2) /on_init FWA validated · settlement preview Phase 08 · Logistics · /confirm → /on_confirm · links to Trade contract /confirm contractAttributes.linkedContractId = TRADE/2026/0429/A1F2 /on_confirm Logistics contract ACTIVE · awbNumber JNE-2026-7K3M9X Phase 09 · Pickup events /on_status [DISPATCHED] awbNumber · trackingUrl · estimatedDeliveryTime /on_status [PICKED_UP] agentName · phoneProxy · vehiclePlate Phase 10 · Transit · /track + on_status /on_status [IN_TRANSIT] at Jakarta hub · P2H2P routing /track request live GPS handle /on_track WebSocket URL streams live coordinates /on_status [OUT_FOR_DELIVERY] Phase 11 · Delivered /on_status [DELIVERED] deliveryProofUrl (photo) · ageVerification N/A /update [DELIVERED] Trade contract → COMPLETE push: "delivered" Phase 12 · Rating 5★ + comment /rate (PROVIDER, ITEM) /rate (FULFILLMENT, AGENT) Phase 13 · Trade · /reconcile /reconcile (try=true) preview settlement statement /on_reconcile PPN remittance + PLATFORM_FEE + bukti potong /reconcile (commit) Phase 14 · Logistics · /reconcile (batched) /reconcile (isBatch=true · period=2026-04) /on_reconcile FWA volume rebate · weight-dispute adjustments · NTPN refs /reconcile (commit) Epilogue Both contracts SETTLED. Trade contract TRADE/2026/0429/A1F2 · Logistics contract LOG/2026/0429/J7K9 Linked, settled, audit-ready — under terms ratified by the ION Council. 32 messages · 2 sectors · 5 actors
fig. 01 Each phase is a banded block on the rail. Scroll horizontally on small screens.
03 Catalog & browse

The background, already done.

By the time Andi opens Pasar Sapa, the heavy lifting has already happened. BPPs publish to the network and BAPs keep a fresh local index — search runs against the index, not against the live network.

01 · Catalog
Toko Elektronik publishes products with halal status, BPOM refs, and return-policy IRIs. JNE publishes rate logic and provincial coverage. Pasar Sapa subscribes once.
02 · Browse
Andi opens the app. Search runs against the local index — no live network call. The listing appears with its declared availability.status.
04 Trade contract

Quote, bind, settle the intent.

Three phases turn a search hit into a Trade contract. The price carries PPN at the rate sourced from current PMK; the address carries the consumer's full Surabaya postal; the QRIS string rides over BI-FAST. ION never touches the money.

03 · /select
BAP submits item, qty, and drop pincode. BPP returns a quote with structured breakup including PPN.
04 · /init + payment
Full address + payment intent. BPP returns a QRIS string. Settlement flows over BI-FAST off-network.
05 · /confirm
Payment lands at PSP, BAP confirms. Toko Elektronik returns Faktur Pajak ref + warehouse. Trade contract ACTIVE.
05 Logistics contract

The second contract, linked to the first.

Pasar Sapa now wears its Logistics-BAP hat and calls JNE. Three more phases — the same shape as Trade — but the /confirm here carries contractAttributes.linkedContractId, pointing back at the Trade contract. That single field stitches the two halves of the transaction together.

06 · /select
Actual shipment profile — pickup, drop, weight, declared value. JNE returns a binding rate with a quote validity window.
07 · /init + FWA
BAP attaches the active logistics-fwa reference (Pasar Sapa × JNE 2026 Q2). The FWA's commercial envelope supersedes per-offer policies.
08 · /confirm + link
Carries linkedContractId = TRADE/2026/0429/A1F2. JNE returns an AWB; Logistics contract ACTIVE.
06 Transit & delivery

Status pushes, live tracking, the door.

Three phases of status events stitched between two contracts. Phone numbers are proxied — direct numbers never on the wire. The delivered photo closes both contracts; Andi gets a push.

09 · Pickup events
BPP-Trade pushes DISPATCHED with the AWB. JNE collects from the warehouse and pushes PICKED_UP with proxy phone numbers.
10 · Transit
JNE routes through Jakarta hub (P2H2P). Pasar Sapa opens a /track session for live GPS in addition to coarse status pushes.
11 · Delivered
JNE pushes DELIVERED with a delivery-proof photo. BAP relays via /update; Trade contract → COMPLETE.
07 Settlement

Money, with proof.

Rating, then reconcile. Trade reconciles per-contract with PPN remittance and bukti potong refs. Logistics doesn't scale at per-shipment granularity, so it reconciles monthly batches with FWA rebates applied.

12 · Rating
Andi rates once. Pasar Sapa splits into Trade ratings (PROVIDER, ITEM) and Logistics ratings (FULFILLMENT, PACKAGE_CONDITION, AGENT_BEHAVIOUR).
13 · Trade reconcile
BAP previews, then commits. /on_reconcile carries PPN remittance, platform fee, and bukti potong references — everything an auditor needs.
14 · Logistics reconcile
Per-shipment reconcile doesn't scale at marketplace volume — Logistics settles monthly with isBatch=true, applying FWA volume rebates and weight-dispute adjustments.

The link is the whole point. Every Logistics contract carries contractAttributes.linkedContractId — so when the BAP queries either side, the network can stitch the full story together: who bought what, who shipped it, what was charged, and what was settled.