API documentation

One request turns a raw transaction string into a merchant, category and more.

Overview

Base URLhttps://sandbox.api.tanzimfinancial.com/v1
FormatJSON over HTTPS. Send Content-Type: application/json.
AuthAPI key in the Authorization header.
Current engine3.3.0+51d01cf1
Versioning. Everything under /v1 is additive-only: fields are never removed, renamed or re-typed, so an integration written today keeps working while the matching engine improves behind it. Treat unknown response fields as ignorable. Breaking changes ship as /v2, side by side. Every response carries X-Tanzim-Engine-Version so you can tell which build answered.

Quickstart

1. Get a test key (instant, free): create one here, or curl -X POST https://sandbox.api.tanzimfinancial.com/v1/keys -H "Content-Type: application/json" -d '{}'.
2. Send a transaction — if you created a key in this browser it is already filled into the snippets below:

curl -X POST https://sandbox.api.tanzimfinancial.com/v1/enrich \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description": "NETFLIX.COM 4029357689"}'
import requests

resp = requests.post(
    "https://sandbox.api.tanzimfinancial.com/v1/enrich",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"description": "NETFLIX.COM 4029357689"},
    timeout=10,
)
resp.raise_for_status()
print(resp.json()["merchant_name"])
const res = await fetch("https://sandbox.api.tanzimfinancial.com/v1/enrich", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ description: "NETFLIX.COM 4029357689" }),
});
const data = await res.json();
console.log(data.merchant_name);
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body := bytes.NewBufferString(`{"description": "NETFLIX.COM 4029357689"}`)
	req, _ := http.NewRequest("POST", "https://sandbox.api.tanzimfinancial.com/v1/enrich", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	fmt.Println(string(out))
}
require "net/http"
require "json"

uri = URI("https://sandbox.api.tanzimfinancial.com/v1/enrich")
req = Net::HTTP::Post.new(uri, "Authorization" => "Bearer YOUR_API_KEY", "Content-Type" => "application/json")
req.body = { description: "NETFLIX.COM 4029357689" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
puts JSON.parse(res.body)["merchant_name"]
<?php
$ch = curl_init("https://sandbox.api.tanzimfinancial.com/v1/enrich");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode(["description" => "NETFLIX.COM 4029357689"]),
]);
$data = json_decode(curl_exec($ch), true);
echo $data["merchant_name"];
import java.net.URI;
import java.net.http.*;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpRequest req = HttpRequest.newBuilder(URI.create("https://sandbox.api.tanzimfinancial.com/v1/enrich"))
            .header("Authorization", "Bearer YOUR_API_KEY")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString("{\"description\": \"NETFLIX.COM 4029357689\"}"))
            .build();
        HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
        System.out.println(res.body());
    }
}
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
var content = new StringContent("{\"description\": \"NETFLIX.COM 4029357689\"}", Encoding.UTF8, "application/json");
var res = await client.PostAsync("https://sandbox.api.tanzimfinancial.com/v1/enrich", content);
Console.WriteLine(await res.Content.ReadAsStringAsync());

3. Read the result:

{
  "input": "NETFLIX.COM 4029357689",
  "matched": true,
  "merchant_name": "Netflix",
  "merchant_id": "mer_e42776aa5123",
  "category": "Subscriptions & OTT",
  "subcategory": "OTT - International",
  "country": null,
  "logo_url": "https://www.google.com/s2/favicons?domain=netflix.com&sz=128",
  "website": "https://netflix.com",
  "domain": "netflix.com",
  "mcc": "5968",
  "confidence": 0.99,
  "match": {
    "method": "substring",
    "matched_on": "NETFLIX COM"
  },
  "counterparty": null,
  "request_id": "req_…",
  "engine_version": "3.3.0+51d01cf1"
}

Always check matched before using merchant_name. When it is false (for example a person-to-person transfer) the fields are null — see the live examples at the playground.

Analyse a bank statement

Upload a statement and get every transaction parsed, classified and enriched, plus spending insights. PDF (with selectable text), CSV and Excel (.xlsx) are supported, up to 8 MB. The file is processed in memory and never stored.

curl -X POST https://sandbox.api.tanzimfinancial.com/v1/statements/analyze \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@statement.pdf"
import requests

with open("statement.pdf", "rb") as f:
    r = requests.post("https://sandbox.api.tanzimfinancial.com/v1/statements/analyze",
                      headers={"Authorization": "Bearer YOUR_API_KEY"}, files={"file": f}, timeout=60)
r.raise_for_status()
result = r.json()
print(result["statement"]["confidence"], result["insights"]["summary"]["spending"])

