{"id":13412870,"url":"https://github.com/dannyvankooten/vat","last_synced_at":"2025-04-30T13:42:55.317Z","repository":{"id":44155551,"uuid":"61441685","full_name":"dannyvankooten/vat","owner":"dannyvankooten","description":"Go package for dealing with EU VAT. Does VAT number validation \u0026 rates retrieval.","archived":false,"fork":false,"pushed_at":"2023-11-07T19:31:09.000Z","size":34,"stargazers_count":114,"open_issues_count":3,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T13:42:43.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dannyvankooten.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-18T16:10:09.000Z","updated_at":"2025-04-25T11:30:33.000Z","dependencies_parsed_at":"2024-01-08T15:02:38.956Z","dependency_job_id":"ec3f8337-f9b0-4df7-93cd-db74b8c77ec6","html_url":"https://github.com/dannyvankooten/vat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fvat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fvat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fvat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fvat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannyvankooten","download_url":"https://codeload.github.com/dannyvankooten/vat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251713821,"owners_count":21631607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-30T20:01:30.411Z","updated_at":"2025-04-30T13:42:55.288Z","avatar_url":"https://github.com/dannyvankooten.png","language":"Go","funding_links":[],"categories":["Financial","金融领域相关库","金融","財經","\u003cspan id=\"金融-financial\"\u003e金融 Financial\u003c/span\u003e","Relational Databases","金融领域相关库`处理货币与金融领域的库`","财经","VAT, Customs, and Trade"],"sub_categories":["Advanced Console UIs","SQL 查询语句构建库","Search and Analytic Databases","检索及分析资料库","高級控制台界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"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 (from [ibericode/vat-rates](https://github.com/ibericode/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\n\u003e This package relies on a [community maintained repository of vat rates](https://github.com/ibericode/vat-rates). We invite you to toggle notifications for that repository and contribute changes to VAT rates in your country once they are announced.\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%2Fdannyvankooten%2Fvat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyvankooten%2Fvat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyvankooten%2Fvat/lists"}