standard(default) — contract + sign + pay + deliver + complete. Use withsellerEmailfor escrows between two parties.quick— no contract; pay → deliver → buyer confirms. Use withsellerEmailfor product sales without a contract. Optionally addfulfillmentPolicyfor Quick Escrow with Proof (seller uploads proof before delivery).instant— no contract; you are the seller (omitsellerEmail); pay → deliver auto-completes. Use for in-app digital goods.
contract is null.
Request Body
Title of the escrow (1–200 characters).
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.Face currency:
"TND" (default), "USD", or "EUR". Ledger, fees, and payouts use amountTnd (TND) locked at creation.Email of the buyer. They will be invited to register if they do not have an account.
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.
"standard" (default), "quick", or "instant". See Escrow Modes.- standard — requires
contractTermsandestimatedDeliveryDays; creates a contract. - quick — requires
estimatedDeliveryDays; do not sendcontractTermsorautoSign. - instant — only when you are the seller (omit
sellerEmail); do not sendcontractTermsorautoSign;estimatedDeliveryDaysoptional.
Required when
mode is "standard" or "quick". Minimum 1 day. Optional for "instant" (defaults to 1).Required when
mode is "standard". Contract text (max 10,000 characters). Not allowed for "quick" or "instant".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.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. This amount is deducted from the seller’s payout (in addition to the platform fee). 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.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.
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 (paid by seller) and, if you setdeveloperFeePercentage when creating the escrow, the application / app fee (with your app name when configured). Sellers see the total deductions before completing the flow.
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: