{"openapi":"3.1.0","info":{"title":"Open Banking & Payment Intelligence API","version":"1.0.0","description":"Classify supplied transactions, detect recurring spend and subscriptions, resolve merchants, and summarize cashflow quality without connecting to a bank. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/payment-intelligence/open-banking-transaction-classify":{"post":{"operationId":"classify_open_banking_transactions","summary":"Classify open-banking transactions","description":"Classify supplied transactions using description, merchant, category, and amount-sign hints. No bank connection is used.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","accountId":"ACC-1","date":"2026-10-01","amount":3200,"currency":"GBP","description":"ACME payroll salary","direction":"credit","category":"income"},{"id":"TX-2","accountId":"ACC-1","date":"2026-10-03","amount":-14.99,"currency":"GBP","merchant":"Netflix","description":"Netflix subscription"},{"id":"TX-3","accountId":"ACC-1","date":"2026-10-04","amount":-62.4,"currency":"GBP","merchant":"Tesco","description":"Tesco groceries"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"itemCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"amountSupplied":{"type":"boolean"},"currency":{"type":"string"},"description":{"type":"string"},"merchant":{"type":"string"},"status":{"type":"string"},"reference":{"type":"string"},"category":{"type":"string"},"categorySource":{"type":"string"},"suppliedCategory":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"classified","itemCount":3,"items":[{"id":"TX-1","accountId":"ACC-1","date":"2026-10-01","amount":3200,"amountSupplied":true,"currency":"GBP","description":"ACME payroll salary","merchant":"","status":"","reference":"","category":"income","categorySource":"token_match","suppliedCategory":"income","bankConnected":false,"openBankingConnected":false},{"id":"TX-2","accountId":"ACC-1","date":"2026-10-03","amount":-14.99,"amountSupplied":true,"currency":"GBP","description":"Netflix subscription","merchant":"Netflix","status":"","reference":"","category":"subscription","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-3","accountId":"ACC-1","date":"2026-10-04","amount":-62.4,"amountSupplied":true,"currency":"GBP","description":"Tesco groceries","merchant":"Tesco","status":"","reference":"","category":"groceries","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/recurring-detect":{"post":{"operationId":"detect_recurring_payments","summary":"Detect recurring payments","description":"Detect repeating merchant and amount patterns from supplied transaction dates. Cadence is labeled from spacing only.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","accountId":"ACC-1","date":"2026-08-03","amount":-14.99,"currency":"GBP","merchant":"Netflix","description":"Netflix"},{"id":"TX-2","accountId":"ACC-1","date":"2026-09-03","amount":-14.99,"currency":"GBP","merchant":"Netflix","description":"Netflix"},{"id":"TX-3","accountId":"ACC-1","date":"2026-10-03","amount":-14.99,"currency":"GBP","merchant":"Netflix","description":"Netflix"},{"id":"TX-4","accountId":"ACC-1","date":"2026-10-10","amount":-22.5,"currency":"GBP","merchant":"Uber","description":"Uber trip"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"recurringCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"merchant":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"number"},"direction":{"type":"string"},"occurrenceCount":{"type":"number"},"averageGapDays":{"type":"number"},"averageGapDaysSupplied":{"type":"boolean"},"gapStdev":{"type":"number"},"gapStdevSupplied":{"type":"boolean"},"cadence":{"type":"string"},"recurring":{"type":"boolean"},"firstDate":{"type":"string"},"lastDate":{"type":"string"},"transactionIds":{"type":"array","items":{"type":"string"}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"detected","recurringCount":1,"items":[{"key":"netflix|14.99|gbp","merchant":"Netflix","currency":"GBP","amount":14.99,"direction":"debit","occurrenceCount":3,"averageGapDays":30.5,"averageGapDaysSupplied":true,"gapStdev":0.71,"gapStdevSupplied":true,"cadence":"monthly_candidate","recurring":true,"firstDate":"2026-08-03","lastDate":"2026-10-03","transactionIds":["TX-1","TX-2","TX-3"],"bankConnected":false,"openBankingConnected":false}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"recurring_candidate","subject":"Netflix","detail":"A repeating amount and date spacing pattern was found in supplied transactions."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/subscription-spend-identify":{"post":{"operationId":"identify_subscription_spend","summary":"Identify subscription spend","description":"Identify subscription candidates from recurring cadence and subscription wording in supplied merchants or descriptions.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","date":"2026-08-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"Spotify subscription"},{"id":"TX-2","date":"2026-09-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"Spotify subscription"},{"id":"TX-3","date":"2026-10-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"Spotify subscription"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"subscriptionCount":{"type":"number"},"estimatedMonthlySpend":{"type":"number"},"estimatedMonthlySpendSupplied":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"merchant":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"occurrenceCount":{"type":"number"},"averageGapDays":{"type":"number"},"averageGapDaysSupplied":{"type":"boolean"},"cadence":{"type":"string"},"estimatedMonthlySpend":{"type":"number"},"estimatedMonthlySpendSupplied":{"type":"boolean"},"firstDate":{"type":"string"},"lastDate":{"type":"string"},"transactionIds":{"type":"array","items":{"type":"string"}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"identified","subscriptionCount":1,"estimatedMonthlySpend":9.99,"estimatedMonthlySpendSupplied":true,"items":[{"merchant":"Spotify Premium","amount":9.99,"currency":"GBP","occurrenceCount":3,"averageGapDays":30.5,"averageGapDaysSupplied":true,"cadence":"monthly_candidate","estimatedMonthlySpend":9.99,"estimatedMonthlySpendSupplied":true,"firstDate":"2026-08-01","lastDate":"2026-10-01","transactionIds":["TX-1","TX-2","TX-3"],"bankConnected":false,"openBankingConnected":false}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"recurring_candidate","subject":"Spotify Premium","detail":"A repeating amount and date spacing pattern was found in supplied transactions."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/merchant-identity-resolve":{"post":{"operationId":"resolve_merchant_identity","summary":"Resolve merchant identity","description":"Match transaction merchants against a caller-supplied directory. Unmatched names keep the supplied transaction text.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"merchants":[{"id":"MER-1","name":"Netflix","aliases":["NFLX","Netflix.com"],"category":"subscription"}],"transactions":[{"id":"TX-1","date":"2026-10-03","amount":-14.99,"currency":"GBP","description":"NFLX 1234","merchant":"NFLX"},{"id":"TX-2","date":"2026-10-04","amount":-4.5,"currency":"GBP","description":"LOCAL CAFE LTD"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"matchedCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"rawMerchant":{"type":"string"},"rawDescription":{"type":"string"},"merchantId":{"type":"string"},"merchantName":{"type":"string"},"matched":{"type":"boolean"},"matchSource":{"type":"string"},"directoryCategory":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"resolved","matchedCount":1,"items":[{"transactionId":"TX-1","accountId":"","date":"2026-10-03","rawMerchant":"NFLX","rawDescription":"NFLX 1234","merchantId":"MER-1","merchantName":"Netflix","matched":true,"matchSource":"directory","directoryCategory":"subscription","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-2","accountId":"","date":"2026-10-04","rawMerchant":"","rawDescription":"LOCAL CAFE LTD","merchantId":"","merchantName":"LOCAL CAFE LTD","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"merchant_unmatched","subject":"TX-2","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/income-stability-analyze":{"post":{"operationId":"analyze_income_stability","summary":"Analyze income stability","description":"Summarize labeled income credits by month and report variability from supplied amounts only. Income is never invented.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","date":"2026-08-28","amount":3000,"currency":"GBP","description":"Employer payroll salary","direction":"credit"},{"id":"TX-2","date":"2026-09-28","amount":3000,"currency":"GBP","description":"Employer payroll salary","direction":"credit"},{"id":"TX-3","date":"2026-10-28","amount":3100,"currency":"GBP","description":"Employer payroll salary","direction":"credit"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"creditCount":{"type":"number"},"monthCount":{"type":"number"},"averageMonthlyIncome":{"type":"number"},"averageMonthlyIncomeSupplied":{"type":"boolean"},"incomeStdev":{"type":"number"},"incomeStdevSupplied":{"type":"boolean"},"coefficientOfVariation":{"type":"number"},"coefficientOfVariationSupplied":{"type":"boolean"},"stability":{"type":"string"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"total":{"type":"number"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"analyzed","creditCount":3,"monthCount":3,"averageMonthlyIncome":3033.33,"averageMonthlyIncomeSupplied":true,"incomeStdev":57.74,"incomeStdevSupplied":true,"coefficientOfVariation":0.019,"coefficientOfVariationSupplied":true,"stability":"stable","months":[{"month":"2026-08","total":3000},{"month":"2026-09","total":3000},{"month":"2026-10","total":3100}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/affordability-data-calculate":{"post":{"operationId":"calculate_affordability_data","summary":"Calculate affordability data","description":"Calculate inflow, outflow, subscription estimates, and income ratios from supplied transactions. No affordability decision is returned.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","date":"2026-08-28","amount":3000,"currency":"GBP","description":"salary payroll","direction":"credit"},{"id":"TX-2","date":"2026-09-28","amount":3000,"currency":"GBP","description":"salary payroll","direction":"credit"},{"id":"TX-3","date":"2026-10-28","amount":3000,"currency":"GBP","description":"salary payroll","direction":"credit"},{"id":"TX-4","date":"2026-08-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"subscription"},{"id":"TX-5","date":"2026-09-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"subscription"},{"id":"TX-6","date":"2026-10-01","amount":-9.99,"currency":"GBP","merchant":"Spotify Premium","description":"subscription"},{"id":"TX-7","date":"2026-10-05","amount":-400,"currency":"GBP","description":"rent landlord","direction":"debit"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"inflowTotal":{"type":"number"},"inflowTotalSupplied":{"type":"boolean"},"outflowTotal":{"type":"number"},"outflowTotalSupplied":{"type":"boolean"},"netCashflow":{"type":"number"},"netCashflowSupplied":{"type":"boolean"},"averageOutflow":{"type":"number"},"averageOutflowSupplied":{"type":"boolean"},"estimatedMonthlySubscriptions":{"type":"number"},"estimatedMonthlySubscriptionsSupplied":{"type":"boolean"},"averageMonthlyIncome":{"type":"number"},"averageMonthlyIncomeSupplied":{"type":"boolean"},"outflowToIncomeRatio":{"type":"number"},"outflowToIncomeRatioSupplied":{"type":"boolean"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"calculated","inflowTotal":9000,"inflowTotalSupplied":true,"outflowTotal":429.97,"outflowTotalSupplied":true,"netCashflow":8570.03,"netCashflowSupplied":true,"averageOutflow":107.49,"averageOutflowSupplied":true,"estimatedMonthlySubscriptions":9.99,"estimatedMonthlySubscriptionsSupplied":true,"averageMonthlyIncome":3000,"averageMonthlyIncomeSupplied":true,"outflowToIncomeRatio":0.0392,"outflowToIncomeRatioSupplied":true,"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"recurring_candidate","subject":"salary payroll","detail":"A repeating amount and date spacing pattern was found in supplied transactions."},{"kind":"observation","code":"recurring_candidate","subject":"Spotify Premium","detail":"A repeating amount and date spacing pattern was found in supplied transactions."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/failure-pattern-analyze":{"post":{"operationId":"analyze_payment_failure_patterns","summary":"Analyze payment failure patterns","description":"Find failed, declined, or returned payment wording and statuses in supplied transactions and group counts by merchant text.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","date":"2026-10-02","amount":-50,"currency":"GBP","merchant":"UtilityCo","description":"Direct debit failed insufficient funds","status":"failed"},{"id":"TX-2","date":"2026-10-09","amount":-50,"currency":"GBP","merchant":"UtilityCo","description":"Direct debit declined","status":"declined"},{"id":"TX-3","date":"2026-10-10","amount":-12,"currency":"GBP","merchant":"Shop","description":"Card purchase","status":"posted"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"failureCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"amountSupplied":{"type":"boolean"},"currency":{"type":"string"},"description":{"type":"string"},"merchant":{"type":"string"},"status":{"type":"string"},"reasonToken":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"patterns":{"type":"array","items":{"type":"object","properties":{"merchant":{"type":"string"},"failureCount":{"type":"number"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"analyzed","failureCount":2,"items":[{"id":"TX-1","accountId":"","date":"2026-10-02","amount":-50,"amountSupplied":true,"currency":"GBP","description":"Direct debit failed insufficient funds","merchant":"UtilityCo","status":"failed","reasonToken":"failed","bankConnected":false,"openBankingConnected":false},{"id":"TX-2","accountId":"","date":"2026-10-09","amount":-50,"amountSupplied":true,"currency":"GBP","description":"Direct debit declined","merchant":"UtilityCo","status":"declined","reasonToken":"declined","bankConnected":false,"openBankingConnected":false}],"patterns":[{"merchant":"utilityco","failureCount":2}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"payment_failures","subject":"","detail":"Failure-like statuses or wording were found in supplied transactions only."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/transaction-categorization-correct":{"post":{"operationId":"correct_transaction_categorization","summary":"Correct transaction categorization","description":"Apply caller-supplied category corrections to matching transaction ids or merchants without inventing categories.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"transactions":[{"id":"TX-1","date":"2026-10-03","amount":-14.99,"currency":"GBP","merchant":"Netflix","description":"Netflix","category":"shopping"},{"id":"TX-2","date":"2026-10-04","amount":-20,"currency":"GBP","merchant":"Tesco","description":"Tesco"}],"corrections":[{"transactionId":"TX-1","from":"shopping","to":"subscription"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"correctionCount":{"type":"number"},"appliedCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"merchant":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"applied":{"type":"boolean"},"matchedBy":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"corrected","correctionCount":1,"appliedCount":1,"items":[{"transactionId":"TX-1","merchant":"Netflix","from":"subscription","to":"subscription","applied":true,"matchedBy":"transaction_id","bankConnected":false,"openBankingConnected":false}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/account-cashflow-compare":{"post":{"operationId":"compare_account_cashflow","summary":"Compare account cashflow","description":"Consolidate inflow and outflow by account and compare pairs only when currencies match.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"accounts":[{"id":"ACC-1","name":"Current","currency":"GBP"},{"id":"ACC-2","name":"Savings","currency":"GBP"}],"transactions":[{"id":"TX-1","accountId":"ACC-1","date":"2026-10-01","amount":1000,"currency":"GBP","direction":"credit","description":"salary"},{"id":"TX-2","accountId":"ACC-1","date":"2026-10-02","amount":-200,"currency":"GBP","direction":"debit","description":"rent"},{"id":"TX-3","accountId":"ACC-2","date":"2026-10-01","amount":100,"currency":"GBP","direction":"credit","description":"interest credit"},{"id":"TX-4","accountId":"ACC-2","date":"2026-10-03","amount":-20,"currency":"GBP","direction":"debit","description":"fee"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"accountCount":{"type":"number"},"compatiblePairCount":{"type":"number"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"transactionCount":{"type":"number"},"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"pairs":{"type":"array","items":{"type":"object","properties":{"leftAccountId":{"type":"string"},"rightAccountId":{"type":"string"},"compatible":{"type":"boolean"},"reason":{"type":"string"},"leftNet":{"type":"number"},"rightNet":{"type":"number"},"netDelta":{"type":"number"},"netDeltaSupplied":{"type":"boolean"}},"additionalProperties":true}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"compared","accountCount":2,"compatiblePairCount":1,"accounts":[{"accountId":"ACC-1","name":"Current","currency":"GBP","transactionCount":2,"inflow":1000,"outflow":200,"net":800,"bankConnected":false,"openBankingConnected":false},{"accountId":"ACC-2","name":"Savings","currency":"GBP","transactionCount":2,"inflow":100,"outflow":20,"net":80,"bankConnected":false,"openBankingConnected":false}],"pairs":[{"leftAccountId":"ACC-1","rightAccountId":"ACC-2","compatible":true,"reason":"Compared because both accounts share the same supplied currency.","leftNet":800,"rightNet":80,"netDelta":720,"netDeltaSupplied":true}],"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/payment-intelligence/financial-data-quality-audit":{"post":{"operationId":"audit_financial_data_quality","summary":"Audit financial data quality","description":"Combine classification, recurring spend, merchants, income, failures, corrections, cashflow, and missing-field checks from supplied records.","tags":["payment-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"accounts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"currency":{"type":"string","maxLength":12},"type":{"type":"string","maxLength":80}},"additionalProperties":false}},"transactions":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"accountId":{"type":"string","maxLength":80},"date":{"type":"string","maxLength":40},"amount":{"type":"number","minimum":-1000000000,"maximum":1000000000},"currency":{"type":"string","maxLength":12},"description":{"type":"string","maxLength":500},"merchant":{"type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"type":"string","maxLength":80},"reference":{"type":"string","maxLength":160},"direction":{"type":"string","maxLength":40},"mcc":{"type":"string","maxLength":20}},"additionalProperties":false}},"merchants":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"category":{"type":"string","maxLength":120}},"additionalProperties":false}},"corrections":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","maxLength":80},"from":{"type":"string","maxLength":120},"to":{"type":"string","maxLength":120},"merchant":{"type":"string","maxLength":200}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"asOf":"2026-11-01","accounts":[{"id":"ACC-1","name":"Current","currency":"GBP"},{"id":"ACC-2","name":"Savings","currency":"GBP"}],"merchants":[{"id":"MER-1","name":"Netflix","aliases":["NFLX"],"category":"subscription"}],"transactions":[{"id":"TX-1","accountId":"ACC-1","date":"2026-08-28","amount":3000,"currency":"GBP","description":"payroll salary","direction":"credit"},{"id":"TX-2","accountId":"ACC-1","date":"2026-09-28","amount":3000,"currency":"GBP","description":"payroll salary","direction":"credit"},{"id":"TX-3","accountId":"ACC-1","date":"2026-10-28","amount":3000,"currency":"GBP","description":"payroll salary","direction":"credit"},{"id":"TX-4","accountId":"ACC-1","date":"2026-08-03","amount":-14.99,"currency":"GBP","merchant":"NFLX","description":"Netflix subscription"},{"id":"TX-5","accountId":"ACC-1","date":"2026-09-03","amount":-14.99,"currency":"GBP","merchant":"NFLX","description":"Netflix subscription"},{"id":"TX-6","accountId":"ACC-1","date":"2026-10-03","amount":-14.99,"currency":"GBP","merchant":"NFLX","description":"Netflix subscription"},{"id":"TX-7","accountId":"ACC-1","date":"2026-10-09","amount":-50,"currency":"GBP","merchant":"UtilityCo","description":"Direct debit failed","status":"failed"},{"id":"TX-8","accountId":"ACC-2","date":"2026-10-01","amount":50,"currency":"GBP","description":"interest credit","direction":"credit"}],"corrections":[{"transactionId":"TX-6","to":"subscription"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"asOf":{"type":"string"},"transactionCount":{"type":"number"},"recurringCount":{"type":"number"},"subscriptionCount":{"type":"number"},"matchedMerchantCount":{"type":"number"},"failureCount":{"type":"number"},"issueCount":{"type":"number"},"incomeStability":{"type":"string"},"classification":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"amountSupplied":{"type":"boolean"},"currency":{"type":"string"},"description":{"type":"string"},"merchant":{"type":"string"},"status":{"type":"string"},"reference":{"type":"string"},"category":{"type":"string"},"categorySource":{"type":"string"},"suppliedCategory":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"recurring":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"merchant":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"number"},"direction":{"type":"string"},"occurrenceCount":{"type":"number"},"averageGapDays":{"type":"number"},"averageGapDaysSupplied":{"type":"boolean"},"gapStdev":{"type":"number"},"gapStdevSupplied":{"type":"boolean"},"cadence":{"type":"string"},"recurring":{"type":"boolean"},"firstDate":{"type":"string"},"lastDate":{"type":"string"},"transactionIds":{"type":"array","items":{"type":"string"}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"subscriptions":{"type":"array","items":{"type":"object","properties":{"merchant":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"occurrenceCount":{"type":"number"},"averageGapDays":{"type":"number"},"averageGapDaysSupplied":{"type":"boolean"},"cadence":{"type":"string"},"estimatedMonthlySpend":{"type":"number"},"estimatedMonthlySpendSupplied":{"type":"boolean"},"firstDate":{"type":"string"},"lastDate":{"type":"string"},"transactionIds":{"type":"array","items":{"type":"string"}},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"merchants":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"rawMerchant":{"type":"string"},"rawDescription":{"type":"string"},"merchantId":{"type":"string"},"merchantName":{"type":"string"},"matched":{"type":"boolean"},"matchSource":{"type":"string"},"directoryCategory":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"income":{"type":"object","properties":{"averageMonthlyIncome":{"type":"number"},"averageMonthlyIncomeSupplied":{"type":"boolean"},"stability":{"type":"string"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"total":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true},"affordability":{"type":"object","properties":{"netCashflow":{"type":"number"},"netCashflowSupplied":{"type":"boolean"},"outflowToIncomeRatio":{"type":"number"},"outflowToIncomeRatioSupplied":{"type":"boolean"}},"additionalProperties":true},"failures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"amountSupplied":{"type":"boolean"},"currency":{"type":"string"},"description":{"type":"string"},"merchant":{"type":"string"},"status":{"type":"string"},"reasonToken":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"corrections":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"merchant":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"applied":{"type":"boolean"},"matchedBy":{"type":"string"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"cashflow":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"transactionCount":{"type":"number"},"inflow":{"type":"number"},"outflow":{"type":"number"},"net":{"type":"number"},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"}},"additionalProperties":true}},"quality":{"type":"object","properties":{"missingAmountCount":{"type":"number"},"missingDateCount":{"type":"number"},"missingAccountCount":{"type":"number"},"missingCurrencyCount":{"type":"number"},"duplicateIdCount":{"type":"number"},"issueCount":{"type":"number"}},"additionalProperties":true},"bankConnected":{"type":"boolean"},"openBankingConnected":{"type":"boolean"},"credentialsRequired":{"type":"boolean"},"incomeInvented":{"type":"boolean"},"affordabilityDecision":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"audited","asOf":"2026-11-01","transactionCount":8,"recurringCount":2,"subscriptionCount":1,"matchedMerchantCount":3,"failureCount":1,"issueCount":0,"incomeStability":"stable","classification":[{"id":"TX-1","accountId":"ACC-1","date":"2026-08-28","amount":3000,"amountSupplied":true,"currency":"GBP","description":"payroll salary","merchant":"","status":"","reference":"","category":"income","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-2","accountId":"ACC-1","date":"2026-09-28","amount":3000,"amountSupplied":true,"currency":"GBP","description":"payroll salary","merchant":"","status":"","reference":"","category":"income","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-3","accountId":"ACC-1","date":"2026-10-28","amount":3000,"amountSupplied":true,"currency":"GBP","description":"payroll salary","merchant":"","status":"","reference":"","category":"income","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-4","accountId":"ACC-1","date":"2026-08-03","amount":-14.99,"amountSupplied":true,"currency":"GBP","description":"Netflix subscription","merchant":"NFLX","status":"","reference":"","category":"subscription","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-5","accountId":"ACC-1","date":"2026-09-03","amount":-14.99,"amountSupplied":true,"currency":"GBP","description":"Netflix subscription","merchant":"NFLX","status":"","reference":"","category":"subscription","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-6","accountId":"ACC-1","date":"2026-10-03","amount":-14.99,"amountSupplied":true,"currency":"GBP","description":"Netflix subscription","merchant":"NFLX","status":"","reference":"","category":"subscription","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-7","accountId":"ACC-1","date":"2026-10-09","amount":-50,"amountSupplied":true,"currency":"GBP","description":"Direct debit failed","merchant":"UtilityCo","status":"failed","reference":"","category":"utilities","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false},{"id":"TX-8","accountId":"ACC-2","date":"2026-10-01","amount":50,"amountSupplied":true,"currency":"GBP","description":"interest credit","merchant":"","status":"","reference":"","category":"income","categorySource":"token_match","suppliedCategory":"","bankConnected":false,"openBankingConnected":false}],"recurring":[{"key":"payroll salary|3000|gbp","merchant":"payroll salary","currency":"GBP","amount":3000,"direction":"credit","occurrenceCount":3,"averageGapDays":30.5,"averageGapDaysSupplied":true,"gapStdev":0.71,"gapStdevSupplied":true,"cadence":"monthly_candidate","recurring":true,"firstDate":"2026-08-28","lastDate":"2026-10-28","transactionIds":["TX-1","TX-2","TX-3"],"bankConnected":false,"openBankingConnected":false},{"key":"netflix|14.99|gbp","merchant":"Netflix","currency":"GBP","amount":14.99,"direction":"debit","occurrenceCount":3,"averageGapDays":30.5,"averageGapDaysSupplied":true,"gapStdev":0.71,"gapStdevSupplied":true,"cadence":"monthly_candidate","recurring":true,"firstDate":"2026-08-03","lastDate":"2026-10-03","transactionIds":["TX-4","TX-5","TX-6"],"bankConnected":false,"openBankingConnected":false}],"subscriptions":[{"merchant":"Netflix","amount":14.99,"currency":"GBP","occurrenceCount":3,"averageGapDays":30.5,"averageGapDaysSupplied":true,"cadence":"monthly_candidate","estimatedMonthlySpend":14.99,"estimatedMonthlySpendSupplied":true,"firstDate":"2026-08-03","lastDate":"2026-10-03","transactionIds":["TX-4","TX-5","TX-6"],"bankConnected":false,"openBankingConnected":false}],"merchants":[{"transactionId":"TX-1","accountId":"ACC-1","date":"2026-08-28","rawMerchant":"","rawDescription":"payroll salary","merchantId":"","merchantName":"payroll salary","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-2","accountId":"ACC-1","date":"2026-09-28","rawMerchant":"","rawDescription":"payroll salary","merchantId":"","merchantName":"payroll salary","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-3","accountId":"ACC-1","date":"2026-10-28","rawMerchant":"","rawDescription":"payroll salary","merchantId":"","merchantName":"payroll salary","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-4","accountId":"ACC-1","date":"2026-08-03","rawMerchant":"NFLX","rawDescription":"Netflix subscription","merchantId":"MER-1","merchantName":"Netflix","matched":true,"matchSource":"directory","directoryCategory":"subscription","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-5","accountId":"ACC-1","date":"2026-09-03","rawMerchant":"NFLX","rawDescription":"Netflix subscription","merchantId":"MER-1","merchantName":"Netflix","matched":true,"matchSource":"directory","directoryCategory":"subscription","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-6","accountId":"ACC-1","date":"2026-10-03","rawMerchant":"NFLX","rawDescription":"Netflix subscription","merchantId":"MER-1","merchantName":"Netflix","matched":true,"matchSource":"directory","directoryCategory":"subscription","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-7","accountId":"ACC-1","date":"2026-10-09","rawMerchant":"UtilityCo","rawDescription":"Direct debit failed","merchantId":"","merchantName":"UtilityCo","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false},{"transactionId":"TX-8","accountId":"ACC-2","date":"2026-10-01","rawMerchant":"","rawDescription":"interest credit","merchantId":"","merchantName":"interest credit","matched":false,"matchSource":"transaction_text","directoryCategory":"","bankConnected":false,"openBankingConnected":false}],"income":{"averageMonthlyIncome":3016.67,"averageMonthlyIncomeSupplied":true,"stability":"stable","months":[{"month":"2026-08","total":3000},{"month":"2026-09","total":3000},{"month":"2026-10","total":3050}]},"affordability":{"netCashflow":8955.03,"netCashflowSupplied":true,"outflowToIncomeRatio":0.0128,"outflowToIncomeRatioSupplied":true},"failures":[{"id":"TX-7","accountId":"ACC-1","date":"2026-10-09","amount":-50,"amountSupplied":true,"currency":"GBP","description":"Direct debit failed","merchant":"UtilityCo","status":"failed","reasonToken":"failed","bankConnected":false,"openBankingConnected":false}],"corrections":[{"transactionId":"TX-6","merchant":"NFLX","from":"subscription","to":"subscription","applied":true,"matchedBy":"transaction_id","bankConnected":false,"openBankingConnected":false}],"cashflow":[{"accountId":"ACC-1","name":"Current","currency":"GBP","transactionCount":7,"inflow":9000,"outflow":94.97,"net":8905.03,"bankConnected":false,"openBankingConnected":false},{"accountId":"ACC-2","name":"Savings","currency":"GBP","transactionCount":1,"inflow":50,"outflow":0,"net":50,"bankConnected":false,"openBankingConnected":false}],"quality":{"missingAmountCount":0,"missingDateCount":0,"missingAccountCount":0,"missingCurrencyCount":0,"duplicateIdCount":0,"issueCount":0},"bankConnected":false,"openBankingConnected":false,"credentialsRequired":false,"incomeInvented":false,"affordabilityDecision":false,"findings":[{"kind":"observation","code":"recurring_candidate","subject":"payroll salary","detail":"A repeating amount and date spacing pattern was found in supplied transactions."},{"kind":"observation","code":"recurring_candidate","subject":"Netflix","detail":"A repeating amount and date spacing pattern was found in supplied transactions."},{"kind":"observation","code":"merchant_unmatched","subject":"TX-1","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."},{"kind":"observation","code":"merchant_unmatched","subject":"TX-2","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."},{"kind":"observation","code":"merchant_unmatched","subject":"TX-3","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."},{"kind":"observation","code":"merchant_unmatched","subject":"TX-7","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."},{"kind":"observation","code":"merchant_unmatched","subject":"TX-8","detail":"No supplied merchant directory entry matched. The transaction text was copied as the display name."},{"kind":"observation","code":"payment_failures","subject":"","detail":"Failure-like statuses or wording were found in supplied transactions only."}],"limitations":["Transactions, accounts, merchants, and category corrections are copied only from labeled fields supplied by the caller.","No bank account is connected and no Open Banking credentials are required or used.","Income, affordability, and merchant identity are derived only from supplied rows. Missing values are not invented.","Recurring and subscription detection use date spacing and description/merchant similarity from the supplied set only.","An affordability or credit decision is never produced."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.12"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}