Skip to main content
Research Preview — Code snippets need testing against actual implementation.

Delivery Verification

Build an escrow contract that releases payment only when the delivery is confirmed at the correct location.
About location verification: This guide uses GPS coordinates as input. GPS is spoofable. We’re working on Location Proof plugins that will replace Geolocation.getCurrentPosition for stronger verification — these are still in development.

Concept

A trustless delivery system where:
  • Buyer locks payment in escrow
  • Delivery person proves they arrived at the destination
  • Escrow releases automatically on location verification

Step 1: The Escrow Contract


Step 2: Buyer Flow

This code runs on the buyer’s client (web app or mobile app) when they create a delivery order.

Step 3: Courier Flow

This code runs on the courier’s mobile app when they arrive at the delivery location.

Step 4: Mobile App Integration


Enhanced Features

Multi-Signature Confirmation

Require both courier arrival AND buyer confirmation:

Dispute Resolution

Add an arbiter role for disputes:

Back: Use Cases

See more use cases