> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ixopay.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ixopay.ferndocs.com/_mcp/server.

# CustomerIpCountry

Matches transactions whose customer IP-resolved country (via GeoIP) is (or is not) in a configured list. Shown as "Customer IP Country" in the condition catalogue.

## Parameters

| Field        | Type             | Required | Allowed values                                                    |
| ------------ | ---------------- | -------- | ----------------------------------------------------------------- |
| `countries`  | array of strings | yes      | One or more ISO 3166-1 alpha-2 country codes, e.g. `["US", "CA"]` |
| `comparator` | string           | yes      | `"in"` or `"notin"`                                               |

## Example

```json
{
  "constraint": "CustomerIpCountry",
  "params": {
    "countries": ["US", "CA"],
    "comparator": "notin"
  }
}
```

## Notes

* Country comparison is case-insensitive, but ISO 3166-1 alpha-2 uppercase form is the recommended canonical input.
* The Provisioning API requires the modern multi-country shape shown above. The legacy single-country shape (`&#123;"country": "US"&#125;`) is no longer accepted via this endpoint — and a payload that mixes both `country` and `countries` is rejected outright.
* If the transaction has no customer attached, the rule is skipped and routing falls through to the default connector.
* Included in every platform package.
* Also available in multi-method routing documents.