Skip to main content

API reference · /api/v1

Blesta module

Sell and manage Domain.af domains from Blesta 5 with the official registrar module. Customers and staff manage contacts, nameservers, child nameservers, lock, EPP codes, WHOIS Privacy, Domain Protection and DNS from the service page, and you sell the add-ons on the normal Blesta invoice.

Install

  1. Download the module zip from the reseller portal (API access → Quick Actions → Download Blesta module) and copy the components/modules/domainaf folder to components/modules/domainaf in your Blesta installation.
  2. In the reseller portal, create an API key for Blesta. Recommended: restrict it to your Blesta server's IP. The key needs all permissions.
  3. In Blesta go to Settings → Company → Modules → Available and install Domain.af. Then open Manage and click Add API Key. Enter the Key ID and secret. The API URL is https://www.domain.af/api/v1 unless you leave it blank. Saving tests the connection and checks the key's permissions.
  4. Create a Domain Registration package that uses the module, select the TLDs you sell and import your cost prices with Blesta's TLD pricing import.

What customers can do

  • Order, transfer (with EPP code) and renew .af domains, with live availability checks
  • Change contacts, nameservers and child nameservers
  • Turn the registrar lock and WHOIS Privacy on or off, and show the EPP code
  • Manage DNS records (A, AAAA, CNAME, MX, TXT, CAA, SRV, NS) once DNS Management is active on the domain

How billing works

Blesta bills your customers. Each registration, renewal and transfer is charged to your Domain.af account credit at your reseller price. If your balance is too low, the order fails with a clear "insufficient balance" message and nothing is charged. Retries are never charged twice.

Add-ons through package options

Sell WHOIS Privacy, Domain Protection and DNS hosting as Blesta package options so they appear on the normal invoice. Create an option group with options named id_protection (WHOIS Privacy), domain_protection and dns_management and attach it to your domain packages. Each add-on is charged to your Domain.af credit at your reseller price. Domain Protection can only be removed by Domain.af support.

Account, alerts and reconciliation

  • The module page shows each API key's available credit, balance and pricing tier
  • Set a Low credit alert amount and an email address on the API key to get one email a day while credit is low
  • Registration and expiry dates stay in step through Blesta's Domain Manager plugin
  • Run reconciliation compares your Domain.af account with Blesta services and reports differences without changing anything

Not in this version

  • Importing domains that exist at Domain.af into Blesta as services (the reconciliation report lists them)

The full installation guide is included in the module package (README.md).