# Automatic Setup

After [installing the plugin](/online-payments/plugins/magento-2-plugin-integration/installation.md), you need to configure the correct credentials that will associate it to your Verifone account.

Follow these steps to configure your payment settings.

1. In the Magento admin panel, go to *Stores* → *Configuration*.

   <div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/1_155.JPG" alt=""></div>
2. Under *Configuration*, click on the **Sales** tab and scroll down to **Payment methods**.

   <div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/2_109.JPG" alt=""></div>
3. Under *Payment methods*, you will see the **Verifone - Credit Card Hosted Payment** module.

   <div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/3_82.JPG" alt=""></div>

## Plugin Setup <a href="#plugin-setup" id="plugin-setup"></a>

The **Auto Setup Tool** pop-up will be displayed automatically, if this is your first time trying to configure the Verifone settings. If you already did the configuration, you can always access the tool as indicated below:

<div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/4_56.JPG" alt=""></div>

### Account settings <a href="#account-settings" id="account-settings"></a>

Enter the below information, to configure your Verifone account settings.

<div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/5_42.JPG" alt=""></div>

Enter the *User ID* and *API Key*, then press on **Continue**. Wait until a success or error message is displayed.

{% hint style="info" %}
You can use a Verifone test mode environment to test your integration by clicking on the **Sandbox** option (for this, you will need to have an account set up in the test environment). If the *Sandbox* option is selected, you will need to use the information from your test account (user ID, API key).\
If you wish to change the integration environment, you will need to return to the *Verifone account settings* section in your Magento admin, then **Auto Setup Tool** and update the API Key and User ID associated with the Verifone Account with the ones corresponding to the selected environment.
{% endhint %}

* **User ID**: The ID of the user that generated the [API key](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication.md) in [Verifone Central](https://docs.verifone.com/verifone-central-getting-started/). You can find this information in your Verifone Central account, under *Profile* → *API Keys*.
* **API Key**: The value of the API Key you created in Verifone Central, under the user icon > *API keys* > *Create API key*.
* **Verifone account region**: The region in which your Verifone account is created. Check your Verifone Central access URL if in doubt.

If the successful message displays, then the configuration is done. We recommend checking all tabs to verify all expected payment methods are enabled and clicking a final time on **Update settings**.

Two failed messages can be displayed:

* **Invalid credentials. Make sure you enter right credential/environment and try again!**: You must check if both the API Key and User ID are correctly entered, and the environment is properly chosen. If you are unsure what is your environment, contact your Verifone representative.
* **Account could not be auto-configured, manual configuration is required**: Follow the steps from the [Manual setup](/online-payments/plugins/magento-2-plugin-integration/manual-setup.md) documentation.

### (Optional) Display settings

<div data-with-frame="true"><img src="https://verifone.cloud/sites/default/files/inline-images/6_26.JPG" alt=""></div>

For more information on how to setup the display and theme of the checkout page see **Manual Setup** > [Display settings](/online-payments/plugins/magento-2-plugin-integration/manual-setup.md#display-settings).


---

# 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.verifone.com/online-payments/plugins/magento-2-plugin-integration/automatic-setup.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.
