{"id":37104678,"url":"https://github.com/johnae/vat","last_synced_at":"2026-01-14T12:38:49.310Z","repository":{"id":57575391,"uuid":"129911007","full_name":"johnae/vat","owner":"johnae","description":"Go package for dealing with EU VAT. Does VAT number validation \u0026 rates retrieval.","archived":false,"fork":true,"pushed_at":"2018-04-19T14:41:01.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T11:13:27.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dannyvankooten/vat","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-17T13:44:24.000Z","updated_at":"2018-04-19T14:40:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/johnae/vat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/johnae/vat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnae%2Fvat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnae%2Fvat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnae%2Fvat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnae%2Fvat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnae","download_url":"https://codeload.github.com/johnae/vat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnae%2Fvat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-14T12:38:48.618Z","updated_at":"2026-01-14T12:38:49.294Z","avatar_url":"https://github.com/johnae.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Package vat\n===\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/dannyvankooten/vat)](https://goreportcard.com/report/github.com/dannyvankooten/vat)\n[![GoDoc](https://godoc.org/github.com/dannyvankooten/vat?status.svg)](https://godoc.org/github.com/dannyvankooten/vat)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dannyvankooten/vat/master/LICENSE)\n\nPackage for validating VAT numbers \u0026 retrieving VAT rates in Go.\n\n## Installation\n\nUse go get.\n\n```\ngo get github.com/dannyvankooten/vat\n```\n\nThen import the package into your own code.\n\n```\nimport \"github.com/dannyvankooten/vat\"\n```\n\n## Usage\n\n### Validating VAT numbers\n\nVAT numbers can be validated by format, existence or both. VAT numbers are looked up using the [VIES VAT validation API](http://ec.europa.eu/taxation_customs/vies/).\n\n```go\npackage main\n\nimport \"github.com/dannyvankooten/vat\"\n\nfunc main() {\n  // Validate number by format + existence\n  validity, err := vat.ValidateNumber(\"NL123456789B01\")\n\n  // Validate number format\n  validity, err := vat.ValidateNumberFormat(\"NL123456789B01\")\n\n  // Validate number existence\n  validity, err := vat.ValidateNumberExistence(\"NL123456789B01\")\n}\n```\n\n### Retrieving VAT rates\n\nTo get VAT rate periods for a country, first get a CountryRates struct using the country's ISO-3166-1-alpha2 code.\n\nYou can get the rate that is currently in effect using the `GetRate` function.\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/dannyvankooten/vat\"\n)\n\nfunc main() {\n  c, err := vat.GetCountryRates(\"NL\")\n  r, err := c.GetRate(\"standard\")\n\n  fmt.Printf(\"Standard VAT rate for NL is %.2f\", r)\n  // Output: Standard VAT rate for NL is 21.00\n}\n```\n\n## License\n\nMIT licensed. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnae%2Fvat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnae%2Fvat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnae%2Fvat/lists"}