Developer API
The reseller API is used to build integrations such as WHMCS, internal billing, client portals, or domain automation. Create a token from the API Token Reseller, lalu kirim token dengan header Bearer.
Authentication
Authorization: Bearer drk_xxxxxxxxxxxxxxxxxxxxx
Accept: application/json
Endpoint Utama
| Method | Endpoint | Fungsi | Ability |
|---|---|---|---|
| GET | /api/reseller/v1/status | Status akun, wallet, dan ringkasan | billing.read |
| POST | /api/reseller/v1/domains/search | Single/bulk availability search | domains.read |
| GET | /api/reseller/v1/domains | Register domain user | domains.read |
| GET | /api/reseller/v1/orders | Register order user | orders.read |
| POST | /api/reseller/v1/orders/register | Create a domain registration invoice | orders.write |
| POST | /api/reseller/v1/orders/renew | Create domain renewal invoice | orders.write |
| POST | /api/reseller/v1/orders/transfer | Create domain transfer invoice | orders.write |
| PUT | /api/reseller/v1/domains/dns | Replace local DNS records, opsional push ke Dynadot | domains.write |
| POST | /api/reseller/v1/domains/dns/push | Push DNS record aktif ke Dynadot | domains.write |
Contoh Search
curl -X POST "http://www.herworld.com.my/api/reseller/v1/domains/search" \
-H "Authorization: Bearer drk_xxx" \
-H "Accept: application/json" \
-d "domains[]=example.com" \
-d "domains[]=example.net"
Contoh Register Order
curl -X POST "http://www.herworld.com.my/api/reseller/v1/orders/register" \
-H "Authorization: Bearer drk_xxx" \
-H "Idempotency-Key: register-example-com-001" \
-H "Accept: application/json" \
-d "domain=example.com" \
-d "years=1" \
-d "privacy=full" \
-d "auto_renew=1"
Endpoint order membuat invoice unpaid. Provisioning registrar baru berjalan setelah invoice berstatus paid melalui wallet payment atau callback Midtrans/Xendit. Untuk endpoint mutasi, gunakan header Idempotency-Key agar retry dari client tidak membuat order/invoice ganda.
Outbound Webhook Reseller
Webhooks can be created from the Webhook Reseller. Available events: invoice.paid, domain.order.processing, domain.order.completed, domain.order.failed, dan domain.expiring.
X-Webhook-Timestamp: 1780000000
X-Webhook-Signature: sha256=<hmac_sha256(timestamp.raw_body, secret)>
Webhook Payment Gateway
- Midtrans:
POST /payments/webhooks/midtransdengan validasi signature_key. - Xendit:
POST /payments/webhooks/xenditdengan validasix-callback-token.
Command Operasional
php artisan domain-reseller:doctor
php artisan domain-reseller:doctor --check-dynadot
php artisan domains:retry-provisioning --status=failed,processing --limit=50
php artisan domains:send-expiry-reminders
php artisan webhooks:retry-failed --limit=100
php artisan queue:work --queue=domain-provisioning,webhooks,default --tries=3 --timeout=120