Platform Technology

API Flow — Escrow + Wallet System

Complete API documentation for developers integrating with DiGiFaMaR's escrow-protected marketplace

Complete API Flow

The DiGiFaMaR API follows a secure 6-step process from product search to escrow release, with automatic refund protection built in.

GET /api/products

Search products by query and location

POST /api/orders

Create a new order between buyer and farmer

POST /api/escrow/pay

Funds locked in escrow

6-digit escrow code generated

Farmer wallet updated (status: pending)

POST /api/orders/confirm-receipt

Buyer confirms delivery, triggering escrow code generation

POST /api/escrow/release

Farmer enters 6-digit code → Funds released instantly to farmer wallet

POST /api/escrow/refund

Automatic trigger after 24 hours if delivery not confirmed. Full refund processed to buyer's payment method.

Authentication

All API requests require JWT Bearer token authentication