API reference

Bank Check OCR API: request, response, and field reference

Submit a cheque image, receive structured fields with per-field confidence, and route uncertain values before they are posted. This page documents the public contract; your base URL and credentials are provisioned separately.

EndpointPOST {BASE_URL}/v1/extract
AuthenticationAuthorization: Bearer $CHEQUEDB_API_KEY
Content typemultipart/form-data
Front imagefront_image (JPEG, PNG, TIFF)
Back imageback_image (optional; endorsement/back-side evidence)
OptionsJSON string: extract_micr, extract_amount, extract_payee, extract_date, validate_amounts, confidence_threshold
ResponseJSON: extraction ID, status, image quality, MICR, amount, payee, date, validation summary

1. Submit a cheque

Send a multipart POST to the provisioned base URL. The example uses shell variables so credentials are not hard-coded.

export BASE_URL="https://your-chequedb-host"
export CHEQUEDB_API_KEY="your_api_key"

curl -X POST "$BASE_URL/v1/extract" \
  -H "Authorization: Bearer $CHEQUEDB_API_KEY" \
  -F "front_image=@cheque-front.jpg" \
  -F "back_image=@cheque-back.jpg" \
  -F 'options={
    "extract_micr": true,
    "extract_amount": true,
    "extract_payee": true,
    "extract_date": true,
    "validate_amounts": true,
    "confidence_threshold": 0.85
  }'

Python example:

import os
import json
import requests

base_url = os.environ["CHEQUEDB_BASE_URL"].rstrip("/")
api_key = os.environ["CHEQUEDB_API_KEY"]

with open("cheque-front.jpg", "rb") as front:
    files = {"front_image": front}
    data = {
        "options": json.dumps({
            "extract_micr": True,
            "extract_amount": True,
            "extract_payee": True,
            "extract_date": True,
            "validate_amounts": True,
            "confidence_threshold": 0.85,
        })
    }
    response = requests.post(
        f"{base_url}/v1/extract",
        headers={"Authorization": f"Bearer {api_key}"},
        files=files,
        data=data,
        timeout=30,
    )
    response.raise_for_status()
    result = response.json()

print(result["extracted_data"]["payee"]["value"])
print(result["extracted_data"]["amount"]["numeric"])

2. Read the response

Every field carries a confidence score. The top-level requires_manual_review flag aggregates the field-level signals and is the canonical routing signal.

{
  "extraction_id": "ext_20260523_a1b2c3d4",
  "status": "success",
  "processing_time_ms": 310,
  "image_quality": {
    "front_score": 0.97,
    "status": "good"
  },
  "extracted_data": {
    "micr_line": {
      "raw": "⑆021000021⑈8675309001⑆1042⑈",
      "routing_number": { "value": "021000021", "confidence": 0.99 },
      "account_number": { "value": "8675309001", "confidence": 0.98 },
      "cheque_number":  { "value": "1042",       "confidence": 0.97 }
    },
    "amount": {
      "numeric":    1750.00,
      "written":    "One thousand seven hundred fifty and 00/100",
      "currency":   "USD",
      "confidence": 0.93,
      "validation": { "amounts_match": true }
    },
    "payee": {
      "value":        "Riverside Property Group",
      "confidence":   0.91,
      "needs_review": false
    },
    "date": {
      "value":      "2026-05-20",
      "confidence": 0.96,
      "validation": { "not_future": true, "not_stale": true }
    }
  },
  "validation_summary": {
    "overall_confidence":    0.95,
    "requires_manual_review": false
  }
}

Field reference

FieldMeaningUse
extraction_idStable ID for this processing attemptLink the result to the image and workflow record
statussuccess or error stateDo not parse fields when status is not success
image_qualityFront score and quality statusReject or rescan poor images before review
micr_lineRaw line plus routing, account, and cheque numberMatch the item to the deposit/clearing record
amount.numericCAR — amount in figuresCompare with LAR and policy limits
amount.writtenLAR — amount in wordsCompare with CAR; route mismatches
amount.validation.amounts_matchCAR/LAR agreement flagTreat false as an exception, not an average
payeePayee name, confidence, needs_reviewMatch against expected payer/payee and route low confidence
dateDate value, confidence, not_future/not_stale flagsApply the jurisdiction rule and review boundary cases
validation_summaryOverall confidence and requires_manual_reviewCanonical routing signal for the review queue

Image requirements

  • • JPEG, PNG, or TIFF; front image required, back image optional.
  • • 200 DPI minimum; 300 DPI recommended for handwriting.
  • • 500 KB–10 MB per image; confirm current limits during sandbox access.
  • • Grayscale or color; keep all four corners visible and avoid shadow/skew.
  • • Use synthetic or de-identified images until the DPA and security review are complete.

Error handling

  • • 400 — malformed multipart, missing image, invalid options.
  • • 401 — missing/invalid Bearer token.
  • • 413 — image or request exceeds the provisioned limit.
  • • 429 — rate limit; retry with backoff and jitter.
  • • 5xx — retry with backoff; persist the extraction ID and request context.

Confirm the current error schema and rate limits for your deployment. Do not retry a 4xx without changing the request.

What this API does not do

  • • It does not approve a deposit, clear an item, or move funds.
  • • It does not verify signature identity; it returns evidence for review.
  • • It does not replace the bank’s eligibility, acceptance, or settlement decision.
  • • It does not publish X9.37 or ACH output in this contract; confirm the clearing path separately.

Related resources

Bank check OCR API questions

What is the Chequedb bank check OCR endpoint?

The contract is POST {BASE_URL}/v1/extract with a Bearer API key and multipart form data. Your provisioned base URL and key are issued during onboarding; the public example uses BASE_URL because environments are separate.

Does the API accept front and back images?

Yes. Send front_image and, where endorsement or back-side evidence matters, back_image. The response returns the extracted fields and image-quality signals for the submitted images.

What image formats and sizes are supported?

Use JPEG, PNG, or TIFF at 200 DPI minimum (300 DPI recommended for handwriting), 500 KB–10 MB per image. Confirm the current limits for your deployment during sandbox access.

What does the API return?

The response includes an extraction ID, status, processing time, image quality, MICR line fields, numeric and written amounts, CAR/LAR validation, payee, date, and an overall validation summary with a manual-review flag.

Is the API a deposit or clearing decision?

No. The API extracts and validates fields. Customer eligibility, bank acceptance, deposit posting, clearing, returns, and settlement remain with the bank or deposit system. Do not treat a successful extraction as proof of deposit.

How do I get sandbox access?

Request sandbox access through the contact form. Use synthetic or de-identified images only; production cheque images require the agreed security, DPA, and data-handling terms.

This is a contract guide. The provisioned base URL, credentials, rate limits, and enabled fields are confirmed during onboarding. Do not send production cheque images before the security and data-handling review is complete.