{"id":36267819,"url":"https://github.com/sebwalk/statement","last_synced_at":"2026-01-11T08:41:57.649Z","repository":{"id":57069572,"uuid":"123308050","full_name":"sebwalk/statement","owner":"sebwalk","description":":money_with_wings: Read, parse and match bank statements","archived":false,"fork":false,"pushed_at":"2018-04-09T11:41:08.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-21T04:57:14.875Z","etag":null,"topics":["bank-statement","csv","import","matching","parser"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebwalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-28T16:00:41.000Z","updated_at":"2024-09-17T07:12:04.000Z","dependencies_parsed_at":"2022-08-24T14:54:17.920Z","dependency_job_id":null,"html_url":"https://github.com/sebwalk/statement","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/sebwalk/statement","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebwalk%2Fstatement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebwalk%2Fstatement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebwalk%2Fstatement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebwalk%2Fstatement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebwalk","download_url":"https://codeload.github.com/sebwalk/statement/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebwalk%2Fstatement/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28298861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bank-statement","csv","import","matching","parser"],"created_at":"2026-01-11T08:41:57.026Z","updated_at":"2026-01-11T08:41:57.643Z","avatar_url":"https://github.com/sebwalk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# statement\nA **PHP library** to **read, parse and match** bank account exports.\n\nYou can use statement to\n\n- Parse CSV bank statements into usable PHP classes\n- Guess column mappings\n- Match domain objects with transaction descriptions (e.g. for payment processing)\n\n## Installation\n```\ncomposer require sebastianwalker/statement\n```\n\n## Transactions\n```php\n// Transaction ($amount, $description, $payer, $iban, $date)\n$transaction = new \\SebastianWalker\\Statement\\Transaction(12.34, \"Desc\", \"John Doe\", \"DE...00\", new \\Carbon\\Carbon(\"2018-02-12\"));\n\n$transaction-\u003egetAmount(); // float\n\n$transaction-\u003egetDescription(); // string\n\n$transaction-\u003egetPayer(); // string\n\n$transaction-\u003egetIban(); // string | null\n\n$transaction-\u003egetDate(); // Carbon instance: http://carbon.nesbot.com/docs/\n```\n\n## Importing statements\n### From CSV\n\n```php\n// FromCsv($filename, $delimiter, $known_mapping, $known_offset)\n$importer = new \\SebastianWalker\\Statement\\Importers\\FromCsv(\"file.csv\");\n\n// Get the imported transactions\n$transactions = $importer-\u003egetTransactions();\n\n// Get the mapping used (guessed + known_mapping)\n$mapping = $importer-\u003egetMapping();\n/*[\n  \"amount\"=\u003e\"Amount\",\n  \"description\"=\u003e\"Description\",\n  \"payer\"=\u003e\"Payer/Payee\",\n  \"iban\"=\u003e\"IBAN\",\n  \"date\"=\u003e\"Valuta Date\"\n]*/\n\n// Get the column titles usable for mapping as an array\n$columns = $importer-\u003egetColumns();\n```\n\n### From Array\n```php\n// FromArray($transactions)\n$importer = new \\SebastianWalker\\Statement\\Importers\\FromArray([/*Array of Transactions*/]);\n\n// Get the imported transactions\n$transactions = $importer-\u003egetTransactions();\n```\n\n## Matching Transactions with Domain Objects\n\n### Matching by Prefix\nAsk your payers to include a transaction description of {Your Prefix}{Your Object Identifier} when sending the funds.  \n_Example Description: PFIX-12345678_\n\n```php\n$matcher = new \\SebastianWalker\\Statement\\Matchers\\PrefixMatcher(\"PFIX-\");\n\n// Get all matching entities that are referenced in a given transaction\n$matches = $matcher-\u003egetEntities($transaction);\n```\n\nThe prefix matcher looks for occurrences in the transaction's description of the given prefix and returns the appended part of each of them.\n\n### Matching by Entity List\nAsk your payers to include an object identifier (e.g. their record's id) in the transaction description when sending the funds.\n_Example Description: 12345678_\n\n```php\n// Pass basic strings\n$matcher = new \\SebastianWalker\\Statement\\Matchers\\ListMatcher([\"1234\",\"5678\",\"9012\"]);\n\n// OR set a property which will be matched\n$matcher = new \\SebastianWalker\\Statement\\Matchers\\ListMatcher([\n    [\"id\"=\u003e\"1234\"],\n    [\"id\"=\u003e\"5678\"],\n    [\"id\"=\u003e\"9012\"]\n], \"id\");\n\n// Get all matching entities that are referenced in a given transaction\n$matches = $matcher-\u003egetEntities($transaction);\n```\n\nThe list matcher looks for occurences in the transaction's description of the items contained in the given list and returns all matching items.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebwalk%2Fstatement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebwalk%2Fstatement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebwalk%2Fstatement/lists"}