Back to home

FAQ

Developer FAQ

Short answers for integrating the DHMAD escrow API. Full reference: docs.dhmad.tn · API base https://dhmad.tn/api/v1.

How do I get API keys?

Apply at developer.dhmad.tn, get approved, then create keys in the dashboard. Use sk_sandbox_* for testing and sk_live_* for production. Send the key as Authorization: Bearer <key> to https://dhmad.tn/api/v1.

What is the difference between sandbox and live?

Sandbox keys (sk_sandbox_*) hit sandbox.dhmad.tn with test data and no real money. Live keys (sk_live_*) hit https://dhmad.tn/api/v1 and process real escrow payments. Never mix environments or commit live keys.

How do webhooks work?

Register an HTTPS endpoint in the portal and subscribe to events (escrow status, identity verification, etc.). DHMAD POSTs signed JSON; verify X-Webhook-Signature (HMAC) before acting. Retry and delivery logs are in the dashboard.

How do I use OAuth with DHMAD?

Create an OAuth client in the portal, redirect users to DHMAD authorize, then exchange the code for tokens server-side (keep the client secret off the browser). Use OAuth for user login/consent; use API keys for server-to-server escrow calls.

What are the API rate limits?

Default API v1 limit is about 100 requests per minute per IP. Per-key limits can be configured on the API key. Exceeding the limit returns 429 — back off and retry. Contact support if you need a higher quota.

What is the escrow lifecycle?

Typical flow: create escrow → buyer funds (accept_pay) → optional seller deliver → buyer completes/releases funds. Instant escrows complete on seller deliver after funding. See docs for checkout sessions, proof, and add/refund funds.

How does identity verification (KYC) work for developers?

Use the Identity Verifications API to start Didit KYC before a user has a DHMAD account. Webhooks report status; when the user registers with the same email, approved KYC links automatically. Full guide: https://docs.dhmad.tn.

Where is the API base URL?

Production base URL is https://dhmad.tn/api/v1 (not api.dhmad.tn). Sandbox uses https://sandbox.dhmad.tn/api/v1. Interactive docs: https://docs.dhmad.tn.

Where can I find documentation and examples?

Start at https://docs.dhmad.tn (introduction, guides, API reference). Manage keys, webhooks, and OAuth in this portal. Platform help for end users is on https://dhmad.tn.

How do I add DHMAD to WooCommerce?

Download the official plugin from /woocommerce (not wordpress.org). In WordPress go to Plugins → Add New → Upload Plugin, activate DHMAD for WooCommerce, then paste a sandbox API key under WooCommerce → Settings → Payments → DHMAD. Place Order sends shoppers to hosted checkout; a signed webhook marks the order paid.

How do I add DHMAD to PrestaShop?

Download the official module from /prestashop (not PrestaShop Addons). In the back office go to Modules → Module Manager → Upload a module, drop the zip, click Configure, then paste a sandbox API key and save. Place order sends shoppers to hosted checkout; a signed webhook moves the order to Payment accepted. PrestaShop 1.7.7+, 8, and 9 are supported.

Still stuck? Email [email protected] or browse the documentation.