How to Validate ABN and GST Numbers in Australia via API

If you need to verify Australian business registrations in your application, the ABN (Australian Business Number) is the key identifier. This guide covers how to build ABN and GST validation into your application using Vatly.

ABN validation in checkout flows

For B2B transactions in Australia, collecting and verifying a customer's ABN is standard practice. A valid ABN with active GST registration determines whether to charge GST or apply a reverse charge. Here is how to integrate ABN validation into your checkout:

curl "https://api.vatly.dev/v1/validate?vat_number=AU51824753556" \
  -H "Authorization: Bearer vtly_live_YOUR_KEY"

Check data.valid in the response. If true, the business has an active GST registration and you can apply the appropriate tax treatment. If false, the ABN exists but the business is not GST-registered.

Handling edge cases

  • Invalid ABN checksum: Vatly validates the ABN checksum before hitting the ABR. If the checksum fails, you get a 422 invalid_vat_format error immediately. This catches typos without a network round-trip.
  • ABN exists but no GST: The response includes valid: false with company.name and company.address populated. The business exists but is not GST-registered.
  • ABN not found: The response includes valid: false with company: null. The ABN does not exist in the ABR.
  • ABR is down: Vatly serves a cached result with meta.stale: true if one exists. Otherwise, a 503 upstream_unavailable error is returned.

Batch validation for vendor onboarding

When onboarding multiple Australian vendors, use the batch endpoint to validate up to 50 ABNs in a single request (Pro and Business plans):

curl -X POST "https://api.vatly.dev/v1/validate/batch" \
  -H "Authorization: Bearer vtly_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vat_numbers": [
      "AU51824753556",
      "AU53004085616",
      "AU33102417032"
    ]
  }'

Each item in the response has its own data and meta block, so you can see which ABNs are valid and which failed individually.

TypeScript integration

The @vatly/node SDK makes integration straightforward:

import Vatly from "@vatly/node";

const vatly = new Vatly("vtly_live_YOUR_KEY");

// Single validation
const { data, error } = await vatly.vat.validate({
  vatNumber: "AU51824753556",
});
if (error) {
  console.error(error.code, error.message);
} else {
  console.log(data.data.valid, data.data.company?.name);
}

// Batch validation
const batch = await vatly.vat.validateBatch({
  vatNumbers: [
    "AU51824753556",
    "AU53004085616",
  ],
});

Python integration

The vatly Python package provides the same functionality with typed exceptions:

from vatly import Vatly

vatly = Vatly("vtly_live_YOUR_KEY")

# Single validation
result = vatly.vat.validate("AU51824753556")
if result.data.valid:
    print(result.data.company.name)

# Batch validation
batch = vatly.vat.validate_batch([
    "AU51824753556",
    "AU53004085616",
])

Input normalization

Vatly accepts multiple input formats for Australian ABNs:

  • AU51824753556 - standard format
  • ABN51824753556 - ABN prefix (converted to AU)
  • ABN 51 824 753 556 - with spaces (stripped automatically)
  • abn51824753556 - lowercase (uppercased automatically)

Get your API key and start validating Australian business numbers today.

Frequently asked questions

How do I validate an ABN in my checkout flow?

Pass the ABN with an AU prefix to the Vatly validate endpoint. If data.valid is true, the business has an active GST registration. If false, the ABN exists but has no GST registration. Handle the 422 error for invalid checksum to catch typos before the API call.

Can I validate multiple ABNs at once?

Yes. The batch endpoint accepts up to 50 VAT/GST numbers per request, including Australian ABNs. Each item returns independently, so one failed ABN does not block the others. Batch validation is available on Pro and Business plans.

What happens if the ABR is down?

Vatly serves a cached result with meta.stale: true if one exists. If no cached result is available, a 503 upstream_unavailable error is returned. Implement retry logic with exponential backoff for transient failures.