Step 1: Create a Developer Account
- Visit the Developer Portal
- Fill out the application form with:
- Company information
- Contact details
- Project description
- Expected transaction volume
- Submit your application
Step 2: Set Up Your Account
Once approved, you’ll receive an email with a setup link:- Click the setup link in your email
- Create your developer account password
- Choose a username
- Complete your account setup
Step 3: Associate User Account
To use the API, you need to associate your developer account with a user account:- Log into the Developer Dashboard
- Click “Associate User Account”
- Enter the email address of your DHMAD user account
- Check your email and click the verification link
- Your accounts are now associated
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
- Navigate to the API Keys section in your dashboard
- Click “Create API Key”
- Give your key a descriptive name (e.g., “Production App”)
- Copy your API key immediately - it won’t be shown again!
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):- Go to API Explorer in your dashboard
- Click “Authorize” at the top
- Enter your API key (use
Bearer {your_key}format) - 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: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).Response Example
Response Example
Step 6: Set Up Webhooks (Optional)
To receive real-time notifications when escrow status changes or identity verification completes:- Create a webhook endpoint in your application
- Add the webhook URL in the Developer Dashboard
- Verify webhook signatures for security
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
- Authentication Guide - Learn about API authentication
- Quickstart Tutorial - Build a complete example
- KYC for marketplaces - Verify users before DHMAD signup
- API Reference - Explore all available endpoints
- Webhooks Guide - Set up real-time notifications
- Best Practices - Learn how to use the API effectively
You can authenticate using either
Authorization: Bearer header or X-API-Key header. Both methods are supported.