Skip to main content
During the 72-hour hold, the payer can open a dispute on a charge. While it is open, the charge has fundsStatus: "disputed", its release to your wallet waits, and Refund Charge returns 409 CHARGE_DISPUTED. Accept the dispute to settle it yourself: DHMAD refunds the payer everything still refundable, with reason dispute_accepted, and closes the dispute. There is no amount — accepting always refunds what is left (a partial refund you made earlier is not refunded again).

Dispute deadline

Disputes work like PayPal’s: the payment stays held, you and the payer talk it out, and DHMAD decides only if one of you asks.
  1. When the payer opens a dispute, the two of you have 20 days to settle it on the dispute thread (dhmad.tn → Support, the DHMAD app, or the Disputes API). Messages on the thread never move or reset this deadline. You can accept the dispute, or refund, at any time. Your business’s owner and admins get an email and a notification with the closing date; the payer gets reminders 3 days and 1 day before it.
  2. Before the 20 days end, either side can ask DHMAD to decide (a button on the dispute thread and on the payer’s protect page, or Escalate Dispute). You then have 7 days to send DHMAD your side on the thread. If you don’t, DHMAD refunds the payer in full: the refund has reason: "dispute_unanswered" and initiatedBy: "dispute_timeout", and you receive charge.refunded. Once your side is in, DHMAD decides and either refunds the payer or releases the payment to you.
  3. If nobody asks DHMAD to decide within the 20 days, the dispute closes and the payment is released to your wallet: you receive charge.funds.released.
DHMAD can also take a dispute for review at any time. charge.dispute.stage, closesAt, escalatedBy and merchantReplyBy say where the dispute stands. :id accepts the DHMAD charge id or your merchantReference. Accepting from the dashboard does the same thing. The refund comes out of the held payment, so DHMAD’s fee on it is waived, and the payer gets the money back the same way as any refund (see How the payer gets the money back). You receive the charge.refunded webhook, then charge.refund.updated as the refund completes. To read the thread and reply to the payer from your own tools, use the Disputes API. A dispute there with actions.accept: true is accepted with this endpoint, using its charge.id.
This is the dispute the payer opens with DHMAD. A dispute the payer opens with PayPal or their bank is a chargeback, which PayPal decides — see Chargebacks.

Who opened the dispute

charge.dispute says who reported it, what they wrote, and when. The same object is on Get Charge and on the charge.dispute.opened webhook, so you can show it before deciding.

Idempotency

Send an Idempotency-Key header so a retried request returns the original refund with 200 and "idempotentReplay": true. Without one, DHMAD uses a single key per charge — the one the dashboard uses too — so a retry, or an accept from both the dashboard and the API, never refunds twice. A retry with a different note returns 409 IDEMPOTENCY_KEY_REUSED.

Request body

The body is optional; an empty body accepts the dispute.
string
Message posted on the dispute for the payer (max 500 characters). Also kept with the refund.

Path Parameters

string
required
Charge id or merchantReference.

Errors

Errors carry the code in error and code, with a readable message: