← all adapters

escrow-style

simulates Escrow.com API 2017-09-01

restadapter v0.1.09 routes

verification

VMVM tier — no SDK suite yet· surface 9 · not implemented 3 · differs 4

use it

# add to stunt.yaml
services:
  escrow:
    adapter: embedded:escrow-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Escrow.com API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Escrow.com API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Escrow.com API 2017-09-01 surface — the data is fake, the behavior is real.

backing stores

transactionscustomer

api surface (9)

generated from the adapter manifest — exactly what boots, nothing more

9 routes
GET/2017-09-01/customer/me
GET/2017-09-01/transaction
POST/2017-09-01/transaction
GET/2017-09-01/transaction/reference/{reference}
GET/2017-09-01/transaction/{id}
PATCH/2017-09-01/transaction/{id}
POST/2017-09-01/customer/me/webhook
GET/2017-09-01/customer/me/webhook
POST/sim/transaction/{id}/fund

VM-verified behaviors (31)

  • missing, Bearer, and malformed Authorization are 401s with the challenge header
  • the documented credentials unlock the customer record
  • the gate covers the transaction and webhook surfaces alike
  • create assigns the first numeric id, stamps creation_date, and defaults currency
  • the initiating party is auto-agreed; the counterparty is not
  • items carry the 2017-09-01 defaults and schedule amounts as decimal strings
  • the default escrow fee is 3.25% charged to the buyer
  • get by id returns the same shape — amounts survive the store round trip
  • unknown ids are 404s keyed on the id field
  • party validation answers the nested Escrow field errors
  • amounts parse from decimal strings identically to numbers
  • multi-entry schedules sum into the default fee
  • a caller-supplied fee split is honored, in the schedule's dollar units
  • an unparseable amount stores 0.00 rather than 400ing (deviation, asserted as-is)
  • a non-JSON body is a 400 body error, not a 500
  • the default page returns every transaction in creation order
  • per_page slices; page walks the remainder; past the end is empty
  • junk pagination params fall back to the defaults (page 1, per_page 10)
  • a reference resolves to its transaction
  • an unknown reference is a 404 keyed on the reference field
  • agree needs a party's email and rejects strangers
  • funding waits for every party's agreement
  • the counterparty's agreement unlocks funding; every schedule entry secures
  • accept flips every item and stamps close_date off the virtual clock
  • PATCH actions and funding on unknown ids are 404s
  • ship marks the item shipped, receive marks it received
  • cancel flags every item and the transaction itself, without closing it
  • unknown or missing actions are 400s on the action field
  • registration assigns integer ids and echoes the URL
  • the list carries every registered webhook
  • a missing or blank url is the can't-be-blank field error

Not implemented (3)

  • No list filters on GET /2017-09-01/transaction (status, date, email)
  • No reject or return-item actions (agree/accept/ship/receive/cancel exist)
  • No fee calculation endpoint (/2017-09-01/transaction/fees)

Differs from the real API (4)

  • POST /sim/transaction/{id}/fund is a simulator-only affordance for hosted-page funding
  • List returns {transactions:[...]}; real Escrow.com returns a bare array
  • An unparseable schedule amount stores 0.00 instead of a 400 field error
  • ship/receive/cancel are not gated on agreement or secured funds
want more of the Escrow.com API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.