Skip to content
HALOWERK

Formatwerk

payment matching

Deterministic matching in two passes. Pass 1 finds open-item ids in the remittance text and end-to-end id (compared without blanks, dashes and slashes; adjacent tokens are joined so "RE 1002" finds RE-1002): equal amount = matched, single item paid minus its cash discount before the discount deadline = matched with discount, lower amount = partial (oldest due date first), higher amount = overpaid. Pass 2 uses payer IBAN or name similarity (Levenshtein on normalised names without legal forms,.

POST https://format.halowerk.com/v1/payment-matching

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
paymentsarrayYesIncoming payments.
open_itemsarrayYesOpen receivables.
amount_tolerancestringNoAccepted absolute amount difference.
max_combinationintegerNoMaximum number of items combined into one payment.
allow_discountbooleanNoAccept payments reduced by the cash discount.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "payments",
    "open_items"
  ],
  "properties": {
    "payments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2000,
      "description": "Incoming payments.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "amount"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "description": "Payment id."
          },
          "amount": {
            "type": [
              "number",
              "string"
            ],
            "description": "Amount in EUR, positive, at most two decimal places (number or string such as \"100.50\")."
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Payment date."
          },
          "remittance": {
            "type": "string",
            "maxLength": 1000,
            "description": "Remittance information."
          },
          "payer_name": {
            "type": "string",
            "maxLength": 140,
            "description": "Payer name."
          },
          "payer_iban": {
            "type": "string",
            "maxLength": 42,
            "description": "Payer IBAN."
          },
          "end_to_end_id": {
            "type": "string",
            "maxLength": 35,
            "description": "End-to-end reference."
          }
        }
      }
    },
    "open_items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20000,
      "description": "Open receivables.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "amount"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Invoice or item number."
          },
          "amount": {
            "type": [
              "number",
              "string"
            ],
            "description": "Amount in EUR, positive, at most two decimal places (number or string such as \"100.50\")."
          },
          "due_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Due date."
          },
          "customer_name": {
            "type": "string",
            "maxLength": 140,
            "description": "Customer name."
          },
          "customer_iban": {
            "type": "string",
            "maxLength": 42,
            "description": "Known customer IBAN."
          },
          "discount_percent": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10,
            "description": "Cash discount in percent."
          },
          "discount_until": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Last day for the cash discount."
          }
        }
      }
    },
    "amount_tolerance": {
      "type": "string",
      "pattern": "^\\d{1,3}(\\.\\d{1,2})?$",
      "default": "0.00",
      "description": "Accepted absolute amount difference."
    },
    "max_combination": {
      "type": "integer",
      "minimum": 2,
      "maximum": 5,
      "default": 3,
      "description": "Maximum number of items combined into one payment."
    },
    "allow_discount": {
      "type": "boolean",
      "default": true,
      "description": "Accept payments reduced by the cash discount."
    }
  }
}

Open original schema

Published input example

{
  "payments": [
    {
      "id": "P1",
      "amount": "119.00",
      "remittance": "Rechnung RE-1001"
    }
  ],
  "open_items": [
    {
      "id": "RE-1001",
      "amount": "119.00",
      "customer_name": "Alpha GmbH"
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’