Skip to content

v1.5.0: SDKs 1.5.0

Choose a tag to compare

@1RB 1RB released this 15 Oct 17:28
· 173 commits to main since this release
40916f1

Install: npm install cheki-verify@1.5.0 · pip install cheki==1.5.0 · composer require cheki/cheki:^1.5 · dart pub add cheki:^1.5.0 · go get github.com/1RB/cheki/sdks/go@v1.5.0

The first registry release of the SDK rework: npm, PyPI and Packagist 1.4.1 were built from June 2026 code, so everything listed under 1.4.1 below reaches those registries now.

Safer retries (all SDKs, one shared rule). At most one retry, and only where it is safe:

  • GET (banks, health): a network error or a 5xx.
  • POST /api/verify: a network error, or a 429/503 with a Retry-After of at most 60 s.
  • POST /api/verify/batch: only a 429/503 with a short Retry-After. A batch is never replayed after a 5xx (a 504 means it ran out of server time) or a network error, because the replay hit every bank again and charged every receipt against the rate limit.
  • Never: timeouts, other 4xx, a geo-blocked bank (502 with fallbackUrl, which used to cost an extra ~9 s for the same answer), or an error marked retryable: false. A 429 without Retry-After is no longer retried.
  • sdks/fixtures/api-contract.json gained retryCases, which every SDK's tests run.

Fixes

  • Dart: responses are decoded as UTF-8 from the bytes, and http must be 1.4.0+ (older http decoded application/json without a charset as latin1, garbling Amharic names and messages). The Dart SDK constraint is now >=3.4.0, as http 1.4.0 requires.
  • Python: direct mode no longer turns off TLS verification for Awash (Awash serves a complete, publicly trusted chain), so nobody on the network path can forge an Awash receipt.
  • Python: a requests.Session you pass in is no longer modified. The User-Agent and API key go on each request, so the key never leaks to other hosts the session calls, and close() leaves your session open.
  • Python: batch index is the position in the response even if a malformed item is skipped, and an item without bank raises ValueError (it raised KeyError).
  • PHP: cURL is limited to HTTP(S); curl_close() calls removed (deprecated in PHP 8.5).

Added

  • beta on banks in Python, Go, PHP and Dart (TypeScript always sets it now): true for M-Pesa and ZamZam.
  • orderId / order_id / OrderID on results (CBE Birr receipts).
  • Batch error items keep fallbackUrl when the server sends one.
  • getReceiptUrl rejects a ZamZam receipt id that is not digits only, as the server does.
  • RECOMMENDED_BATCH_CHUNK (15) in every SDK; the docs explain chunking long lists.

Packaging

  • Python: the API client depends on requests>=2.33.0 and urllib3>=2.8.0 only. beautifulsoup4 and pdfplumber moved to the cheki[direct] extra for the deprecated direct mode (pdfplumber>=0.11.9, pdfminer.six>=20251230); without it direct mode raises DirectModeUnavailableError. The wheel ships LICENSE (SPDX license = "MIT"). Python 3.14 is tested.
  • PHP: requires PHP 8.1+; CI tests 8.1, 8.3 and 8.4. The Packagist package contains only the SDK (.gitattributes export-ignore), and the root composer.json matches sdks/php/composer.json.
  • TypeScript: engines.node is >=20.
  • Go: CI tests the go 1.21 floor and the current release.
  • Dart: pubspec description within pub.dev's 60 to 180 characters.

Release pipeline

  • scripts/bump-version.sh --files-only X.Y.Z (release PR) and --tag-only X.Y.Z (tag the merged main); it also updates the Go install pin and checks this changelog.
  • publish.yml fails when a registry already has the version (except on a re-run), checks the wheel and the Packagist dist, and ends with a job that polls every registry until it serves the release from the tagged commit (scripts/check-registries.mjs).

Full PR: #50 · Changelog: https://github.com/1RB/cheki/blob/v1.5.0/CHANGELOG.md