Build payments
in minutes, not months
A clean REST API, official SDKs, sandbox testing, real-time webhooks, and comprehensive documentation. Everything you need to integrate DWS into any application.
Simple. Powerful. Secure.
The DWS REST API follows industry-standard conventions. If you've used Stripe or Adyen, you'll feel at home. HTTP verbs, JSON request/response, predictable URLs, and detailed error messages.
RESTful API
Standard HTTP verbs, JSON payloads, and predictable resource-oriented URLs.
API Key Auth
Secure API key authentication. Use test keys in sandbox, live keys in production.
Real-time Webhooks
Receive instant notifications for payment events, refunds, and status changes.
Sandbox Environment
Full testing environment with test card numbers and simulated payment flows.
use DWS\Client;
$client = new Client([
'api_key' => 'sk_live_xxxxxxxxxxxxxxxx',
]);
$payment = $client->createPayment([
'amount' => 100000,
'currency' => 'MAD',
'description' => 'Order #1234',
'customer' => [
'email' => 'customer@example.com',
'name' => 'Mohamed Amine',
],
'return_url' => 'https://yoursite.ma/success',
]);
header('Location: ' . $payment->checkout_url);
Official SDKs
Idiomatic libraries for your preferred language. Just install and start building.
Real-time Webhooks
DWS sends instant HTTP POST notifications to your endpoint for every payment event. No polling required - your system reacts in real time.
$payload = json_decode(
file_get_contents('php://input'), true
);
$client->webhooks->verify(
$payload,
$_SERVER['HTTP_DWS_SIGNATURE'],
'whsec_xxxxxxxxxxxx'
);
switch ($payload['event']) {
case 'payment.succeeded':
fulfillOrder($payload['data']);
break;
case 'payment.failed':
notifyCustomer($payload['data']);
break;
}
http_response_code(200);
Test without risk
The DWS sandbox is a full replica of the production environment - with test card numbers, simulated payment flows, and real-time webhook delivery. Test everything before going live.
Ready to integrate?
Get your API keys, explore the sandbox, and build your integration. Our developer team is here to help.