SoftSDC v3
API

Error Codes

Complete reference of SoftSDC error codes and their meanings

Error Code Categories

SoftSDC uses a 4-digit error code system where the first digit indicates the severity:

  • 0xxx - Information codes (successful operations)
  • 1xxx - Warning codes (system continues to work but attention needed)
  • 2xxx - Error codes (operation failed, action required)

Information Codes (0xxx)

These codes indicate successful operations or status information.

CodeDescriptionMeaning
0000All OKCommand is executed without warnings or errors
0100Pin OKThis code indicates that the provided PIN code is correct
0210Internet AvailableInternet Connection is available (optional)
0220Internet UnavailableInternet Connection is not available (optional)

Warning Codes (1xxx)

These warnings indicate potential issues that don't prevent operation but require attention.

CodeDescriptionImpactAction Required
1100Storage 90% FullStorage used to store audit packages is 90% fullPerform audit soon to free space
1300Smart Card Not PresentSecure element card is not inserted in the E-SDC smart card readerInsert smart card to continue
1400Audit RequiredTotal Sale and Refund amount reached 75% of the SE limitPerform audit to continue operations
1500PIN Code RequiredIndicates that POS must provide the PIN codeSubmit PIN via /api/v3/pin endpoint
1999Undefined WarningSomething is wrong but specific warning is not definedCheck message field for details. Manufacturer may use specific codes

1100 and 1400 warnings indicate that an audit will soon be required. Plan accordingly to avoid service interruption.

Error Codes (2xxx)

These errors indicate operation failures that require immediate attention.

Authentication Errors (21xx)

CodeDescriptionDetailsResolution
2100Pin Not OKPIN code sent by the POS is invalidVerify PIN and retry. Check remaining attempts
2110Card LockedThe number of allowed PIN entries exceededCard is locked. Contact Tax Authority to reset

2110 - Card Locked: This is a critical error. The smart card cannot be used until it's reset by the Tax Authority. Never share your PIN or allow unauthorized access to prevent this situation.

Secure Element Errors (22xx)

CodeDescriptionDetailsResolution
2210SE LockedSecure Element is lockedNo additional invoices can be signed before audit is completed. Perform audit immediately
2220SE Communication FailedE-SDC cannot connect to the Secure Element appletCheck smart card connection. Try removing and reinserting card. Restart service if needed
2230SE Protocol MismatchSecure Element does not support requested protocol versionUpdate software or contact support (reserved for later use)

Configuration Errors (23xx-24xx)

CodeDescriptionDetailsResolution
2310Invalid Tax LabelsTax Labels sent by the POS are not definedVerify tax labels match configured tax rates. Check /api/v3/status for valid labels
2400Not ConfiguredSDC device is not fully configured for invoice signingRun initialization. Tax rates or verification URL may be missing

Validation Errors (28xx)

These errors indicate problems with the data submitted in API requests.

CodeDescriptionDetails
2800Field RequiredA mandatory invoice request field is missing
2801Field Value Too LongThe length of the field value exceeds maximum allowed
2802Field Value Too ShortThe length of the field value is less than minimum required
2803Invalid Field LengthThe field value length doesn't match expected length
2804Field Out Of RangeA field value is outside the expected range
2805Invalid Field ValueA field contains an invalid or malformed value
2806Invalid Data FormatThe data format is invalid (e.g., non-ASCII digits in PIN)
2807List Too ShortThe list of items or tax labels doesn't contain at least one element
2808List Too LongThe list exceeds maximum allowed number of elements or byte size
2809Secure Element ExpiredThe digital certificate on the smart card has expired

Validation Errors (28xx): These are typically caused by incorrect data in your API requests. Review the request payload and ensure all fields meet the requirements specified in the API documentation.

Error Handling Best Practices

Critical Errors (Immediate Action Required)

const CRITICAL_ERRORS = ['2110', '2210', '2809'];

function handleResponse(code, message) {
  if (CRITICAL_ERRORS.includes(code)) {
    // Stop operations immediately
    // Alert system administrator
    // Log detailed error information
    notifyAdministrator(code, message);
    disableFiscalization();
  }
}

Recoverable Errors (Retry Logic)

const RECOVERABLE_ERRORS = ['2220', '1300'];

async function createInvoiceWithRetry(invoice, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const result = await createInvoice(invoice);

    if (result.code === '0000') {
      return result;
    }

    if (RECOVERABLE_ERRORS.includes(result.code)) {
      await sleep(2000 * (i + 1)); // Progressive delay
      continue;
    }

    throw new Error(`Unrecoverable error: ${result.code}`);
  }

  throw new Error('Max retries exceeded');
}

Warning Handling

const WARNING_CODES = ['1100', '1400'];

function checkWarnings(status) {
  const warnings = status.gsc.filter(code =>
    WARNING_CODES.includes(code)
  );

  if (warnings.includes('1100')) {
    scheduleAudit('soon'); // Within 24 hours
  }

  if (warnings.includes('1400')) {
    scheduleAudit('urgent'); // As soon as possible
  }
}

Status Code Examples

Successful Operation

{
  "gsc": ["0100"],
  "mssc": [],
  "messages": "Success"
}

Multiple Status Codes

{
  "gsc": ["0100", "0220"],
  "mssc": ["1400"],
  "messages": "PIN verified. Internet unavailable. Audit recommended."
}

Error Response

{
  "gsc": ["2100"],
  "mssc": [],
  "messages": "PIN verification failed. 3 attempts remaining."
}

Manufacturer-Specific Codes (6xxx)

Codes starting with 6 are manufacturer-specific and may provide additional detail about system status:

CodeDescription
6001Manufacturer-specific info
6xxxReserved for manufacturer extensions

Manufacturer-specific codes provide additional context but should not be used for critical decision-making in integrations. Always rely on standard error codes for operational logic.

Debugging Tips

Enable Verbose Logging

When troubleshooting errors:

  1. Enable detailed logging in Settings
  2. Review application logs for context
  3. Check timestamp sequence for timing issues
  4. Verify network connectivity for connection errors

Common Error Scenarios

Scenario: PIN Errors (2100, 2110)

Symptoms: Cannot authenticate with smart card

Checklist:

  • Verify PIN is correct
  • Check how many attempts remain
  • Ensure card is properly inserted
  • Verify card reader is functioning

Scenario: Validation Errors (28xx)

Symptoms: Invoice creation fails

Checklist:

  • Validate all required fields are present
  • Check field value formats (dates, numbers)
  • Verify tax labels match current rates
  • Ensure item array is not empty

Scenario: Communication Errors (2220)

Symptoms: Cannot connect to secure element

Checklist:

  • Check smart card is inserted correctly
  • Try removing and reinserting card
  • Restart SoftSDC service
  • Test with different USB port
  • Verify card reader drivers are installed

Error Response Format

All error responses include:

{
  "gsc": ["2100"],           // General Status Codes
  "mssc": [],                // Manufacturer-Specific Status Codes
  "messages": "Description", // Human-readable message
  "details": "..."           // Additional context (optional)
}

For complete API response examples, see the API Reference documentation.