Extract Transactions
curl --request POST \
--url https://gateway.manka.tz/v1/api/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>"
}
'import requests
url = "https://gateway.manka.tz/v1/api/transactions"
payload = { "password": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>'})
};
fetch('https://gateway.manka.tz/v1/api/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.manka.tz/v1/api/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.manka.tz/v1/api/transactions"
payload := strings.NewReader("{\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.manka.tz/v1/api/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.manka.tz/v1/api/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Jane Doe",
"account": "0012345678",
"contacts": "+254712345678",
"company": "Equity Bank",
"currency": "KES",
"currency_code": "KES",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"no_of_transactions": 142,
"transactions": [
{
"date": "2024-01-03",
"description": "MPESA RECEIVED",
"amount": 5000,
"type": "credit",
"balance": 23450.5
}
]
}
Transactions
Extract Transactions
Synchronously parse a bank statement PDF into account metadata and a transaction list.
POST
/
transactions
Extract Transactions
curl --request POST \
--url https://gateway.manka.tz/v1/api/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>"
}
'import requests
url = "https://gateway.manka.tz/v1/api/transactions"
payload = { "password": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>'})
};
fetch('https://gateway.manka.tz/v1/api/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.manka.tz/v1/api/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.manka.tz/v1/api/transactions"
payload := strings.NewReader("{\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.manka.tz/v1/api/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.manka.tz/v1/api/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Jane Doe",
"account": "0012345678",
"contacts": "+254712345678",
"company": "Equity Bank",
"currency": "KES",
"currency_code": "KES",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"no_of_transactions": 142,
"transactions": [
{
"date": "2024-01-03",
"description": "MPESA RECEIVED",
"amount": 5000,
"type": "credit",
"balance": 23450.5
}
]
}
Parses a bank statement PDF and returns the raw transaction list along with account metadata. Unlike
/analysis, this endpoint is synchronous — the parsed result is returned in the same response.
Request body must be
multipart/form-data. One analysis credit is deducted per successful call.Request body
file
required
Bank statement PDF.
string
Password for protected PDFs. Required if the file is encrypted.
Response
string
Account holder name as printed on the statement.
string
Account or mobile number.
string
Contact number on file with the issuer.
string
Issuing institution, e.g.
"Equity Bank", "Vodacom".string
Currency name or ISO code as printed on the statement.
string
ISO 4217 currency code (e.g.
"KES", "TZS").string
ISO 8601 date of the first transaction in the statement period.
string
ISO 8601 date of the last transaction in the statement period.
integer
Total number of transactions returned in
transactions.array
{
"name": "Jane Doe",
"account": "0012345678",
"contacts": "+254712345678",
"company": "Equity Bank",
"currency": "KES",
"currency_code": "KES",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"no_of_transactions": 142,
"transactions": [
{
"date": "2024-01-03",
"description": "MPESA RECEIVED",
"amount": 5000,
"type": "credit",
"balance": 23450.5
}
]
}
Error responses
| Status | Reason |
|---|---|
400 | PDF is password-protected or in an unrecognisable format |
401 | Missing or invalid API token |
402 | Insufficient analysis credits |
Example
curl -X POST https://gateway.manka.tz/v1/api/transactions \
-H "Authorization: Bearer $MANKA_API_TOKEN" \
-F "file=@statement.pdf"
import requests
with open("statement.pdf", "rb") as f:
r = requests.post(
"https://gateway.manka.tz/v1/api/transactions",
headers={"Authorization": f"Bearer {token}"},
files={"file": f},
)
data = r.json()
print(data["no_of_transactions"], "transactions")
import fs from "node:fs";
import FormData from "form-data";
import fetch from "node-fetch";
const form = new FormData();
form.append("file", fs.createReadStream("statement.pdf"));
const r = await fetch("https://gateway.manka.tz/v1/api/transactions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANKA_API_TOKEN}` },
body: form,
});
const data = await r.json();
⌘I