{"templateId":"markdown","versions":[{"version":"9.0","label":"9.0","link":"/classes/whmcs/billing/vat/vatnumber","default":true,"active":true,"folderId":"9d7dc099"},{"version":"8.13","label":"8.13","link":"/classes/8.13/whmcs/billing/vat/vatnumber","default":false,"active":false,"folderId":"9d7dc099"}],"sharedDataIds":{"sidebar":"sidebar-classes/@8.13/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"WHMCS\\Billing\\VAT\\VatNumber","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"whmcsbillingvatvatnumber","__idx":0},"children":["WHMCS\\Billing\\VAT\\VatNumber"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Class"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":1},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"factoryfromidentifier","__idx":2},"children":["factoryFromIdentifier"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public static function factoryFromIdentifier(string $identifier): self\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$identifier"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["static"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"factoryfrominput","__idx":3},"children":["factoryFromInput"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public static function factoryFromInput(string $input): self\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create new instance, normalizing input prior to instantiation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$input"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["static"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getidentifier","__idx":4},"children":["getIdentifier"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getIdentifier(): string\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Full string representation of a VAT number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getprefix","__idx":5},"children":["getPrefix"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getPrefix(): string\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(country) prefix related to the VAT number."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["WHMCS has a legacy that UK VAT number may or may not have the GB prefix."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getnumber","__idx":6},"children":["getNumber"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getNumber(): string\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The number portion of the VAT number (ie, sans any prefix). Note while"," ","by convention this is named a number, there may be alpha characters"," ","present."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isuk","__idx":7},"children":["isUK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isUK(): bool\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Should the VAT number be treated as belonging to a UK business entity"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iseu","__idx":8},"children":["isEU"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isEU(): bool\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Should the VAT number be treated as belonging to a country in the EEA"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isvalid","__idx":9},"children":["isValid"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isValid(): bool\n","lang":"php"},"children":[]}]},"headings":[{"value":"WHMCS\\Billing\\VAT\\VatNumber","id":"whmcsbillingvatvatnumber","depth":1},{"value":"Methods","id":"methods","depth":2},{"value":"factoryFromIdentifier","id":"factoryfromidentifier","depth":3},{"value":"factoryFromInput","id":"factoryfrominput","depth":3},{"value":"getIdentifier","id":"getidentifier","depth":3},{"value":"getPrefix","id":"getprefix","depth":3},{"value":"getNumber","id":"getnumber","depth":3},{"value":"isUK","id":"isuk","depth":3},{"value":"isEU","id":"iseu","depth":3},{"value":"isValid","id":"isvalid","depth":3}],"frontmatter":{"title":"WHMCS\\Billing\\VAT\\VatNumber","seo":{"title":"WHMCS\\Billing\\VAT\\VatNumber"}},"lastModified":"2026-08-05T14:37:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/classes/whmcs/billing/vat/vatnumber","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}