Skip to main content

Sign In (T103)

Authenticate the taxpayer session and retrieve device configuration, taxpayer details, branch information, and system settings. This endpoint does not require encryption for the request but returns an encrypted response.


Endpoint Overview

PropertyValue
Interface CodeT103
Request Encrypted❌ No
Response Encrypted✅ Yes
Request Bodynull
Response FormatJSON (encrypted payload)

Flow Description

  1. Client sends sign-in request after successful T102: Client Initialization.
  2. Server validates device status, TIN, and cryptographic credentials.
  3. Server returns:
    • Taxpayer profile (id, tin, legalName, contact details)
    • Device configuration (deviceNo, validPeriod, offline limits)
    • Branch information (branchId, branchName, contact details)
    • Tax type registrations (VAT, Income Tax, etc.)
    • System configuration flags (isAllowBackDate, goodsStockLimit, etc.)
  4. Client stores taxpayer.id in KeyClient for subsequent signed requests.

🔐 Security Note: The response is encrypted using the symmetric key obtained from T104. Ensure your KeyClient is properly initialized before calling this endpoint.


try {
// Call T103: Sign In
$response = $client->signIn();

$content = $response['data']['content'] ?? $response;

// Extract taxpayer info and store for later use
if (isset($content['taxpayer']['id'])) {
$keyClient->setTaxpayerId((string) $content['taxpayer']['id']);
echo "✅ Signed in as: {$content['taxpayer']['legalName']}\n";
echo " TIN: {$content['taxpayer']['tin']}\n";
echo " Device: {$content['device']['deviceNo']}\n";
echo " Valid Until: {$content['device']['validPeriod']}\n";
}

// Check configuration flags for business logic
$config = $content;
if ($config['isAllowBackDate'] === '0') {
echo "⚠️ Back-dated invoices are NOT allowed\n";
}
if ($config['goodsStockLimit'] === '101') {
echo "📦 Stock cannot go negative (restricted mode)\n";
}

} catch (\UraEfrisSdk\Exceptions\APIException $e) {
echo "❌ Sign-in failed: " . $e->getMessage() . "\n";
echo " Return Code: " . $e->getReturnCode() . "\n";
}

Response Structure

{
"data": {
"content": {
"device": {
"deviceModel": "AE320",
"deviceNo": "TCS9e0df01728335239",
"deviceStatus": "252",
"deviceType": "1",
"validPeriod": "19/02/2025",
"offlineAmount": "10000000000",
"offlineDays": "90",
"offlineValue": "1000000000000"
},
"taxpayer": {
"id": "112312313213213213",
"tin": "1000029771",
"ninBrn": "8002598872",
"legalName": "UGANDA REVENUE AUTHORITY",
"businessName": "URA",
"taxpayerStatusId": "101",
"taxpayerType": "202",
"contactEmail": "services@ura.go.ug",
"contactMobile": "0772140000",
"placeOfBusiness": "Nakawa"
},
"taxpayerBranch": {
"branchCode": "02",
"branchName": "Head Office",
"branchType": "101",
"contactName": "Admin",
"contactEmail": "services@ura.go.ug",
"placeOfBusiness": "Nakawa"
},
"taxType": [
{
"taxTypeName": "Value Added Tax",
"taxTypeCode": "301",
"registrationDate": "19/02/2025",
"cancellationDate": "19/02/2030"
}
],
"dictionaryVersion": "1",
"goodsStockLimit": "101",
"isAllowBackDate": "0",
"isAllowIssueInvoice": "1",
"maxGrossAmount": "10000000",
"periodDate": "7",
"creditMemoPeriodDate": "15",
"frequentContactsLimit": "40",
"webServiceURL": "https://api.ura.go.ug/efris/1.0/",
"environment": "0"
}
},
"globalInfo": {
"interfaceCode": "T103",
"returnStateInfo": {
"returnCode": "00",
"returnMessage": "SUCCESS"
}
}
}

Response Fields

Device Configuration

FieldRequiredTypeDescription
deviceModel✅ YesStringEquipment model identifier
deviceNo✅ YesStringRegistered device serial number
deviceStatus✅ YesString (3)Device status code (see dictionary)
deviceType✅ YesString (3)Equipment type code
validPeriod✅ YesDateDevice expiry date (dd/MM/yyyy)
offlineAmount✅ YesNumberMax invoices allowed in offline mode
offlineDays✅ YesNumberMax days device can operate offline
offlineValue✅ YesNumberMax total value for offline invoices (UGX)

Taxpayer Profile

FieldRequiredTypeDescription
id✅ YesString (18)Critical: Taxpayer internal ID (store in KeyClient)
tin✅ YesString (50)Tax Identification Number
ninBrn✅ YesString (100)National ID or Business Registration Number
legalName✅ YesString (500)Registered legal name
businessName✅ YesString (500)Trading/business name
taxpayerStatusId✅ YesString (18)Taxpayer status code (dictionary)
taxpayerType✅ YesString (18)201=Individual, 202=Non-Individual
contactEmail✅ YesString (50)Primary contact email
contactMobile✅ YesString (50)Primary contact mobile
placeOfBusiness✅ YesString (500)Registered business location

