Skip to main content

Cancellations, Refunds, Notifications

How to stop work mid-way, settle money, stream live events, and export data.

C
Written by Catalin Fetean
Updated over 3 weeks ago

Audience: Admins, Finance, Devs, Support, Compliance
Outcomes: Clean end states; real-time UX; flexible exports & evidence bundles

Cancel orders & refunds

  • Mutual cancellation: both parties confirm; unreleased escrow refunded to buyer; status → Completed (or Resolved if via dispute)

  • Refunds: trigger at provider; webhook updates order; partial refunds adjust invoices/ledger

  • Avoid: deleting orders — always use the cancel flow for audit

Notifications & live events (SSE)

const es = new EventSource('/api/events/stream', { withCredentials: true }); ['order.status.changed','deliverable.uploaded','deliverable.rejected','milestone.released'].forEach(name => { es.addEventListener(name, e => console.log(name, JSON.parse(e.data))); });

Event names:
order.created, order.status.changed, deliverable.uploaded, deliverable.accepted, deliverable.rejected, milestone.released, payment.succeeded, payment.failed

Reporting, exports & audit trail

  • Exports: CSV/JSON of orders (totals, milestones, statuses, references); deliverables listing (file names, hashes, submitters, timestamps); invoice ledger

  • Evidence bundles: include contract link, deliverables, acceptance decisions, releases, disputes

QA checklist

  • Cancellation issues refunds for unreleased funds only

  • SSE stream connects with credentials and logs events in real time

Runbook: “SSE not firing”

  • Fix CORS/credentials (withCredentials:true), verify cookie, ensure server emits events

Did this answer your question?