---
title: Validate Billing Address
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[Billing](https://developers.cloudflare.com/api/go/resources/billing)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Validate Billing Address

client.Billing.AddressValidation(ctx, body) (\*[BillingAddressValidationResponse](https://developers.cloudflare.com/api/go/resources/billing#%28resource%29%20billing%20%3E%20%28model%29%20BillingAddressValidationResponse%20%3E%20%28schema%29), error)

POST/billing/address-validation

Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### ParametersExpand Collapse 

body BillingAddressValidationParams

Address param.Field\[string\]Optional

Address line 1.

Address2 param.Field\[string\]Optional

Address line 2.

City param.Field\[string\]Optional

City.

Country param.Field\[string\]Optional

Country code.

State param.Field\[string\]Optional

State or province.

Zipcode param.Field\[string\]Optional

Postal or zip code.

##### ReturnsExpand Collapse 

type BillingAddressValidationResponse struct{…}

ValidatedAddresses \[\]BillingAddressValidationResponseValidatedAddressOptional

List of validated address suggestions.

Address stringOptional

Validated address line 1.

Address2 stringOptional

Validated address line 2.

City stringOptional

Validated city.

Country stringOptional

Validated country code.

State stringOptional

Validated state or province.

ValidationCode stringOptional

The validation result code.

Zipcode stringOptional

Validated postal or zip code.

### Validate Billing Address

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/billing"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Billing.AddressValidation(context.TODO(), billing.BillingAddressValidationParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ValidatedAddresses)
}

```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "validated_addresses": [
      {
        "address": "address",
        "address2": "address2",
        "city": "city",
        "country": "country",
        "state": "state",
        "validation_code": "validation_code",
        "zipcode": "zipcode"
      }
    ]
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "validated_addresses": [
      {
        "address": "address",
        "address2": "address2",
        "city": "city",
        "country": "country",
        "state": "state",
        "validation_code": "validation_code",
        "zipcode": "zipcode"
      }
    ]
  },
  "success": true
}
```