feeBearer (default "seller").
Choose the escrow mode based on your use case — see Escrow Modes for a full comparison:
standard(default) — contract + sign + pay + complete. Seller deliver is optional. Use withsellerEmailfor escrows between two parties.quick— no contract; pay → buyercompleteto release funds. Seller deliver is optional. Use withsellerEmailfor product sales without a contract. Optionally addfulfillmentPolicyfor Quick Escrow with Proof (seller uploads proof before delivery unlocks).instant— no contract; you are the seller (omitsellerEmail); pay → deliver auto-completes. Use for in-app digital goods.
progressiveRelease to standard or quick mode so one funded escrow pays out per billing period — see Progressive Release.
Developer fee is only for when the seller is a third party (not your associated account); you can set a developer fee percentage so that a portion of the transaction is credited to your associated user account when the escrow completes.
Fee bearer (feeBearer)
Platform fees (and any developer fee) can be paid by either party:
Use
buyerFundingTnd (returned on create/get) when sizing wallet locks, checkout amounts, and KYC thresholds — not amountTnd alone when feeBearer is buyer. Cancel / full refunds return the buyer’s full funding, including fees when the buyer bore them.
contract is null.
Request Body
string
required
Title of the escrow (1–200 characters).
number
required
Commercial face amount in
currency. After FX lock, standard and quick modes require internal ledger value (amountTnd) of at least 5 TND; instant mode requires at least 0.01 TND.string
Face currency:
"TND" (default), "USD", or "EUR". Ledger, fees, and payouts use amountTnd (TND) locked at creation.string
required
Email of the buyer. They will be invited to register if they do not have an account.
string
Email of the seller. If omitted, your developer account’s associated user account is used as the seller (required for instant mode). If provided, the seller is that user or an invite. Use standard or quick mode for escrows between two other parties.
string
"standard" (default), "quick", or "instant". See Escrow Modes.- standard — requires
contractTerms; creates a contract. - quick — do not send
contractTermsorautoSign. - instant — only when you are the seller (omit
sellerEmail); do not sendcontractTermsorautoSign.
string
Who pays the platform service fee (and TVA) and the developer fee.
"seller" (default) or "buyer". When "seller", fees are withheld from the seller at release and the buyer funds the deal amount only. When "buyer", fees are added to the buyer’s funding amount and the seller receives the full deal amount.number
Legacy optional delivery estimate (minimum 1 if provided). Not used by platform enforcement; omit for new integrations. Timing is driven by fulfillment deadlines, completion deadlines, and
contractTerms prose instead.string
Required when
mode is "standard". Contract text (max 10,000 characters). Not allowed for "quick" or "instant".boolean
Default
false. If true, the contract is automatically signed by the seller using the signature configured in the developer dashboard. Requires a signature to be set up first. Auto-sign is only available when you are the seller (omit sellerEmail so your associated user account is used). Do not combine autoSign: true with sellerEmail. Not applicable for "quick" or "instant" modes.number
Optional percentage (0–25) of the escrow amount, credited to your developer account’s associated user when the escrow completes. Only allowed when the seller is a third party (not your associated user account). Not allowed when the seller is your associated account (whether you omit
sellerEmail or pass that same email); if violated, the API returns 400. Default is 0. When feeBearer is "seller" (default), this amount is deducted from the seller’s payout (in addition to the platform fee). When feeBearer is "buyer", it is included in the buyer’s funding instead. If you set a value greater than 0, your developer account must be associated with a user account in the developer dashboard; otherwise the request returns 403 Forbidden.object
Quick Escrow with Proof — only allowed when
mode is "quick". Requires the seller to upload purchase/shipment proof after the buyer pays; the buyer reviews on DHMAD before delivery is unlocked. See the Quick Escrow with Proof guide.type(required when set) — must be"purchase_proof_required".proofUploadDeadlineHours— hours for seller upload after funding (must be within platform bounds, default 6–72h; returns 400 if out of range; default 24h when omitted).buyerReviewDeadlineHours— hours for buyer review (same bounds; auto-accept if buyer does nothing).allowedProofTypes— optional UI hints:receipt,order_confirmation,product_photo,tracking_proof,other. Informational only; DHMAD does not enforce uploads against this list.
object
Hourly / recurring contracts — allowed for
standard and quick modes (returns 400 for instant). Lets one funded escrow pay out in slices, one per billing period. See the Progressive Release guide.Presence of this object is the opt-in. Do not send enabled (or any other unknown key) — the schema is strict and those requests return 400.autoApproveHours— how long the client has to review each payout request before it releases automatically. Must be within platform bounds (default 12–336h; returns 400 if out of range). Defaults to 48h when omitted.minReleaseTnd— smallest payout slice in TND. Clamped to at least the platform minimum (5 TND).
CONSENT_REQUIRED.Progressive release (hourly contracts)
WhenprogressiveRelease is set:
- Buyer pays via
accept_payand accepts automatic release. - Your backend claims each period with POST /escrows/:id/release-requests — permitted on the seller’s behalf, so the freelancer takes no weekly action.
- The client approves (
approve_release), rejects (reject_release, which disputes that period only), or lets it auto-release at the deadline. - Top up the same escrow with
add_fundswhen the balance runs low; a zero balance keeps the escrow open. - End the contract with POST /escrows/:id/close, which settles owed periods and refunds the remainder.
status remains paid across every partial payout; track progress with availableForReleaseTnd, reservedTnd, and the escrow.release_request.* webhooks.
Quick Escrow with Proof
WhenfulfillmentPolicy.type is purchase_proof_required:
- Buyer pays via
accept_paycheckout session. - Seller uploads proof via
submit_proofcheckout session. - Buyer reviews via
review_proofcheckout session (or proof auto-accepts after deadline). - Seller delivers only after proof is accepted (
proofInfo.phaseisacceptedoraccepted_by_timeout). - Fetch proof files with GET /escrows/:id/proof; subscribe to
escrow.proof.*webhooks.
status remains paid during the proof gate; use proofInfo.phase and proof webhooks for progress.
Response Fields (escrow object)
Checkout page and fees
When you redirect users to a Checkout Session, the DHMAD checkout page shows the platform service fee and, if you setdeveloperFeePercentage when creating the escrow, the application / app fee (with your app name when configured). Which party pays those fees follows feeBearer. Use buyerFundingTnd for the amount the buyer actually pays.
Errors
400 Bad Request – Instant mode with third-party seller
Whenmode is "instant" and sellerEmail is provided:
sellerEmail for escrows between two other parties.
400 Bad Request – Contract terms on quick/instant mode
Whenmode is "quick" or "instant" and contractTerms is provided:
400 Bad Request – Developer fee when seller is your associated account
WhendeveloperFeePercentage is greater than 0 and the seller (resolved from the request) is your developer account’s associated user:
developerFeePercentage or set it to 0 when you are the seller (or when the seller email is your associated account).
400 Bad Request – Auto-sign not allowed
WhenautoSign is true but the seller is not your associated user account (for example, you provided sellerEmail for a third party, or the seller has not registered yet):
- No signature configured in the developer dashboard.
- Developer account not associated with a user account (when
sellerEmailwas provided for a third party). sellerEmailrefers to a user who has not registered yet (seller must sign after registering).
sellerEmail, set up your signature in the Developer Dashboard, and ensure your developer account is associated with your DHMAD user account.
403 Forbidden – Developer fee without associated user
If you senddeveloperFeePercentage greater than 0 and your developer account has no associated user account:
403 Forbidden – No seller and no associated user
If you omitsellerEmail and your developer account has no associated user: