---
title: Validate Billing Address
---

[Skip to content](#%5Ftop) 

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

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

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Validate Billing Address

billing.address\_validation(BillingAddressValidationParams\*\*kwargs)  \-> [BillingAddressValidationResponse](https://developers.cloudflare.com/api/python/resources/billing#%28resource%29%20billing%20%3E%20%28model%29%20billing%5Faddress%5Fvalidation%5Fresponse%20%3E%20%28schema%29)

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 

address: Optional\[str\]

Address line 1.

address2: Optional\[str\]

Address line 2.

city: Optional\[str\]

City.

country: Optional\[str\]

Country code.

state: Optional\[str\]

State or province.

zipcode: Optional\[str\]

Postal or zip code.

##### ReturnsExpand Collapse 

class BillingAddressValidationResponse: …

validated\_addresses: Optional\[List\[ValidatedAddress\]\]

List of validated address suggestions.

address: Optional\[str\]

Validated address line 1.

address2: Optional\[str\]

Validated address line 2.

city: Optional\[str\]

Validated city.

country: Optional\[str\]

Validated country code.

state: Optional\[str\]

Validated state or province.

validation\_code: Optional\[str\]

The validation result code.

zipcode: Optional\[str\]

Validated postal or zip code.

### Validate Billing Address

Python

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.billing.address_validation()
print(response.validated_addresses)
```

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
}
```