Bee.ZatcaHelper 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Bee.ZatcaHelper --version 1.0.1
NuGet\Install-Package Bee.ZatcaHelper -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bee.ZatcaHelper" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bee.ZatcaHelper --version 1.0.1
#r "nuget: Bee.ZatcaHelper, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bee.ZatcaHelper as a Cake Addin
#addin nuget:?package=Bee.ZatcaHelper&version=1.0.1

// Install Bee.ZatcaHelper as a Cake Tool
#tool nuget:?package=Bee.ZatcaHelper&version=1.0.1

Zatca | Fatoora - Integeration Helper

This project helps in integertation of systems to Zatca systems. Currently tested using their sandbox APIs.

Follow below shell commands to generate CSR

we need a csr token to initiate compliance API request , more about what is CSR here → https://en.wikipedia.org/wiki/Certificate_signing_request

#generate private key using below command
openssl ecparam -name secp256k1 -genkey -noout -out privatekey.pem

#generate csr using below command
openssl req -new -sha256 -key privatekey.pem -extensions v3_req -config cert.cnf -out generatedCSR.csr

#convert to base64
echo -n `cat generatedCSR.csr` | openssl enc -base64 -a -A >> csr_Output.txt

API Reference

Note: Global variables is a dependecy for all the classes , its parameters are described below

Parameter Type Description
BaseUrl string Required. Base url of zatca [Eg: https://gw-apic-gov.gazt.gov.sa]
ComplianceCsidEndpoint string Required. Compliance Csid endpoint [Eg: /e-invoicing/developer-portal/compliance]
ProdCsidEndpoint string Required. Prod csid endpoint [Eg : /e-invoicing/developer-portal/production/csids]
InvoiceClearanceEndPoint string Required. clearance endpoint [Eg: /e-invoicing/developer-portal/invoices/clearance/single]
Get Compliance CSR token
 ComplianceCsrApiClient(GlobalVariables).GetToken(ComplianceCsrRequest)
ComplianceCsrRequest Parameter Type Description
Otp string Required. OTP obatined from tax portal
Csr string Required. CSR token generated using above mentioned step
Get Prod CSID
  ProdCsidApiClient(GlobalVariables).GetToken(ProdCsidOnboardingRequest)
ProdCsidOnboardingRequest Parameter Type Description
ComplianceRequestId string Required. RequestId from the response of above endpoint
CsrBinaryToken string Required. Binary token from the response of above endpoint
CsrSecret string Required. Secret from the response of above endpoint
Generate xml
  StandardInvoiceXmlGenerator.Generate(StandardInvoice)

For parameters refer → https://github.com/fasilmarshooq/Zatca_Integration_Helper/blob/main/Zatca-Standard-Invoice-Integration-Client/Model/StandardInvoice.cs

Clear Invoice
  StandardInvoiceClearanceApiClient(GlobalVariables).ClearInvoice(InvoiceClearanceRequest)
InvoiceClearanceRequest Parameter Type Description
Body string Required. response of above endpoint
BinaryToken string Required. Binary token from the response of Get Prod CSID endpoint
Secret string Required. Secret from the response of Get Prod CSID endpoint

Roadmap

  • implement Allowance charge / Discount

  • implement reporting api for simplified tax invoices

🔗 Contact

linkedin

Write to me at fasil@dev-bee.com

License

MIT

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 212 12/5/2022
1.0.5 103 11/19/2022
1.0.4 97 11/19/2022
1.0.3 109 10/15/2022
1.0.1 89 10/5/2022