redirectUrl after completing or abandoning the flow.
The API validates that the action is still needed before creating a session. If the action is already done (e.g. the target user has already signed the contract, or payment is already completed), the request returns 400 with a structured error (error.code, error.user_message). Use these to show a clear message in your app instead of redirecting to checkout.
Path Parameters
string
required
Escrow ID
Request Body
string
required
The action the user will perform. Must be one of:
sign_contract, accept_pay, complete, dispute, request_cancellation, reject_cancellation, accept_cancellation, cancel_escrow, submit_proof, review_proof, add_funds, refund_funds, approve_release, reject_release. If the action is already done (e.g. contract already signed, payment already made), the API returns 400 with a business rule error—see Error Responses below.Cancellation actions (paid or delivered escrows):request_cancellation— Buyer only. Target the buyer’s email. The buyer cannot cancel unilaterally after payment; they request cancellation and the seller must accept or reject.cancel_escrow— Seller only. Target the seller’s email. Cancels immediately and refunds the buyer when applicable.reject_cancellation/accept_cancellation— Target the seller’s email (counterparty of the buyer who requested). Create these only after a pending cancellation request exists.- Targeting the wrong party returns 400 (
CANCELLATION_REQUEST_BUYER_ONLY,CANCEL_ESCROW_SELLER_ONLY, orCHECKOUT_TARGET_NOT_BUYER/CHECKOUT_TARGET_NOT_SELLER).
add_funds— Buyer only. Target the buyer’s email. The buyer adds more money from their DHMAD wallet into the escrow. Fees apply to the added amount only. Requires action step-up on checkout. Not supported for escrows paid via guest checkout.refund_funds— Seller only. Target the seller’s email. The seller refunds part or all of the remaining ledger balance to the buyer’s wallet. Refunding the full remaining balance cancels the escrow. Requires action step-up on checkout. Not supported for guest-checkout escrows.- Targeting the wrong party returns 400 (
CHECKOUT_TARGET_NOT_BUYER/CHECKOUT_TARGET_NOT_SELLER).
approve_release— Client only. Target the buyer’s email and pass the payout request inmetadata.requestId. Releases that period to the seller immediately. Requires action step-up on checkout.reject_release— Client only. Same targeting andmetadata.requestId. Opens a dispute scoped to that period; the amount stays reserved and later periods keep running. No step-up (no money moves).- Both require a progressive-release escrow (created with a
progressiveReleaseobject) and apendingpayout request. The seller never acts on these — payout requests are created by your backend, optionally on the seller’s behalf.
- standard — all actions apply when status allows (except proof actions).
completeworks frompaidordelivered; seller deliver is optional.add_funds/refund_fundsapply whenpaidordelivered. - quick — no contract;
sign_contractreturns 400 (QUICK_ESCROW_NO_CONTRACT). Typical flow:accept_pay, then buyercomplete. Seller may call Deliver Escrow first, but the buyer cancompletedirectly frompaidwithout deliver. With Quick Escrow with Proof, usesubmit_proof(seller) andreview_proof(buyer) whileproofInfo.phaserequires them; early release frompaidis blocked until proof is accepted.add_funds/refund_fundsapply whenpaidordelivered. - instant — only
accept_pay(and dispute/cancellation actions) are valid;sign_contract,complete, proof actions, and funds adjustments return 400.
complete action: Buyer releases funds. Valid when escrow status is paid or delivered. Does not require the seller to call deliver first — the buyer can release early from paid if they are satisfied. Returns 409 (PROOF_NOT_ACCEPTED) for Quick Escrow with Proof when proof is not yet accepted.string
required
Email of the user who will perform the action. Only this user can complete the session.
string
required
URL to redirect the user after they complete or abandon the flow. Must match one of your allowed redirect URLs configured in the developer dashboard. Must use HTTPS (except
http://localhost for development).object
Optional key-value pairs (strings only). Useful for tracking orders or internal references. Values must be 500 characters or less.
Response Fields
No KYC check is performed when creating a checkout session. You can create an
accept_pay session regardless of the buyer’s KYC status. If the buyer does not have approved KYC, they will be prompted to complete identity verification inside the DHMAD checkout flow (inline Verify KYC) before they can complete Accept & Pay. You do not receive a separate error code for KYC at session creation time.Error Responses
When a request is rejected because of a business rule (e.g. the action is already done, or redirect URL is invalid), the API returns 400 Bad Request with anerror object. Use error.code to branch in your app and error.user_message to show a clear message to the end user; error.message is for developers and logging. The table below lists all error codes returned by this endpoint.
Business rule error shape (400)
Example: contract already signed
response.error?.code and displaying response.error?.user_message to the user instead of redirecting to checkout.
401 Unauthorized
403 Forbidden
404 Not Found
Escrow Not FoundSessions expire 30 minutes after creation. Ensure users complete the flow within this window, or create a new session if needed.
For escrows created with
mode: "instant", only the accept_pay action (and dispute/cancellation actions) is valid. Do not use sign_contract or complete; they will return 400. After the buyer pays, deliver the digital goods and call Deliver Escrow to auto-complete and release funds.