1. Go to this page and download the library: Download ometra/heimdal-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ometra / heimdal-sdk example snippets
use Ometra\HeimdalSdk\Facades\HeimdalSdk;
$profile = HeimdalSdk::contracts()
->subscribers()
->profile('525512345678');
$profile->subStatus;
$profile->primaryOfferingId;
$profile->freeUnits;
use Ometra\HeimdalSdk\Facades\HeimdalSdk;
$profile = HeimdalSdk::subscribers()->profile('525512345678');
if ($profile->success) {
$data = $profile->data;
}
use Ometra\HeimdalSdk\HeimdalSdk;
$sdk = app(HeimdalSdk::class);
$sdk->heimdal()->imei()->status('123456789012345');
use Ometra\HeimdalSdk\Data\PurchaseProductData;
use Ometra\HeimdalSdk\Facades\HeimdalSdk;
$response = HeimdalSdk::products()->purchase(
new PurchaseProductData(
msisdn: '525512345678',
offerings: ['OFFER-1'],
scheduleDate: '2026-05-13T10:00:00',
)
);
use Ometra\HeimdalSdk\Data\ChangeSimData;
HeimdalSdk::subscribers()->changeSim(
'525512345678',
new ChangeSimData('8952000000000000000')
);
// Remueve el ultimo caracter, util cuando el sistema conserva ICCID completo con digito/F final.
ChangeSimData::fromFullIccid('895200000000000000F');
// Envia exactamente el ICCID esperado por Altan.
ChangeSimData::fromAltanIccid('8952000000000000000');
use Ometra\HeimdalSdk\Data\DateRangeQuery;
use Ometra\HeimdalSdk\Facades\HeimdalSdk;
$imei = HeimdalSdk::contracts()
->imeis()
->compatibility('12345678901234');
if ($imei->compatible) {
$status = $imei->shortStatus;
}
$history = HeimdalSdk::contracts()
->history()
->sim('525512345678', new DateRangeQuery('2026-05-01', '2026-05-13', limit: 500));
$topup = HeimdalSdk::contracts()
->products()
->topup('525512345678', 'OFFER-1');