Taxpayer Branch

FieldRequiredTypeDescription
branchCode❌ NoString (50)Branch identifier code
branchName❌ NoString (500)Branch name
branchType❌ NoString (100)Branch type code (dictionary)
contactName❌ NoString (100)Branch contact person
contactEmail❌ NoString (50)Branch contact email
contactMobile❌ NoString (60)Branch contact mobile
placeOfBusiness❌ NoString (1000)Branch location

Tax Type Registrations (Array)

FieldRequiredTypeDescription
taxTypeName✅ YesString (200)Name of registered tax type
taxTypeCode✅ YesString (50)Tax type code (dictionary)
registrationDate✅ YesDateDate tax registration became effective
cancellationDate✅ YesDateDate tax registration expires/cancels

System Configuration Flags

FieldRequiredTypeValuesBusiness Impact
goodsStockLimit✅ YesString (3)101=Restricted, 102=Unlimited101 = Stock cannot go negative
isAllowBackDate✅ YesString (1)0=No, 1=Yes0 = Cannot issue invoices prior to current date
isAllowIssueInvoice✅ YesString (1)0=No, 1=Yes0 = Invoice issuance blocked (contact URA)
isDutyFreeTaxpayer✅ YesString (1)0=No, 1=Yes1 = Duty-free shop (special invoice rules)
isAllowIssueCreditWithoutFDN✅ YesString (1)0=No, 1=Yes1 = Can issue credit notes without original FDN
isAllowOutOfScopeVAT✅ YesString (1)0=No, 1=Yes1 = Can issue "VAT Not Applicable" invoices
periodDate✅ YesNumber1-30Days allowed to submit credit notes after invoice date
creditMemoPeriodDate✅ YesNumber1-30Days allowed for credit memo submissions
maxGrossAmount✅ YesNumberUGX valueMaximum allowed invoice gross amount
frequentContactsLimit✅ YesNumber1-100Max frequent contacts that can be stored
buyerModifiedTimes✅ YesNumber1-10Max times buyer details can be modified per invoice
buyerModificationPeriod✅ YesNumberHoursTime window for modifying buyer details

Version & Dictionary Fields

FieldRequiredTypeDescription
dictionaryVersion✅ YesNumberSystem dictionary version (compare with local for T115 sync)
taxpayerBranchVersion✅ YesString (20)Branch info version
commodityCategoryVersion✅ YesString (10)Commodity category version (for T134 incremental sync)
exciseDutyVersion✅ YesString (10)Excise duty codes version
hsCodeVersion✅ YesNumberHS Code list version
commGoodsLatestModifyVersion✅ YesString (14)Latest goods modification timestamp

URL & Environment

FieldRequiredTypeDescription
webServiceURL✅ YesString (200)Base API endpoint URL
qrCodeURL✅ YesString (200)Invoice verification page prefix
environment✅ YesString (1)0=Production, 1=Test/Sandbox
agentFlag✅ YesString (1)0=Not agent, 1=Agent USSD, 2=Agency Invoicing

Return Codes

CodeMessageDescription
00SUCCESSAuthentication successful; session established
99Unknown errorGeneric server error
100Taxpayer does not existTIN not found in URA system
101Taxpayer status is abnormalTIN suspended, deregistered, or inactive
102Taxpayer branch status abnormalBranch deactivated or suspended
400Device does not existdeviceNo not registered for this TIN
401Device key does not existCryptographic key missing for device
402Device key expiredDevice credentials have expired
403Device status is abnormalDevice blocked, suspended, or requires re-registration
3088Device has been blockedContact your system administrator or URA

💡 Tip: Store the taxpayer.id immediately after successful sign-in. All subsequent encrypted requests (T104+) require this ID for signature generation.


Common Use Cases

  1. Session Initialization
    Call T103 after T102 to establish an authenticated session before uploading invoices or querying data.

  2. Configuration-Driven Logic
    Use flags like isAllowBackDate and goodsStockLimit to enforce business rules client-side (e.g., block back-dated invoice UI).

  3. Multi-Branch Management
    Extract taxpayerBranch details to support branch-specific invoicing or stock queries in multi-location deployments.

  4. Offline Mode Planning
    Read offlineAmount, offlineDays, and offlineValue to implement graceful degradation when network connectivity is lost.

  5. Compliance Validation
    Verify taxType registrations to ensure you only issue invoice types the taxpayer is authorized for (e.g., VAT vs. non-VAT).

  6. Dictionary Synchronization
    Compare dictionaryVersion, commodityCategoryVersion, etc., with local cache to determine if T115/T134 sync is needed.