# Force payment by customer country

**Force payment by customer country** function can be activated once you allow customers to checkout in different currencies.

This allows customers to place orders in their local currency.

The customers can select or switch currencies anytime in the store, but it will force payment based on billing/shipping country **at checkout**.\
\
To apply this feature on checkout, you should enable the "Force payment in a specific currency" function in the **Checkout Options** tab setting.<br>

<figure><img src="/files/vAIFfr5jHb1zmaRodZ91" alt="Enable force payment in a specific currency"><figcaption><p>Enable Force payment in a specific currency setting.</p></figcaption></figure>

You can utilize either Billing or Shipping option to force payment on checkout, which is flexible to use based on your aim. \
\
Here is the reference how it works on the frontend.

<figure><img src="/files/EAViFiuYHUw8yGf6XToH" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yDSZNkl9Ov87ItdeGFWr" alt=""><figcaption><p>Checkout form </p></figcaption></figure>

{% hint style="info" %}
**Note**:

This feature is premium-only.

Once **Force payment by customer country** is enabled, your customers won't be able to switch currency on the checkout page. The currency switcher displayed on sidebar/header/footer is still showing but unclickable.\
\
If you turn this feature on, you are unable to use the "Checkout in fallback currency" feature.&#x20;
{% endhint %}

#### Display force payment notice at checkout

Optionally, you can display a custom notice at checkout to let the customers know why their selected currency has been altered.

For example, “Paying in `%currency-selected%`  is not supported in your location. So your payment will be recorded in `%currency-by-country%`."

<figure><img src="/files/gq27NsVZQxd7ncW9XVxZ" alt=""><figcaption></figcaption></figure>

Use these variables to output the values:

| Variable                | Front-end value                                        |
| ----------------------- | ------------------------------------------------------ |
| `%currency-selected%`   | Display previously selected currency.                  |
| `%currency-by-country%` | Display currency based on billing or shipping country. |
| `%billing-country%`     | Display billing country.                               |
| `%shipping-country%`    | Display shipping country.                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yaycommerce.com/yaycurrency/configurations/checkout-options/force-payment-by-customer-country.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
