Using customer_country Query Parameter

In 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.

Why use 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.

Requirements

Example: Creating a Transaction

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]"
    }
  }
}

Example: Getting an Estimate

GET /v1/estimate?from_currency=EUR&to_currency=BTC&from_amount=100&customer_country=US

Important Notes

For more details on country-related configurations, please consult your Guardarian account manager.