Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

EU & UK VAT Validator & Rate Engine — Rust Client Crate

Crates.io Documentation License: MIT Stanza API

Deterministic offline checksum validator for EU-27 and UK VAT numbers with instant 2026 standard & reduced tax rate lookups.

Official high-performance, asynchronous Rust client library for EU & UK VAT Validator & Rate Engine, built on the Stanza Micro-API Network. Uses pure Rustls TLS (zero C/OpenSSL dependencies) and Tokio for maximum concurrency and safety.


📦 Installation

Add to your Cargo.toml:

[dependencies]
stanzaapi-vat-validator = "1.0.0"
tokio = { version = "1.0", features = ["full"] }

Or use cargo add:

cargo add stanzaapi-vat-validator

🚀 Quickstart

use stanzaapi_vat_validator::VatValidatorClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Reads STANZA_API_KEY from environment automatically
    // Public edge default: https://api.stanzaapi.com/vat-validator
    let client = VatValidatorClient::new(None, None);

    let response = client.validate("DE123456789").await?;

    if response.success {
        println!("Verification Success: {:?}", response.data);
    } else {
        eprintln!("Validation Error: {:?}", response.error);
    }

    Ok(())
}

📄 Example Response

{
  "success": true,
  "data": {
    "valid": true,
    "vat_number": "DE123456789",
    "country_code": "DE",
    "standard_rate": 19,
    "reduced_rate": 7
  }
}

🔗 Useful Links

📄 License

MIT © Stanza — Powered by Stanza.

Releases

Packages

Contributors

Languages