cheki library
cheki - a Dart client library for the cheki receipt verification service.
cheki is a free Ethiopian receipt verification service that allows you to verify bank transfer receipts from Ethiopian banks via a simple REST API.
Quick start
import 'package:cheki/cheki.dart';
void main() async {
final client = ChekiClient();
final result = await client.verify(
bank: 'cbe',
reference: 'RT123456789',
accountNumber: '1000123456789',
);
print(result.verified); // true or false
print(result.senderName);
print(result.amount);
client.close();
}
See ChekiClient for the full API.
Classes
- BankHealth
-
One bank's reachability in
GET /api/health. - BankInfo
-
A supported bank or wallet from
GET /api/banks. - BatchReceipt
- A receipt to verify in ChekiClient.verifyBatch.
- BatchResult
-
POST /api/verify/batch. - ChekiClient
- A client for the cheki receipt verification API.
- HealthStatus
-
GET /api/health: per-bank reachability, cached up to 5 minutes server-side. - ReceiptFormat
-
One receipt format of a bank, from
GET /api/banks. - VerifyOptions
-
Options for a receipt verification request (
POST /api/verify). - VerifyResult
-
The result of a verification:
POST /api/verify, or one item of a batch.
Constants
- chekiSdkVersion → const String
- SDK version, sent in the User-Agent header.
Functions
-
parseRetryAfter(
String? value, [DateTime? now]) → Duration? - Parses a Retry-After header (delta-seconds or HTTP-date).
Exceptions / Errors
- ChekiException
- Thrown when an API request fails.
- ChekiPayloadTooLargeException
- HTTP 413: the request body is over the route's cap.
- ChekiRateLimitException
- HTTP 429. retryAfter is the server's Retry-After, when sent.
- ChekiTimeoutException
- An attempt timed out. Timeouts are not retried.
- ChekiValidationException
- Invalid input caught before any request was made.