Skip to main content
This guide will walk you through setting up your developer account and making your first API call.

Step 1: Create a Developer Account

  1. Visit the Developer Portal
  2. Fill out the application form with:
    • Company information
    • Contact details
    • Project description
    • Expected transaction volume
  3. Submit your application
Applications are reviewed by our team. You’ll receive an email once your application is approved.

Step 2: Set Up Your Account

Once approved, you’ll receive an email with a setup link:
  1. Click the setup link in your email
  2. Create your developer account password
  3. Choose a username
  4. Complete your account setup

Step 3: Associate User Account

To use the API, you need to associate your developer account with a user account:
  1. Log into the Developer Dashboard
  2. Click “Associate User Account”
  3. Enter the email address of your DHMAD user account
  4. Check your email and click the verification link
  5. Your accounts are now associated
The user account must have email verification completed before you can create escrows via the API. Phone verification is only required when the buyer accepts and pays, not at escrow creation.
The user account is used for creating escrows and managing transactions. Make sure you have a DHMAD user account before associating.

Step 4: Generate API Keys

  1. Navigate to the API Keys section in your dashboard
  2. Click “Create API Key”
  3. Give your key a descriptive name (e.g., “Production App”)
  4. Copy your API key immediately - it won’t be shown again!
Keep your API keys secure! Never commit them to version control or share them publicly. Treat them like passwords.

Step 5: Make Your First Request

Now you’re ready to make your first API call. You can test endpoints in two ways:

Option A: Use the Interactive API Explorer

The easiest way to test the API is using our Interactive API Explorer (Swagger UI):
  1. Go to API Explorer in your dashboard
  2. Click “Authorize” at the top
  3. Enter your API key (use Bearer {your_key} format)
  4. Browse and test any endpoint directly from your browser
The API Explorer automatically includes your API key in requests and shows you the exact request/response format for each endpoint.

Option B: Use cURL or Your HTTP Client

You can also make requests using cURL, Postman, or any HTTP client. Let’s get your account balance:
curl -X GET https://dhmad.tn/api/v1/balance \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json"
Testing first? Use the sandbox: replace the URL with https://sandbox.dhmad.tn/api/v1 and use a sk_sandbox_ API key from developer.dhmad.tn (sandbox keys are created in the same developer portal).
{
  "balance": {
    "available": 0,
    "pending": 0,
    "escrow": 0
  }
}

Step 6: Set Up Webhooks (Optional)

To receive real-time notifications when escrow status changes or identity verification completes:
  1. Create a webhook endpoint in your application
  2. Add the webhook URL in the Developer Dashboard
  3. Verify webhook signatures for security
See the Webhooks Guide for complete setup instructions.

Verify users before DHMAD signup (Optional)

If your marketplace needs sellers verified before they create a dhmad.tn account, use the Identity Verifications API. DHMAD emails the user a Didit link (never returned to your API) and links KYC when they register with the same email.

Next Steps


You can authenticate using either Authorization: Bearer header or X-API-Key header. Both methods are supported.