Domain Reseller Docs

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

MethodEndpointFungsiAbility
GET/api/reseller/v1/statusStatus akun, wallet, dan ringkasanbilling.read
POST/api/reseller/v1/domains/searchSingle/bulk availability searchdomains.read
GET/api/reseller/v1/domainsRegister domain userdomains.read
GET/api/reseller/v1/ordersRegister order userorders.read
POST/api/reseller/v1/orders/registerCreate a domain registration invoiceorders.write
POST/api/reseller/v1/orders/renewCreate domain renewal invoiceorders.write
POST/api/reseller/v1/orders/transferCreate domain transfer invoiceorders.write
PUT/api/reseller/v1/domains/dnsReplace local DNS records, opsional push ke Dynadotdomains.write
POST/api/reseller/v1/domains/dns/pushPush DNS record aktif ke Dynadotdomains.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

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