Enom API Wrapper for Laravel
Find a file
Troy Siedsma 5802d8cc9c README: drop the LiBilling commercial preamble from the License section
These LithiumHosting/* packages are standalone Laravel libraries
licensed under MIT, not LiBilling-specific components. The "LiBilling
is (C) Lithium Holdings..." preamble belongs only on LiBilling/*
integration packages. Strip the preamble; keep the per-package MIT
attribution line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 15:40:44 +00:00
config Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
src Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
.gitignore Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
CHANGELOG.md Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
composer.json Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
CONTRIBUTING.md Re-platform onto LithiumHosting/laravel-enom-api Forgejo origin 2026-05-22 12:45:27 +00:00
LICENSE.md LICENSE: Copyright (c) Lithium Holdings, LLC 2026-05-22 15:13:43 +00:00
README.md README: drop the LiBilling commercial preamble from the License section 2026-05-22 15:40:44 +00:00

Laravel eNom API

A Laravel package for interacting with the eNom Reseller API. Provides a dynamic interface to any eNom API command with automatic authentication, XML-to-array response parsing, and support for both production and test environments.

Features

  • Dynamic API Calls: Call any eNom API command as a PHP method via __call()
  • Automatic Auth: Credentials injected into every request
  • XML Response Parsing: Responses converted from XML to PHP arrays via JsonSimpleXMLElementDecorator
  • Dual Environments: Production (reseller.enom.com) and test (resellertest.enom.com) endpoints

Installation

This package is loaded as a local Composer path repository. No separate installation is needed when developing within the LiBilling monorepo.

For standalone installation:

composer require lithiumhosting/laravel-enom-api

Publish the config file:

php artisan vendor:publish --provider="LithiumHosting\Laravel\EnomApi\EnomApiServiceProvider" --tag="config"

Configuration

Set your credentials in .env:

ENOM_API_USERNAME=your-reseller-username
ENOM_API_PASSWORD=your-reseller-password
ENOM_API_RESPONSETYPE=xml
ENOM_TESTING=true

Config Options

Key Env Default Description
username ENOM_API_USERNAME , eNom reseller API username
password ENOM_API_PASSWORD , eNom reseller API password
responsetype ENOM_API_RESPONSETYPE xml Response format (xml, text, html)
testing ENOM_TESTING true Use test endpoint (resellertest.enom.com)

Usage

The package uses a magic method pattern, any eNom API command can be called as a PHP method:

use LithiumHosting\Laravel\EnomApi\EnomApi;

$api = app(EnomApi::class);

// Check domain availability (RRPCode 210 = available, 211 = taken)
$result = $api->Check(['SLD' => 'example', 'TLD' => 'com']);

// Register a domain
$result = $api->Purchase([
    'SLD' => 'example',
    'TLD' => 'com',
    'NumYears' => 1,
    'NS1' => 'ns1.example.com',
    'NS2' => 'ns2.example.com',
]);

// Get domain info
$result = $api->GetDomainInfo(['SLD' => 'example', 'TLD' => 'com']);

// Get/set nameservers
$result = $api->GetDNS(['SLD' => 'example', 'TLD' => 'com']);
$result = $api->ModifyNS(['SLD' => 'example', 'TLD' => 'com', 'NS1' => 'ns1.new.com']);

// Registrar lock
$result = $api->GetRegLock(['SLD' => 'example', 'TLD' => 'com']);
$result = $api->SetRegLock(['SLD' => 'example', 'TLD' => 'com', 'UnlockRegistrar' => '0']);

// EPP code
$result = $api->SynchAuthInfo(['SLD' => 'example', 'TLD' => 'com', 'RunSynchAutoInfo' => 'True']);

// ID Protection
$result = $api->SetIDProtection(['SLD' => 'example', 'TLD' => 'com', 'Enable' => 'True']);

// Renew
$result = $api->Extend(['SLD' => 'example', 'TLD' => 'com', 'NumYears' => 1]);

// Transfer
$result = $api->TP_CreateOrder(['SLD' => 'example', 'TLD' => 'com', 'AuthInfo1' => 'epp-code']);

// Get available TLDs
$result = $api->GetTLDList();

Via Facade

use LithiumHosting\Laravel\EnomApi\EnomApiFacade as EnomApi;

$result = EnomApi::Check(['SLD' => 'example', 'TLD' => 'com']);

Dependencies

  • guzzlehttp/guzzle: HTTP client
  • ext-simplexml: XML response parsing

License

This package, laravel-enom-api is licensed under The MIT License (MIT). Please see License File for more information.

Is it any good?

Yes.

When people first hear about a new product, they frequently ask if it is any good. A Hacker News user remarked:

Note to self: Starting immediately, all raganwald projects will have a "Is it any good?" section in the readme, and the answer shall be "yes.".