customer_country Query ParameterIn addition to the X-Forwarded-For, you can provide the customer’s country using the customer_country query parameter in the transaction and estimate requests.
This parameter is optional and can be enabled by request — please contact your account manager or [email protected] to activate this feature for your integration.
customer_country?By default, Guardarian detects the user’s country using their IP address (X-Forwarded-For header). However, if the customer_country query parameter is provided, it will take precedence over the IP-based detection.
This gives you more control over geolocation-sensitive flows such as compliance checks, offer availability, and user interface localization.
customer_country must be passed as a query parameter in the URL of the API request.DE, FR, US).POST /v1/transaction?customer_country=DE
Content-Type: application/json
{
"from_amount": 1200,
"from_currency": "EUR",
"to_currency": "BTC",
"from_network": "EUR",
"to_network": "BTC",
"customer": {
"contact_info": {
"email": "[email protected]"
}
}
}
GET /v1/estimate?from_currency=EUR&to_currency=BTC&from_amount=100&customer_country=US
customer_country must be passed in the query string, not in the body or headers.X-Forwarded-For and customer_country are present, customer_country will override the IP-derived location.For more details on country-related configurations, please consult your Guardarian account manager.