Skip to main content
Use Quick Escrow with Proof when a buyer pays upfront but the seller must prove they purchased or shipped the item before delivery is unlocked — common for marketplaces, crowd-shipping, and product-deal apps.

What is fulfillmentPolicy?

fulfillmentPolicy is an optional object on create escrow (POST /api/v1/escrows). It is only valid when mode is "quick". Set:
While proof is in progress, escrow status stays paid. Track the proof lifecycle with proofInfo.phase and proof webhooks — not with status changes.
In the API Explorer, expand POST /v1/escrows, click Try it out, and select the Quick mode with purchase proof request example.

Proof lifecycle

After accepted or accepted_by_timeout, the buyer may release funds with a complete checkout session from paid, or the seller may call deliver first (optional) and the buyer completes from delivered. The seller’s deliver call returns 409 (PROOF_NOT_ACCEPTED) until proof is accepted.

Step-by-step integration

1. Create the escrow (server-side)

Never expose your API key in the browser.
See Create Escrow for all fields.

2. Buyer funds the escrow

Redirect the buyer with an accept_pay checkout session. Once funded, proofInfo.phase becomes waiting_seller_proof and you receive escrow.proof.required.

3. Seller uploads proof

Create a checkout session with action: "submit_proof" and redirect the seller:
On submit, phase becomes submitted_waiting_buyer_review and you receive escrow.proof.submitted.

4. Buyer reviews proof

Create a review_proof session for the buyer:
The buyer can accept or request corrections. After max correction rounds, DHMAD reviews (escrow.proof.needs_review). If the buyer does nothing before the deadline, proof is auto-accepted (escrow.proof.accepted_by_timeout).

5. Show proof on your site

Call GET /api/v1/escrows/:id/proof to fetch proof metadata and time-limited viewUrl links you can embed in your UI. Raw storage keys are never returned. Proof webhooks also include viewUrl on each attachment, plus checkoutActions suggesting the next checkout session to create.

6. Handle proof webhooks

Subscribe to proof events in the Developer Dashboard (or handle them in your webhook handler): See Webhooks for payload details.

Tips

  • Use sandbox keys and sandbox.dhmad.tn for development.
  • Prefer webhooks for state; use GET /proof when you need to render attachments.
  • Accepting proof unlocks delivery — it does not certify goods; disputes remain available.
  • GET /api/v1/escrows/:id returns fulfillmentPolicy and sanitized proofInfo (phase, deadlines) but not file URLs — use GET /proof or webhooks for viewUrl.