Unofficial C# SDK for Jibit's APIs, generated from its OpenAPI spec with Kiota and wrapped with per-module authentication, automatic token refresh, and a typed error model.
| Module | Product | Credentials |
|---|---|---|
Alpha |
Biometric authentication | none |
Cobank |
Accounts / co-bank | apiKey + secretKey |
Directdebit |
Direct debit | apiKey + secretKey |
Ide |
Inquiry services (card, IBAN, identity, OCR, ...) | apiKey + secretKey |
Mzahub |
Digital contract / signature | apiKey + secretKey |
Ppg |
Payment gateway | apiKey + secretKey |
Pulse |
SMS | apiKey + secretKey |
dotnet add package JibitSharp
Or add it directly to your .csproj:
<ItemGroup>
<PackageReference Include="JibitSharp" Version="*" />
</ItemGroup>Targets net8.0, net9.0, and net10.0.
var client = new JibitClient(new JibitClientOptions
{
Cobank = new JibitCredentials(apiKey, secretKey),
// only configure the modules you actually use — Alpha needs none
});
var result = await client.Cobank.V1.Orders.Settlement.PostAsync(new SettlementRequestDTO
{
// ...
});Credentials are per module (Cobank, Ppg, Ide, Directdebit, Pulse,
Mzahub) — each is an independent apiKey/secretKey pair with its own
token lifecycle, which JibitClient manages automatically (generation,
caching, and refresh on expiry or a 401). Alpha has no token flow and
needs no credentials.
Every one of the 147 generated operations is reachable through
client.{Alpha,Cobank,Directdebit,Ide,Mzahub,Ppg,Pulse} following the
same URL-shaped navigation Kiota generates, e.g.
client.Ppg.V3.Purchases.PostAsync(...).
services.AddJibitSharp(options =>
{
options.Cobank = new JibitCredentials(apiKey, secretKey);
});Registers a singleton JibitClient backed by a pooled, resilient
HttpClient (Microsoft.Extensions.Http.Resilience's standard handler:
retry, timeout, circuit breaker).
Every operation throws JibitApiException (an alias for the generated
Error model) on a non-2xx response, exposing Code, Message, and
ResponseStatusCode — one exception type regardless of which product
raised it.
The vendored OpenAPI document (openapi/document.json) has a few
confirmed defects, worked around by JibitSharp.SpecNormalizer at build
time:
-
POST /ide/v1/services/ocr/national-card's response (OcrNationalCardResponse) is a provisional best-guess shape (firstName,lastName,nationalCode,confidence, plusAdditionalDatafor anything else Jibit actually returns) since the real schema is missing from the spec. -
/mzahub/v1/merchant/contract-sign/*operations require anX-REAL-IPheader per the spec. Kiota does not generate a typed convenience parameter for it, but you can set it via the genericrequestConfiguration.Headersmechanism:await client.Mzahub.V1.Merchant.ContractSign.VoiceCaptcha.PostAsync( body, rc => rc.Headers.Add("X-REAL-IP", ip));
Custom headers are automatically preserved across token-refresh retries.
See JibitSharp/README.md (the package readme
shipped on NuGet) for more detail.
JibitSharp/— the SDK itself (this is what gets packed and published).JibitSharp.Tests/— unit and smoke tests.JibitSharp.SpecNormalizer/— build-time tool that patches known defects inopenapi/document.jsonbefore Kiota generates the client.openapi/document.json— the vendored Jibit OpenAPI spec.scripts/generate.sh— regenerates the Kiota-generated client.
dotnet restore
dotnet build
dotnet test
After changing openapi/document.json, regenerate the client:
./scripts/generate.sh
Requires the Microsoft.OpenApi.Kiota global tool (installed
automatically by the script if missing, pinned to 1.34.1).
MIT — see LICENSE.