The response has three parts: statement (what was read, with a confidence grade and a reconciliation self-check against the statement's own balances), transactions (each with direction, kind and a full enrichment), and insights (summary, categories, top merchants, monthly trend, recurring payments, transfers, and how much spending could be identified). Show statement.warnings to your user. If you already have the transactions as data, send them to POST /v1/transactions/analyze instead. Statements are limited to 20 per hour per key.

Privacy. Statement contents are not stored. Only merchant narrations Tanzim could not identify are kept to improve matching, with long digit runs and e-mail addresses masked and person-to-person transfers excluded.

Webhooks

Instead of polling, give Tanzim a URL and it will POST an event there when something changes in a customer's subscriptions. Every event is also kept in the event log (GET /v1/events), so you can catch up after downtime.

EventWhen
subscription.detectedA subscription was found in a customer's transactions that was not there at their previous analysis.
subscription.price_changedA subscription's price went up or down.  has the previous average, the new amount and the date.
subscription.status_changedA subscription's status moved (for example  -> : payments stopped).
subscription.renewal_dueA subscription is expected to renew within 3 days. Sent once per expected renewal date.
curl -X POST https://sandbox.api.tanzimfinancial.com/v1/webhooks   -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json"   -d '{"url": "https://example.com/hooks/tanzim", "events": ["subscription.renewal_due"]}'
# the response contains "secret": "whsec_..." : shown once, store it

Try your handler before real events exist: POST /v1/webhooks/{id}/test sends a sample event of any type ({"type": "subscription.price_changed"}) and tells you what your server answered; GET /v1/webhooks/{id}/deliveries is the delivery log.

Verify every request. Each one carries Tanzim-Signature: t=<unix time>,v1=<hex>, where the hex is HMAC-SHA256 of "<t>.<raw body>" with your signing secret. Compute it over the raw bytes you received (not a re-serialised copy), compare in constant time, and reject timestamps older than 5 minutes. The SDKs do this for you:

from tanzim import verify_webhook          # Python (standard library only)

ok = verify_webhook(SECRET, request.headers["Tanzim-Signature"], request.get_data())
import { verifyWebhook } from "./tanzim.mjs";   // Node 16+. With Express use express.raw({ type: "application/json" })

const ok = await verifyWebhook(SECRET, req.get("Tanzim-Signature"), req.body);

Authentication

Send your key as Authorization: Bearer tz_test_…, or as X-API-Key: tz_test_… if your tooling can't set that header. Test keys (tz_test_…) are instant and self-serve and work only on the sandbox; live keys (tz_live_…) are issued after onboarding and work only on production. Sending the wrong kind answers 403 wrong_environment, and every response carries X-Tanzim-Environment. Verify a key with GET /v1/me. Rotate by creating a new key, switching over, then DELETE /v1/keys/current with the old one. Keep keys out of public front-end code.

Endpoints

GET/v1/health

Liveness check · No authentication

Responses
StatusMeaning
200Successful Response Health

GET/v1/meta

Engine and data summary · No authentication

Responses
StatusMeaning
200Successful Response Meta

GET/v1/examples

Live example inputs and outputs · No authentication

Sample transactions run through the engine right now, so the output is always what the current build really returns. The docs pages are generated from this.

Responses
StatusMeaning
200Successful Response ExamplesResponse

POST/v1/keys

Create a test API key · No authentication

Self-serve and instant: no approval step. Returns the key once. Limited per IP address.

Request body · KeyRequest
FieldTypeDescription
namestring | nullWhat you're building (shown only to you). e.g. "My budgeting app"
emailstring | nullOptional, but lets us tell you about breaking changes and quota.
sourcestring | nullFree-form label for where the key was requested from.
Responses
StatusMeaning
201Successful Response KeyCreated
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
Example request
{
  "name": "My budgeting app",
  "email": "dev@example.com"
}
Example response
{
  "key": "tz_test_Xk3…",
  "id": "key_0a1b2c3d4e5f6a7b",
  "prefix": "tz_test_Xk3d",
  "environment": "test",
  "created_at": "2026-01-01T12:00:00+00:00",
  "rate_limits": {
    "per_minute": 120,
    "per_day": 10000
  },
  "message": "Store this key now; it cannot be shown again."
}

GET/v1/me

Check your API key · API key required

The quickest way to verify an integration: returns 200 if your key works.

Responses
StatusMeaning
200Successful Response Me
401missing_api_key or invalid_api_key. ErrorResponse

DELETE/v1/keys/current

Revoke the key you are using · API key required

Use to rotate: create a new key, switch over, then revoke the old one. Irreversible.

Responses
StatusMeaning
200Successful Response Revoked
401missing_api_key or invalid_api_key. ErrorResponse

POST/v1/enrich

Enrich one transaction · API key required

Identify the merchant behind a raw transaction string and return structured details.

Request body · EnrichRequest
FieldTypeDescription
descriptionrequiredstringThe raw transaction string exactly as it appears on the statement or card feed. e.g. "NETFLIX.COM 4029357689"
mccstring | nullOptional 4-digit Merchant Category Code from the card network. Used only as a fallback category when the merchant cannot be identified. mcc_code is accepted as an alias. e.g. "5968"
Responses
StatusMeaning
200Successful Response EnrichResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
Example request
{
  "description": "NETFLIX.COM 4029357689"
}
Example response
{
  "input": "NETFLIX.COM 4029357689",
  "matched": true,
  "merchant_name": "Netflix",
  "merchant_id": "mer_e42776aa5123",
  "category": "Subscriptions & OTT",
  "subcategory": "OTT - International",
  "country": null,
  "logo_url": "https://www.google.com/s2/favicons?domain=netflix.com&sz=128",
  "website": "https://netflix.com",
  "domain": "netflix.com",
  "mcc": "5968",
  "confidence": 0.99,
  "match": {
    "method": "substring",
    "matched_on": "NETFLIX COM"
  },
  "counterparty": null,
  "request_id": "req_9f2c41d07a3b5e6c8d10",
  "engine_version": "3.3.0+51d01cf1"
}

POST/v1/enrich/batch

Enrich many transactions · API key required

Up to 100 transactions per call. Each item counts once toward your rate limit. Results are in input order; one unmatched item never fails the whole batch.

Request body · BatchRequest
FieldTypeDescription
itemsrequiredarray of EnrichRequest1 to 100 transactions. Results come back in the same order.
Responses
StatusMeaning
200Successful Response BatchResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
Example request
{
  "items": [
    {
      "description": "NETFLIX.COM 4029357689"
    },
    {
      "description": "From Ali Raza (SadaPay) (Incoming transfer)"
    }
  ]
}
Example response
{
  "request_id": "req_9f2c41d07a3b5e6c8d10",
  "engine_version": "3.3.0+51d01cf1",
  "results": [
    {
      "input": "NETFLIX.COM 4029357689",
      "matched": true,
      "merchant_name": "Netflix",
      "merchant_id": "mer_e42776aa5123",
      "category": "Subscriptions & OTT",
      "subcategory": "OTT - International",
      "country": null,
      "logo_url": "https://www.google.com/s2/favicons?domain=netflix.com&sz=128",
      "website": "https://netflix.com",
      "domain": "netflix.com",
      "mcc": "5968",
      "confidence": 0.99,
      "match": {
        "method": "substring",
        "matched_on": "NETFLIX COM"
      },
      "counterparty": null
    },
    {
      "input": "From Ali Raza (SadaPay) (Incoming transfer)",
      "matched": false,
      "merchant_name": null,
      "merchant_id": null,
      "category": null,
      "subcategory": null,
      "country": null,
      "logo_url": null,
      "website": null,
      "domain": null,
      "mcc": null,
      "confidence": 0.0,
      "match": {
        "method": "none",
        "matched_on": null
      },
      "counterparty": {
        "name": "Ali Raza",
        "raw_name": "Ali Raza",
        "bank": "SadaPay",
        "channel": "wallet",
        "direction": "in",
        "confidence": "high"
      }
    }
  ]
}

POST/v1/statements/analyze

Analyse a bank or card statement · API key required

Upload a statement (PDF, CSV or Excel) and get back every transaction parsed, dated, classified and enriched with merchant details, plus insights: spending by category and merchant, monthly trend, recurring payments and subscriptions, transfers, fees and cash. The file is processed in memory and never stored. statement.confidence and statement.reconciliation tell you whether the parse can be trusted: if the statement has a balance column, every row is checked against it.

Responses
StatusMeaning
200Successful Response AnalysisResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
413The request body is too large (1 MB for most endpoints; statements may be larger, see /v1/meta). ErrorResponse
415That file type isn't supported. Upload a PDF, CSV or Excel (.xlsx) statement. ErrorResponse
422The file was read but no transactions could be extracted (for example a scanned PDF, a password-protected PDF, or a file that isn't a statement). details[].reason says which. ErrorResponse

POST/v1/transactions/analyze

Analyse a list of transactions · API key required

Same enrichment and insights as /statements/analyze, for transactions you already have as structured data (up to 5000). Include balance when you can: it makes direction detection and the self-check reliable.

Request body · TransactionsRequest
FieldTypeDescription
transactionsrequiredarray of TransactionIn
currencystring | nullISO currency code, used for labelling only.
Responses
StatusMeaning
200Successful Response AnalysisResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
413The request body is too large (1 MB for most endpoints; statements may be larger, see /v1/meta). ErrorResponse
422The file was read but no transactions could be extracted (for example a scanned PDF, a password-protected PDF, or a file that isn't a statement). details[].reason says which. ErrorResponse

POST/v1/transactions/bulk

Submit customer transactions · API key required

Submit up to 5000 transactions for one customer: a full history or just the new ones. Each transaction is validated on its own (a bad one is rejected with a reason; the rest are processed), de-duplicated (re-sending an id is idempotent; the same payment under two ids is flagged), enriched (your merchant block, or Merchant Intelligence), stored, and the customer's subscriptions are re-analysed so existing records update in place.

Request body · BulkIngestRequest
FieldTypeDescription
customer_idrequiredstring e.g. "CUST001"
transactionsrequiredarray of IngestTransaction1 to 5000 transactions. Historical and incremental uploads both work.
Responses
StatusMeaning
200Successful Response BulkIngestResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

POST/v1/subscriptions/analyze

Detect a customer's subscriptions · API key required

Analyse the customer's submitted history: recurring payments are detected, given a billing frequency and confidence, classified (subscription vs bill vs obligation vs repeated purchase), consolidated into records with stable ids, and totalled per currency. Confidence comes from the detection engine and the history available; it is not fixed.

Request body · AnalyzeRequest
FieldTypeDescription
customer_idrequiredstring e.g. "CUST001"
analysis_period_monthsintegerHow far back from as_of to look. Annual subscriptions need more than 12 months to be seen twice.
include_forecastsbooleanInclude upcoming_payments (next 7 and 30 days).
as_ofstring | nullDate to analyse as of (status and forecasts are relative to it). Defaults to today (UTC). Remembered: later uploads for this customer re-analyse with the same settings.
Responses
StatusMeaning
200Successful Response AnalyzeResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

GET/v1/customers/{customer_id}/subscriptions

List a customer's subscriptions · API key required

Records from the latest analysis. Subscriptions only by default; classification=all adds bills, obligations and repeated purchases.

Responses
StatusMeaning
200Successful Response SubscriptionList
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

GET/v1/subscriptions/{subscription_id}

Get one subscription · API key required

Merchant details, full payment history, billing frequency, amounts, price changes, irregularities, forecast, confidence and status.

Responses
StatusMeaning
200Successful Response SubscriptionDetail
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

GET/v1/customers/{customer_id}/subscription-analytics

Customer subscription analytics · API key required

Totals per currency, category and frequency breakdowns, upcoming payments and price changes, from the latest analysis.

Responses
StatusMeaning
200Successful Response AnalyticsResponse
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

DELETE/v1/customers/{customer_id}

Delete a customer's data · API key required

Permanently erases every transaction, subscription record and payment link stored for this customer (for example when they close their account or withdraw consent). Irreversible. Other customers are untouched.

Responses
StatusMeaning
200Successful Response CustomerDeleted
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

GET/v1/customers/{customer_id}/transactions

List a customer's stored transactions · API key required

Every submitted transaction with its merchant enrichment and payment class (subscription payment, recurring bill, recurring obligation, ordinary purchase, unclassified, ...), newest first.

Responses
StatusMeaning
200Successful Response TransactionList
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse
404customer_not_found or subscription_not_found (also for ids that belong to another institution). ErrorResponse

GET/v1/events/types

List event types · No authentication

Every event type you can subscribe to, with a sample of its data. No key needed.

Responses
StatusMeaning
200Successful Response EventTypeList

GET/v1/webhooks

List your webhook endpoints · API key required

Responses
StatusMeaning
200Successful Response WebhookEndpointList
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

POST/v1/webhooks

Create a webhook endpoint · API key required

Receive events at your URL instead of polling. Each delivery is a POST of the event as JSON with a Tanzim-Signature: t=<unix time>,v1=<hex> header: the hex is HMAC-SHA256 of "<t>.<raw body>" with your signing secret (returned once, here). Verify it and reject timestamps older than 5 minutes. Answer any 2xx within 5 seconds; otherwise Tanzim retries after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h. Tanzim-Event-Id is stable across retries: use it to ignore duplicates. Redirects are not followed.

Request body · WebhookCreateRequest
FieldTypeDescription
urlrequiredstringYour HTTPS endpoint. It must be a public internet address (no localhost, private networks or redirects). e.g. "https://example.com/hooks/tanzim"
eventsarray of stringEvent types to receive, or ["*"] for all. See GET /v1/events/types. e.g. ["subscription.renewal_due"]
descriptionstring | nullA note for yourself.
Responses
StatusMeaning
201Successful Response WebhookEndpoint
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

GET/v1/webhooks/{endpoint_id}

Get a webhook endpoint · API key required

Responses
StatusMeaning
200Successful Response WebhookEndpoint
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

DELETE/v1/webhooks/{endpoint_id}

Delete a webhook endpoint · API key required

Stops deliveries and abandons any that are still waiting to be retried.

Responses
StatusMeaning
200Successful Response WebhookEndpoint
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

POST/v1/webhooks/{endpoint_id}/rotate-secret

Rotate the signing secret · API key required

Returns a new secret (shown once). The old secret stops working immediately, so deploy the new one first or accept both for a moment.

Responses
StatusMeaning
200Successful Response WebhookEndpoint
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

POST/v1/webhooks/{endpoint_id}/test

Send a test event · API key required

Simulate an event: sends a sample event (test: true) of the type you choose to this endpoint right now, with one attempt and no retries, and returns what happened (status, last_status_code, last_error). Use it to build and debug your handler.

Responses
StatusMeaning
200Successful Response WebhookDelivery
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

GET/v1/webhooks/{endpoint_id}/deliveries

Delivery log · API key required

The most recent deliveries to this endpoint, newest first: what was sent, how many attempts, and why a delivery failed.

Responses
StatusMeaning
200Successful Response WebhookDeliveryList
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

GET/v1/events

List events · API key required

The event log, newest first: the same events webhooks carry, for clients that cannot receive webhooks or want to catch up.

Responses
StatusMeaning
200Successful Response EventList
400The request body or a parameter is missing or malformed. details lists the offending fields. ErrorResponse
401missing_api_key or invalid_api_key. ErrorResponse
429Too many requests. Wait Retry-After seconds, then retry. ErrorResponse

Objects

Generated from the live OpenAPI document, so it always matches what the API really returns.

AmountRange

FieldTypeDescription
minrequirednumber
maxrequirednumber

AnalysisPeriod

FieldTypeDescription
monthsrequiredinteger
fromrequiredstring
torequiredstring

AnalysisResponse

FieldTypeDescription
request_idrequiredstring
engine_versionrequiredstring
statementrequiredStatementInfo
transactionsrequiredarray of StatementTransaction
insightsrequiredInsights

AnalyticsResponse

FieldTypeDescription
customer_idrequiredstring
as_ofrequiredstring
analysed_atstring | null
currencystring | null
mixed_currenciesrequiredboolean
total_subscriptionsrequiredinteger
active_subscriptionsrequiredintegerSubscriptions counted in the totals.
monthly_expenditurenumber | null
annualised_expenditurenumber | null
average_subscription_amountnumber | nullAverage monthly-equivalent amount of the counted subscriptions.
category_breakdownmap of number | null
frequency_breakdownrequiredmap of integer
monthly_subscriptionsrequiredinteger
annual_subscriptionsrequiredinteger
upcoming_paymentsrequiredintegerExpected payments in the next 30 days (subscriptions, bills and obligations).
upcoming_payments_7_daysrequiredinteger
upcomingrequiredarray of UpcomingPayment
price_changesrequiredarray of CustomerPriceChange
totals_by_currencyrequiredarray of CurrencyTotals
other_recurringrequiredOtherRecurringSummary

AnalyzeRequest

FieldTypeDescription
customer_idrequiredstring e.g. "CUST001"
analysis_period_monthsintegerHow far back from as_of to look. Annual subscriptions need more than 12 months to be seen twice.
include_forecastsbooleanInclude upcoming_payments (next 7 and 30 days).
as_ofstring | nullDate to analyse as of (status and forecasts are relative to it). Defaults to today (UTC). Remembered: later uploads for this customer re-analyse with the same settings.

AnalyzeResponse

FieldTypeDescription
customer_idrequiredstring
analysis_statusrequiredstring
as_ofrequiredstring
analysis_periodrequiredAnalysisPeriod
transactions_analysedrequiredinteger
total_subscriptionsrequiredinteger
monthly_expenditurenumber | nullNull when subscriptions are in more than one currency: see totals_by_currency. Currencies are never added together.
annualised_expenditurenumber | null
currencystring | null
mixed_currenciesrequiredboolean
category_breakdownmap of number | null
totals_by_currencyrequiredarray of CurrencyTotals
subscriptionsrequiredarray of Subscription
other_recurringrequiredarray of SubscriptionRecurring bills, obligations and repeated purchases: recurring, but not subscriptions.
transaction_classesrequiredmap of integerTransactions in the window per payment class: subscription_payment, recurring_bill, recurring_obligation, ordinary_purchase, unclassified, credit, failed, transfer, possible_duplicate.
upcoming_paymentsUpcoming | null
engine_versionrequiredstring
input_contract_versionrequiredstring

BatchRequest

FieldTypeDescription
itemsrequiredarray of EnrichRequest1 to 100 transactions. Results come back in the same order.

BatchResponse

FieldTypeDescription
request_idrequiredstring
engine_versionrequiredstring
resultsrequiredarray of EnrichResult

Body_analyze_statement_file_statements_analyze_post

FieldTypeDescription
filerequiredstringThe statement file: PDF (with selectable text), CSV or Excel (.xlsx).

BulkIngestRequest

FieldTypeDescription
customer_idrequiredstring e.g. "CUST001"
transactionsrequiredarray of IngestTransaction1 to 5000 transactions. Historical and incremental uploads both work.

BulkIngestResponse

FieldTypeDescription
successrequiredboolean
customer_idrequiredstring
transactions_receivedrequiredinteger
transactions_processedrequiredintegerNew transactions stored.
transactions_rejectedrequiredinteger
transactions_duplicaterequiredintegerAlready received earlier (idempotent replays).
possible_duplicatesrequiredinteger
statusrequiredstringcompleted: the transactions are stored and the customer's subscriptions re-analysed.
enrichmentrequiredEnrichmentCounts
rejectionsrequiredarray of RejectedWhy each rejected transaction was refused (first 200).
duplicatesrequiredarray of DuplicateFirst 200.
subscriptions_updatedrequiredbooleanTrue when the new transactions re-ran the customer's analysis.
total_subscriptionsrequiredinteger

CategoryCount

FieldTypeDescription
namerequiredstring
merchantsrequiredinteger

CategoryInsight

FieldTypeDescription
categoryrequiredstringMerchant category; unidentified spending is grouped as Unidentified.
amountrequirednumber
countrequiredinteger
sharerequirednumberShare of total spending, 0 to 1.
top_merchantsrequiredarray of string

ClientMerchant

Merchant Intelligence output you already have (the Enriched Transaction Data Contract). Send it and Tanzim uses it as is; leave it out and Tanzim resolves the merchant from the description.

FieldTypeDescription
merchant_idstring | nullYour/Merchant Intelligence's stable merchant id. e.g. "MER001"
merchant_namestring | nullCanonical merchant name. e.g. "Netflix"
categorystring | nullMerchant Intelligence category (e.g. Subscriptions & OTT, Utilities - Electricity). e.g. "Subscriptions & OTT"
subcategorystring | null e.g. "OTT - International"
confidencenumber | nullMerchant resolution confidence, 0 to 1. Defaults to 1.
logo_urlstring | null
domainstring | null
is_personboolean | nullTrue when the counterparty is a person (a transfer), not a merchant.

CounterpartyInfo

FieldTypeDescription
namerequiredstringThe other person's name with sensible capitalisation ("RAO EHTISHAM ALI KHAN" -> "Rao Ehtisham Ali Khan"). e.g. "Ali Raza"
raw_namerequiredstringExactly as printed on the statement (the account title returned by the bank's title fetch). e.g. "ALI RAZA"
bankstring | nullThe other party's bank or wallet, when the narration shows it. e.g. "HBL"
channelstring | nullibft, raast, wallet, transfer, or card (a card payment made to a person's name).
directionstring | nullin or out, from the wording of the narration. A statement's debit/credit is more reliable when you have it.
confidencerequiredstringhigh (two or more words) or low (a single word).

CounterpartyInsight

FieldTypeDescription
namerequiredstring
sentrequirednumber
receivedrequirednumber
countrequiredinteger

CurrencyTotals

FieldTypeDescription
currencyrequiredstring
subscriptionsrequiredinteger
counted_in_totalsrequiredinteger
monthly_expenditurerequirednumber
annualised_expenditurerequirednumber
average_monthly_subscriptionnumber | null
category_breakdownrequiredmap of number

CustomerDeleted

FieldTypeDescription
customer_idrequiredstring
deletedrequiredboolean
removedrequiredRemoved

CustomerPriceChange

FieldTypeDescription
daterequiredstring
transaction_idrequiredstring
directionrequiredstringincrease or decrease.
previous_averagerequirednumber
new_amountrequirednumber
change_amountrequirednumber
change_percentnumber | null
confirmedrequiredbooleanTrue once the new amount has been charged at least twice.
noterequiredstring
subscription_idrequiredstring
merchant_namerequiredstring
currencyrequiredstring

Duplicate

FieldTypeDescription
indexrequiredinteger
transaction_idrequiredstring
kindrequiredstringalready_received (same id and content as before: ignored) or possible_duplicate (same customer, date, amount, currency and description under a different id: stored, flagged, never counted twice).
duplicate_ofrequiredstring

EnrichRequest

FieldTypeDescription
descriptionrequiredstringThe raw transaction string exactly as it appears on the statement or card feed. e.g. "NETFLIX.COM 4029357689"
mccstring | nullOptional 4-digit Merchant Category Code from the card network. Used only as a fallback category when the merchant cannot be identified. mcc_code is accepted as an alias. e.g. "5968"

EnrichResponse

FieldTypeDescription
inputrequiredstringThe description you sent, echoed back (handy for batches).
matchedrequiredbooleanTrue when a specific merchant was identified. Check this before using merchant_name.
merchant_namestring | nullCanonical merchant name. null when matched is false. e.g. "Netflix"
merchant_idstring | nullStable id for the merchant: the same merchant always has the same id, across requests and clients. Use it to group transactions by merchant. null when matched is false. e.g. "mer_e42776aa5123"
categorystring | nullSpending category. When matched is false this is only set if you sent an mcc. e.g. "Subscriptions & OTT"
subcategorystring | null e.g. "OTT - International"
countrystring | nullISO 3166-1 alpha-2 country the merchant operates in, where known; otherwise null. e.g. "PK"
logo_urlstring | nullLogo/icon image URL. Checked to load when last verified; null when no working logo is known, so show your own placeholder (e.g. the merchant's initial).
websitestring | null e.g. "https://netflix.com"
domainstring | null e.g. "netflix.com"
mccstring | nullThe merchant's usual Merchant Category Code, where known. e.g. "5968"
confidencerequirednumberHow sure Tanzim is that merchant_name is right, 0 to 1. It is derived from the match method and similarity score, not a calibrated probability: treat >= 0.9 as reliable and anything lower as worth a human glance. Always 0 when matched is false. e.g. 0.99
matchrequiredMatch
counterpartyCounterpartyInfo | nullFor person-to-person transfers whose narration names the other person (IBFT / Raast / wallet title fetch): who it is. When present, matched is false unless a real merchant was identified.
request_idrequiredstringUnique id for this request; also sent as the X-Request-Id header.
engine_versionrequiredstringVersion of the matching engine + merchant data that produced this result. e.g. "3.1.0+18b095da"

EnrichResult

FieldTypeDescription
inputrequiredstringThe description you sent, echoed back (handy for batches).
matchedrequiredbooleanTrue when a specific merchant was identified. Check this before using merchant_name.
merchant_namestring | nullCanonical merchant name. null when matched is false. e.g. "Netflix"
merchant_idstring | nullStable id for the merchant: the same merchant always has the same id, across requests and clients. Use it to group transactions by merchant. null when matched is false. e.g. "mer_e42776aa5123"
categorystring | nullSpending category. When matched is false this is only set if you sent an mcc. e.g. "Subscriptions & OTT"
subcategorystring | null e.g. "OTT - International"
countrystring | nullISO 3166-1 alpha-2 country the merchant operates in, where known; otherwise null. e.g. "PK"
logo_urlstring | nullLogo/icon image URL. Checked to load when last verified; null when no working logo is known, so show your own placeholder (e.g. the merchant's initial).
websitestring | null e.g. "https://netflix.com"
domainstring | null e.g. "netflix.com"
mccstring | nullThe merchant's usual Merchant Category Code, where known. e.g. "5968"
confidencerequirednumberHow sure Tanzim is that merchant_name is right, 0 to 1. It is derived from the match method and similarity score, not a calibrated probability: treat >= 0.9 as reliable and anything lower as worth a human glance. Always 0 when matched is false. e.g. 0.99
matchrequiredMatch
counterpartyCounterpartyInfo | nullFor person-to-person transfers whose narration names the other person (IBFT / Raast / wallet title fetch): who it is. When present, matched is false unless a real merchant was identified.

EnrichmentCounts

FieldTypeDescription
merchant_suppliedrequiredintegerTransactions that arrived with a merchant block.
resolved_by_tanzimrequiredintegerResolved by Merchant Intelligence from the description.
unresolvedrequiredintegerMerchant not identified; grouped by a cleaned description instead.

ErrorBody

FieldTypeDescription
coderequiredstring e.g. "invalid_api_key"
messagerequiredstring
request_idrequiredstring
detailsarray of map of string | nullPer-field problems for invalid_request.

ErrorResponse

FieldTypeDescription
errorrequiredErrorBody

Event

FieldTypeDescription
idrequiredstring e.g. "evt_0a1b2c3d4e5f6a7b8c9d"
objectstring
typerequiredstring e.g. "subscription.renewal_due"
created_atrequiredstring
livemoderequiredboolean
testrequiredbooleanTrue for events sent by POST /v1/webhooks/{id}/test.
datarequiredobject

EventList

FieldTypeDescription
datarequiredarray of Event

EventType

FieldTypeDescription
typerequiredstring
descriptionrequiredstring
examplerequiredobjectWhat data looks like.

EventTypeList

FieldTypeDescription
datarequiredarray of EventType

ExampleItem

FieldTypeDescription
descriptionrequiredstring
mccstring | null
noterequiredstring
resultrequiredEnrichResult

ExamplesResponse

FieldTypeDescription
engine_versionrequiredstring
examplesrequiredarray of ExampleItem

Forecast

FieldTypeDescription
next_expected_paymentrequiredstring
estimated_amountrequirednumber
currencyrequiredstring
confidencerequirednumber
is_estimaterequiredboolean
noterequiredstring

Identification

FieldTypeDescription
spending_transactionsrequiredinteger
identified_transactionsrequiredinteger
identified_share_of_transactionsrequirednumber
identified_share_of_spendingrequirednumberHow much of the spending was matched to a known merchant, 0 to 1.
unidentified_toprequiredarray of UnidentifiedItemThe biggest spending items Tanzim could not identify.

IngestTransaction

FieldTypeDescription
transaction_idstring | null**Required.** Your unique id for the transaction. Re-sending an id is idempotent. e.g. "TXN001"
customer_idstring | nullOptional; must equal the request's customer_id if sent.
transaction_datestring | null**Required.** ISO 8601 date or datetime. e.g. "2026-01-01"
transaction_amountnumber | string | null**Required.** Amount in currency. Sign is ignored; transaction_type gives the direction. e.g. 1100
currencystring | null**Required.** ISO 4217 code. e.g. "PKR"
transaction_descriptionstring | null**Required.** The narration exactly as on the statement / card feed. e.g. "NETFLIX.COM"
transaction_typestring | null**Required.** DEBIT or CREDIT (also accepted: PURCHASE, PAYMENT, CARD, POS, DIRECT_DEBIT, REFUND, REVERSAL, ...). e.g. "DEBIT"
merchant_namestring | nullMerchant name from your card feed, if any. Tried when the description cannot be resolved.
merchant_category_codestring | null4-digit MCC. e.g. "4899"
card_identifierstring | nullA card token or last 4 digits. Full card numbers are rejected. e.g. "tok_8842"
transaction_referencestring | null
payment_channelstring | null e.g. "ECOM"
debit_credit_indicatorstring | nullD/C (or DR/CR, DEBIT/CREDIT); overrides transaction_type for the direction.
original_currencystring | nullCurrency the merchant charged in, for cross-currency card payments. e.g. "USD"
original_amountnumber | string | nullAmount in original_currency. Lets Tanzim tell an FX movement from a price change.
transaction_statusstring | nullPOSTED (default), PENDING, or FAILED / DECLINED / REVERSED. Failed payments are kept as irregularities, never as payments.
countrystring | null
merchant_idstring | nullThe card network's merchant id, if any (stored; not used for grouping).
payment_instrument_typestring | null e.g. "CARD"
merchantClientMerchant | nullPre-enriched merchant data from Merchant Intelligence (optional).

Insights

FieldTypeDescription
summaryrequiredSummary
by_kindrequiredarray of KindTotal
categoriesrequiredarray of CategoryInsight
top_merchantsrequiredarray of MerchantInsight
monthlyrequiredarray of MonthInsight
recurringrequiredarray of RecurringInsightRepeating payments (subscriptions, bills) detected from the dates and amounts.
monthly_recurring_totalrequirednumber
largest_transactionsrequiredarray of LargeTransaction
counterpartiesrequiredarray of CounterpartyInsight
payeesrequiredarray of PayeeInsightPeople you transact with, grouped across spellings, biggest first.
regular_unnamed_transfersrequiredarray of RegularTransferRepeating transfers with the same amount whose statement line names nobody: likely the same person or account. A pattern, not an identified payee.
transfer_summaryrequiredTransferSummary
identificationrequiredIdentification

Irregularity

FieldTypeDescription
typerequiredstringmissed_payment, failed_payment or one_off_amount (a single different amount followed by a return to the usual one: discount, tax, partial charge).
datestring | null
expected_datestring | null
amountnumber | null
usual_amountnumber | null
transaction_idstring | null

KeyCreated

FieldTypeDescription
keyrequiredstringThe API key. Shown ONCE — store it now. e.g. "tz_test_..."
idrequiredstring
prefixrequiredstringFirst characters of the key, to recognise it later.
environmentrequiredstringtest for now. Test keys are rate limited and their inputs are logged to improve Tanzim.
created_atrequiredstring
rate_limitsrequiredRateLimits
messagerequiredstring

KeyRequest

FieldTypeDescription
namestring | nullWhat you're building (shown only to you). e.g. "My budgeting app"
emailstring | nullOptional, but lets us tell you about breaking changes and quota.
sourcestring | nullFree-form label for where the key was requested from.

KindTotal

FieldTypeDescription
kindrequiredstring
countrequiredinteger
debit_amountrequirednumber
credit_amountrequirednumber

LargeTransaction

FieldTypeDescription
daterequiredstring
descriptionrequiredstring
amountrequirednumber
merchantstring | null
kindrequiredstring

Match

FieldTypeDescription
methodrequiredstringHow the merchant was identified: exact (the whole string is a known name), substring (a known name appears inside it), fuzzy (a close misspelling/partial match), mcc_fallback (merchant unknown, category taken from the MCC you sent) or none. e.g. "substring"
matched_onstring | nullThe known name/alias that matched, normalised. Useful for debugging. e.g. "NETFLIX COM"

Me

FieldTypeDescription
key_idrequiredstring
prefixrequiredstring
environmentrequiredstring
namestring | null
created_atrequiredstring
rate_limitsrequiredRateLimits
usagerequiredUsage

MerchantDetails

FieldTypeDescription
merchant_idrequiredstring
merchant_namerequiredstring
resolvedrequiredboolean
resolution_confidencerequirednumber
categoryrequiredstring
source_categorystring | null
source_subcategorystring | null
logo_urlstring | null
domainstring | null

MerchantInsight

FieldTypeDescription
namerequiredstring
categorystring | null
logo_urlstring | null
domainstring | null
countrequiredinteger
amountrequirednumber
averagerequirednumber
sharerequirednumber
first_daterequiredstring
last_daterequiredstring

Meta

FieldTypeDescription
api_versionrequiredstring
contract_versionrequiredstring
engine_versionrequiredstring
environmentrequiredstring
merchant_countrequiredintegerMerchants with a full profile.
alias_countrequiredintegerDistinct name variants the engine recognises.
categoriesrequiredarray of CategoryCount
rate_limitsrequiredRateLimits
max_batch_sizerequiredinteger
subscription_engine_versionstring | nullVersion of the Subscription Intelligence detection engine.

MonthInsight

FieldTypeDescription
monthrequiredstringYYYY-MM
countrequiredinteger
spendingrequirednumber
transfers_outrequirednumber
creditsrequirednumber
netrequirednumber

OtherRecurringSummary

FieldTypeDescription
countrequiredinteger
by_classificationrequiredmap of integer
totals_by_currencyrequiredarray of CurrencyTotals

PayeeInsight

FieldTypeDescription
payee_idrequiredstring
namerequiredstringThe fullest spelling seen, capitalisation normalised.
aliasesrequiredarray of stringOther spellings of the same person seen on the statement.
banksrequiredarray of string
channelsrequiredarray of string
sentrequirednumberTotal you sent them.
receivedrequirednumberTotal they sent you.
sent_countrequiredinteger
received_countrequiredinteger
first_daterequiredstring
last_daterequiredstring
typical_sentnumber | nullMedian amount you send them.
typical_interval_daysnumber | nullMedian days between transactions with them (needs 3 or more).
regularrequiredbooleanThree or more transactions across at least two months.
relationshiprequiredstringyou pay them, they pay you or two-way.

PaymentRecord

FieldTypeDescription
transaction_idrequiredstring
payment_daterequiredstring
amountrequirednumber
currencyrequiredstring
descriptionrequiredstring
statusrequiredstring
original_currencystring | null
original_amountnumber | null

PriceChange

FieldTypeDescription
daterequiredstring
transaction_idrequiredstring
directionrequiredstringincrease or decrease.
previous_averagerequirednumber
new_amountrequirednumber
change_amountrequirednumber
change_percentnumber | null
confirmedrequiredbooleanTrue once the new amount has been charged at least twice.
noterequiredstring

RateLimits

FieldTypeDescription
per_minuterequiredinteger
per_dayrequiredinteger
statements_per_hourintegerStatement analyses (file uploads or /transactions/analyze calls) per hour.

Reconciliation

FieldTypeDescription
methodstring | nullrunning_balance: every row was checked against the statement's balance column.
checkedintegerRows that could be checked against the running balance.
matchedintegerRows whose amount and direction agree with the running balance.
match_ratenumber | nullmatched / checked. At or above 0.98 the parse is almost certainly right.
opening_to_closing_differencenumber | nullopening balance + credits - debits - closing balance. 0 when the statement adds up.
totals_matchboolean | nullTrue when opening + credits - debits equals the closing balance.

RecurringInsight

FieldTypeDescription
namerequiredstring
categorystring | null
logo_urlstring | null
frequencyrequiredstringweekly, fortnightly, monthly, quarterly or yearly.
occurrencesrequiredinteger
typical_amountrequirednumber
amount_variesrequiredbooleanTrue for bills whose amount changes month to month (electricity, phone).
totalrequirednumber
first_daterequiredstring
last_daterequiredstring
next_expectedrequiredstring
monthly_costrequirednumberTypical amount converted to a per-month figure.
confidencerequiredstring
likely_subscriptionrequiredboolean

RegularTransfer

FieldTypeDescription
directionrequiredstringdebit (you send) or credit (you receive).
amountrequirednumber
countrequiredinteger
totalrequirednumber
first_daterequiredstring
last_daterequiredstring
typical_interval_daysnumber | null
share_of_transfersrequirednumberShare of that direction's transfers that have this exact amount.

Rejected

FieldTypeDescription
indexrequiredintegerPosition in the request's transactions array.
transaction_idstring | null
fieldrequiredstring
reasonrequiredstring

Removed

FieldTypeDescription
transactionsrequiredinteger
subscriptionsrequiredinteger
subscription_paymentsrequiredinteger

Revoked

FieldTypeDescription
revokedrequiredboolean

StatementInfo

FieldTypeDescription
formatrequiredstringcsv, xlsx, pdf or json.
filenamestring | null
currencyrequiredstring
transactionsrequiredintegerTransactions extracted.
rows_readrequiredinteger
rows_skippedrequiredintegerRows that were not transactions (totals, headers, notes) or could not be read.
confidencerequiredstringHow much to trust the parse: high, medium or low. high means the statement's own balances check out.
warningsrequiredarray of stringHuman-readable problems found while parsing. Show them to the user.
period_startstring | null
period_endstring | null
reconciliationReconciliation | nullSelf-check against the statement's balances. null when the statement has no balance column.

StatementTransaction

FieldTypeDescription
indexrequiredintegerPosition in the statement, starting at 0.
datestring | null
descriptionrequiredstring
amountrequirednumberAlways positive; see direction.
directionrequiredstringdebit (money out), credit (money in) or unknown.
balancenumber | null
kindrequiredstringWhat sort of transaction this is: merchant, transfer_in, transfer_out (person-to-person), cash, fee, income, interest, refund, bill_payment or unknown.
counterpartystring | nullThe other person in a transfer, when the narration names them (capitalisation normalised).
payee_idstring | nullStable id of that person within this statement: different spellings of one name share it.
counterparty_bankstring | nullThe other person's bank or wallet, when shown.
channelstring | nullibft, raast, wallet, transfer or card.
identifiedrequiredbooleanTrue when the merchant was identified with confidence of at least 0.9. Weaker guesses stay in enrichment (show them as "possibly ...") but are not used for categories, merchants or kinds.
enrichmentrequiredEnrichResultThe same result POST /v1/enrich returns for this narration.

StoredTransaction

FieldTypeDescription
transaction_idrequiredstring
transaction_daterequiredstring
amountrequirednumber
currencyrequiredstring
directionrequiredstring
statusrequiredstring
original_descriptionrequiredstring
merchantrequiredTxMerchant
enrichment_sourcerequiredstringclient (sent with a merchant block) or tanzim (resolved by Merchant Intelligence).
payment_classstring | nullOne of: subscription_payment, recurring_bill, recurring_obligation, ordinary_purchase, unclassified, credit, failed, transfer, possible_duplicate. Null until analysed.
subscription_idstring | nullThe recurring relationship this transaction belongs to, if any.
duplicate_ofstring | null

Subscription

FieldTypeDescription
subscription_idrequiredstring
customer_idrequiredstring
merchant_idrequiredstring
merchant_namerequiredstring
merchant_resolvedrequiredbooleanFalse when Merchant Intelligence could not identify the merchant (grouped by cleaned description).
merchant_confidencerequirednumber
logo_urlstring | null
domainstring | null
categoryrequiredstringOne of: Entertainment, Software and SaaS, Music and Streaming, Gaming, Cloud Services, Telecommunications, Utilities, Insurance, Financial Services, Shopping and Retail, Food and Delivery, Transportation, Other.
source_categorystring | nullThe Merchant Intelligence category it was derived from.
source_subcategorystring | null
classificationrequiredstringsubscription, recurring_bill (utilities, telecom), recurring_obligation (insurance, EMIs, fees) or recurring_payment (a repeated purchase, not a commitment).
detectionrequiredstringconfirmed_subscription (confirmed by the observed payment history), probable_subscription, or recurring_payment. A payment pattern cannot prove a merchant-side contract exists.
is_subscriptionrequiredboolean
frequencyrequiredstringOne of: weekly, fortnightly, monthly, bimonthly, quarterly, semi_annual, annual, irregular.
average_amountrequirednumber
last_amountrequirednumber
expected_amountrequirednumberExpected next payment: the current price (after any price change), or the recent average for variable amounts.
monthly_equivalentnumber | nullexpected_amount converted to a month: weekly x 52/12, fortnightly x 26/12, quarterly / 3, ...
annualised_equivalentnumber | null
currencyrequiredstring
amount_patternrequiredstringfixed, stepped (price changed), variable (metered bills), or fixed_in_original_currency (only FX moved).
payment_countrequiredinteger
total_paidrequirednumber
first_observed_daterequiredstring
last_payment_daterequiredstring
next_expected_paymentstring | nullEstimate, not a guaranteed billing date.
recurrence_confidencerequirednumberHow sure Tanzim is that the payment recurs at frequency, from the number of payments, interval regularity and amount stability.
classification_confidencerequirednumberHow sure Tanzim is of classification (recurrence x merchant category evidence x merchant resolution confidence).
forecast_confidencerequirednumber
statusrequiredstringEstimated from the pattern: active_pattern, observed_recurring (too little history to say more), uncertain (the expected payment is late) or inactive (expected payments missed).
status_reasonrequiredstring
included_in_totalsrequiredbooleanCounted in monthly/annualised expenditure (status active_pattern or observed_recurring).
price_changesrequiredarray of PriceChange
irregularitiesrequiredarray of Irregularity
failed_payment_countrequiredinteger
as_ofrequiredstring
created_atstring | null
updated_atstring | null

SubscriptionDetail

FieldTypeDescription
subscription_idrequiredstring
customer_idrequiredstring
merchant_idrequiredstring
merchant_namerequiredstring
merchant_resolvedrequiredbooleanFalse when Merchant Intelligence could not identify the merchant (grouped by cleaned description).
merchant_confidencerequirednumber
logo_urlstring | null
domainstring | null
categoryrequiredstringOne of: Entertainment, Software and SaaS, Music and Streaming, Gaming, Cloud Services, Telecommunications, Utilities, Insurance, Financial Services, Shopping and Retail, Food and Delivery, Transportation, Other.
source_categorystring | nullThe Merchant Intelligence category it was derived from.
source_subcategorystring | null
classificationrequiredstringsubscription, recurring_bill (utilities, telecom), recurring_obligation (insurance, EMIs, fees) or recurring_payment (a repeated purchase, not a commitment).
detectionrequiredstringconfirmed_subscription (confirmed by the observed payment history), probable_subscription, or recurring_payment. A payment pattern cannot prove a merchant-side contract exists.
is_subscriptionrequiredboolean
frequencyrequiredstringOne of: weekly, fortnightly, monthly, bimonthly, quarterly, semi_annual, annual, irregular.
average_amountrequirednumber
last_amountrequirednumber
expected_amountrequirednumberExpected next payment: the current price (after any price change), or the recent average for variable amounts.
monthly_equivalentnumber | nullexpected_amount converted to a month: weekly x 52/12, fortnightly x 26/12, quarterly / 3, ...
annualised_equivalentnumber | null
currencyrequiredstring
amount_patternrequiredstringfixed, stepped (price changed), variable (metered bills), or fixed_in_original_currency (only FX moved).
payment_countrequiredinteger
total_paidrequirednumber
first_observed_daterequiredstring
last_payment_daterequiredstring
next_expected_paymentstring | nullEstimate, not a guaranteed billing date.
recurrence_confidencerequirednumberHow sure Tanzim is that the payment recurs at frequency, from the number of payments, interval regularity and amount stability.
classification_confidencerequirednumberHow sure Tanzim is of classification (recurrence x merchant category evidence x merchant resolution confidence).
forecast_confidencerequirednumber
statusrequiredstringEstimated from the pattern: active_pattern, observed_recurring (too little history to say more), uncertain (the expected payment is late) or inactive (expected payments missed).
status_reasonrequiredstring
included_in_totalsrequiredbooleanCounted in monthly/annualised expenditure (status active_pattern or observed_recurring).
price_changesrequiredarray of PriceChange
irregularitiesrequiredarray of Irregularity
failed_payment_countrequiredinteger
as_ofrequiredstring
created_atstring | null
updated_atstring | null
merchantrequiredMerchantDetails
payment_historyrequiredarray of PaymentRecord
amount_rangeAmountRange | null
forecastForecast | null

SubscriptionList

FieldTypeDescription
customer_idrequiredstring
as_ofstring | null
analysed_atstring | null
totalrequiredinteger
limitrequiredinteger
offsetrequiredinteger
has_morerequiredboolean
next_offsetinteger | null
subscriptionsrequiredarray of Subscription

Summary

FieldTypeDescription
currencyrequiredstring
transaction_countrequiredinteger
period_startstring | null
period_endstring | null
daysrequiredinteger
total_debitsrequirednumberAll money out, including transfers.
total_creditsrequirednumber
netrequirednumbertotal_credits - total_debits.
spendingrequirednumberMoney out excluding person-to-person transfers.
transfers_outrequirednumber
transfers_inrequirednumber
incomerequirednumberCredits recognised as salary/payroll.
average_daily_spendingrequirednumber
average_transactionrequirednumberAverage spending transaction.

TransactionIn

FieldTypeDescription
daterequiredstringTransaction date: 2026-01-31, 31/01/2026 (day first), 31-Jan-2026 and similar are understood. e.g. "2026-01-31"
descriptionrequiredstringThe narration exactly as the statement shows it. e.g. "POS/KHAADI PKG MALL LHR PK"
amountrequirednumber | stringAmount. A number (negative = debit when direction is omitted) or text such as "1,250.00 Dr" or "(1,250.00)". e.g. 1250.0
directionstring | nullIf you know it. Otherwise it is inferred from the sign, a Dr/Cr marker or the balance.
balancenumber | string | nullRunning balance after this transaction, if you have it. It makes direction detection and the self-check far more reliable.

TransactionList

FieldTypeDescription
customer_idrequiredstring
totalrequiredinteger
limitrequiredinteger
offsetrequiredinteger
has_morerequiredboolean
next_offsetinteger | null
transactionsrequiredarray of StoredTransaction

TransactionsRequest

FieldTypeDescription
transactionsrequiredarray of TransactionIn
currencystring | nullISO currency code, used for labelling only.

TransferSummary

FieldTypeDescription
transfersrequiredinteger
namedrequiredintegerTransfers where the statement names the other person.
named_sharerequirednumberMany statements print only a reference, not a name: when this is low, regular_unnamed_transfers is the useful view.

TxMerchant

FieldTypeDescription
merchant_idrequiredstring
merchant_namerequiredstring
resolvedrequiredboolean
categorystring | null
subcategorystring | null
confidencerequirednumber

UnidentifiedItem

FieldTypeDescription
descriptionrequiredstring
countrequiredinteger
amountrequirednumber

Upcoming

FieldTypeDescription
next_7_daysrequiredarray of UpcomingPayment
next_30_daysrequiredarray of UpcomingPayment
noterequiredstring

UpcomingPayment

FieldTypeDescription
subscription_idrequiredstring
merchant_namerequiredstring
categoryrequiredstring
classificationrequiredstring
expected_daterequiredstring
days_untilrequiredinteger
estimated_amountrequirednumber
currencyrequiredstring
forecast_confidencerequirednumber
is_estimaterequiredboolean

Usage

FieldTypeDescription
last_24hrequiredintegerTransactions enriched with this key in the last 24 hours.

WebhookCreateRequest

FieldTypeDescription
urlrequiredstringYour HTTPS endpoint. It must be a public internet address (no localhost, private networks or redirects). e.g. "https://example.com/hooks/tanzim"
eventsarray of stringEvent types to receive, or ["*"] for all. See GET /v1/events/types. e.g. ["subscription.renewal_due"]
descriptionstring | nullA note for yourself.

WebhookDelivery

FieldTypeDescription
idrequiredstring
objectstring
event_idrequiredstring
event_typerequiredstring
endpoint_idrequiredstring
statusrequiredstringpending (will be retried), succeeded or failed (gave up).
attemptsrequiredinteger
next_attempt_atstring | null
last_status_codeinteger | null
last_errorstring | null
delivered_atstring | null
created_atrequiredstring

WebhookDeliveryList

FieldTypeDescription
datarequiredarray of WebhookDelivery

WebhookEndpoint

FieldTypeDescription
idrequiredstring e.g. "we_1a2b3c4d5e6f7a8b"
objectstring
urlrequiredstring
eventsrequiredarray of string
descriptionstring | null
activerequiredbooleanFalse once deleted or switched off after repeated failures (disabled_reason).
disabled_reasonstring | nulldeleted or too_many_failures.
livemoderequiredboolean
created_atrequiredstring
secretstring | nullThe signing secret. Shown ONCE, when the endpoint is created or its secret rotated: store it now. e.g. "whsec_..."

WebhookEndpointList

FieldTypeDescription
datarequiredarray of WebhookEndpoint

WebhookTestRequest

FieldTypeDescription
typestringwebhook.test or any event type from GET /v1/events/types: a sample event of that type is sent. e.g. "subscription.renewal_due"

Errors

Every error has the same shape and an X-Request-Id header:

{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is unknown or has been revoked.",
    "request_id": "req_…"
  }
}
codeHTTPMeaning
invalid_request400The request body or a parameter is missing or malformed. details lists the offending fields.
missing_api_key401No API key was sent. Use Authorization: Bearer <key> or X-API-Key: <key>.
invalid_api_key401The API key is unknown or has been revoked.
wrong_environment403This key belongs to the other environment. Test keys (tz_test_…) work only on the sandbox base URL and live keys (tz_live_…) only on the production base URL.
self_serve_disabled403Self-serve keys are only available on the sandbox. Production keys are issued after onboarding.
webhook_not_found404No webhook endpoint with that id on this account.
webhook_limit_reached409Too many active webhook endpoints on this account (5). Delete one first.
not_found404No such endpoint.
customer_not_found404No transactions have been submitted for that customer_id with this institution's keys.
subscription_not_found404No subscription with that id for this institution.
method_not_allowed405That endpoint does not support this HTTP method.
payload_too_large413The request body is too large (1 MB for most endpoints; statements may be larger, see /v1/meta).
rate_limited429Too many requests. Wait Retry-After seconds, then retry.
unsupported_file415That file type isn't supported. Upload a PDF, CSV or Excel (.xlsx) statement.
statement_unreadable422The file was read but no transactions could be extracted (for example a scanned PDF, a password-protected PDF, or a file that isn't a statement). details[].reason says which.
internal_error500Something went wrong on our side. Quote the request_id if you contact us.

Branch on error.code, not on the message text.

Rate limits

Test keys: 120 transactions per minute and 10000 per day (a batch of N counts as N). Responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds); a 429 includes Retry-After. Batches take up to 100 items.

Integration tips

Categories

Accessories & Jewelry, App Stores & Gaming, Apparel, Auto, Banks & EMIs, Beauty & Wellness, Books & Stationery, Cafes & Coffee, Charity & Donations, Clubs, Courier & Logistics, E-commerce, Education, Electronics, Entertainment, Fitness, Footwear, Freelance & Ads, Fuel, Government & Tax, Groceries, Healthcare, Home & Furniture, Insurance, Investments & Savings, Kids & Baby, Lifestyle & Variety, Payment Aggregators, Pharmacy, Q-commerce & Delivery, Real Estate, Remittances & FX, Restaurants, Ride-hailing & Mobility, Sporting Goods, Sports & Recreation, Subscriptions & OTT, Telecom, Transit & Toll, Travel, Utilities - Electricity, Utilities - Gas, Utilities - Water

Data & privacy

Test-key requests are logged with their input so we can improve matching; live keys never store your inputs. Don't send real personal data from test keys. Failed and low-confidence enrichments are reviewed to add missing merchants, which is how coverage improves over time.

Machine-readable