errors in compliance check when with simplified invoices

hi everyone

I’m trying to test my program with zatca using zatca-einvoicing-sdk-DotNet-238-R3.4.6:

  1. first i generate csr:
    var generateCsrResult = CsrService.TryGenerateCsr(jwtClaims, Production);
    this is the function:
public static (bool IsValid, string? ErrorMessage, CsrResult? csrResult) TryGenerateCsr(JwtClaims jwtClaims, bool production)
{
var generateRes = GetCsrGenerateData(jwtClaims);
if(generateRes.ResultType != enResultType.Ok)
{
return (false, generateRes.ErrorMessage, null);
}

CsrGenerationDto dto = new CsrGenerationDto(
    $"yusrsys-{Guid.NewGuid().ToString()}-{generateRes.Result.VatNumber}",
    $"1-yusrsys|2-1.0.0|3-{Guid.NewGuid().ToString()}",
    generateRes.Result.VatNumber,
    generateRes.Result.BranchName,
    generateRes.Result.CompanyName,
    "SA",
    "1100", // 1100 = Standard + Simplified, 1000 = Standard only, 0100 = Simplified only
    generateRes.Result.CompanyAddress,
    generateRes.Result.CompanyBusinessCategory
);
CsrGenerator gen = new CsrGenerator();
CsrResult csrResult = gen.GenerateCsr(dto, production? EnvironmentType.Production : EnvironmentType.Simulation, false);

if (!csrResult.IsValid)
{
    return (false, csrResult.ErrorMessages[0] ?? string.Empty, null);
}

SqlResult<bool> storeResult = StoreCsr(jwtClaims, csrResult);

if (storeResult.ResultType != enResultType.Ok)
{
    return (false, storeResult.ErrorMessage, null);
}

return (true, null, csrResult);

}
  1. then i try to generate compliance csid:
    complianceCsidResult = await CsidService.TryRequestComplianceCsidAsync(OTP, generateCsrResult.csrResult!, Production);
public static async Task<(bool IsValid, string? ErrorMessage, CsidRespone? CsidResponse)> TryRequestComplianceCsidAsync(string otp, CsrResult csrResult, bool Production)
{
string endpoint = Production
? “core/compliance”
: “simulation/compliance”;

using var request = new HttpRequestMessage(HttpMethod.Post, endpoint);
request.Headers.Add("OTP", otp);
request.Headers.Add("Accept-Version", "V2");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var payload = new { csr = csrResult.Csr };
var json = JsonSerializer.Serialize(payload, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
request.Content = new StringContent(json, Encoding.UTF8, "application/json");

var response = await httpClient.SendAsync(request);
var resultJson = await response.Content.ReadAsStringAsync();

if (!response.IsSuccessStatusCode)
{
    return (IsValid: false, ErrorMessage: $"ZATCA Error: {response.StatusCode} - {resultJson}", CsidResponse: null);
}

CsidRespone? result = JsonSerializer.Deserialize<CsidRespone>(resultJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });

if (result == null)
{
    return (IsValid: false, ErrorMessage: "Failed To Parse Json Respone", CsidResponse: null);
}

return (IsValid: true, ErrorMessage: null, CsidResponse: result);

}

in the binarySecurityToken i received, the Issuer: CN=eInvoicing

and i think this is cause these errors when i try to send simplified invoice for compliance check:

(i can send standard invoices for compliance check without any problem)

{
“validationResults”: {
“infoMessages”: [
{
“type”: “INFO”,
“code”: “XSD_ZATCA_VALID”,
“category”: “XSD validation”,
“message”: “Complied with UBL 2.1 standards in line with ZATCA specifications”,
“status”: “PASS”
}
],
“warningMessages”: [
{
“type”: “WARNING”,
“code”: “BR-KSA-98”,
“category”: “KSA”,
“message”: “[BR-KSA-98] - The simplified invoice should be submitted within 24 hours of issuing the invoice.”,
“status”: “WARNING”
}
],
“errorMessages”: [
{
“type”: “ERROR”,
“code”: “QRCODE_INVALID”,
“category”: “QRCODE_VALIDATION”,
“message”: “Failed to validate QR code”,
“status”: “ERROR”
},
{
“type”: “ERROR”,
“code”: “invalid-certificate”,
“category”: “CERTIFICATE_ERRORS”,
“message”: “Production CSID is not valid”,
“status”: “ERROR”
},
{
“type”: “ERROR”,
“code”: “invalid-certificate”,
“category”: “CERTIFICATE_ERRORS”,
“message”: “Production CSID format is not valid”,
“status”: “ERROR”
}
],
“status”: “ERROR”
},
“reportingStatus”: “NOT_REPORTED”,
“clearanceStatus”: null,
“qrSellertStatus”: null,
“qrBuyertStatus”: null
}

what should i do? can anyone explain why i got this result please?

thank you all