Library

Transaction enrichment library for Java

Use TxnKit as a transaction enrichment API from Java. This page shows the safe request shape, a short code snippet, and the boundary for keeping sensitive data out of the integration.

Target intent

Java services that need merchant cleanup through an HTTP enrichment API.

TxnKit does not replace account-linking, banking aggregation, or Java persistence code.

Raw descriptor

AMZN MKTP CA*2R41

Short Java API snippet

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.txnkit.dev/v1/enrich"))
    .timeout(Duration.ofSeconds(1))
    .header("Authorization", "Bearer " + System.getenv("TXNKIT_API_KEY"))
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(
      "{"raw_description":"AMZN MKTP CA*2R41","country":"CA"}"
    ))
    .build();

Keep API keys out of browser bundles. For frontend stacks, call a backend route or serverless function that owns the TxnKit request.

API-shaped output

{
  "input": {
    "descriptor": "AMZN MKTP CA*2R41",
    "country": "CA"
  },
  "output": {
    "merchant_name": "Amazon Marketplace",
    "category": "Online marketplace",
    "confidence": "medium",
    "signals": [
      "processor_pattern",
      "merchant_alias",
      "category_hint"
    ],
    "warnings": [
      "review_low_confidence_matches_before_showing_logo"
    ],
    "logos": []
  }
}

Low-confidence results should keep fallback labels and warnings visible instead of forcing a guessed logo or website.

When to use

  • You are building in Java and need one-descriptor merchant cleanup through an HTTP API.
  • Your app can keep the TxnKit API key on the server side or inside a trusted serverless function.
  • You need merchant display names, categories, confidence, signals, warnings, and logo-ready metadata.

When not to use

  • TxnKit does not replace account-linking, banking aggregation, or Java persistence code.
  • Do not use TxnKit to process card numbers, account numbers, full statements, bank credentials, emails, phone numbers, addresses, customer names, or customer PII.
  • Do not use TxnKit when the product requirement is guaranteed merchant identity, every-merchant resolution, or contracted uptime terms.

Proof surfaces

The public contract is POST /v1/enrich, backed by the OpenAPI file, benchmark examples, privacy rules, and deterministic request-path tests.

OpenAPI · Benchmark · Security · Pricing

Related pages