# API authentication

Verifone is offering API Key authentication to help merchants maintain long-lasting integrations efficiently.&#x20;

The Verifone API Keys use both HTTP Basic Authentication and Bearer Authentication methods.&#x20;

{% hint style="warning" %}
**Important!** To process transactions through the [sandbox and production environments](/online-payments/api-integration-methods-auth-and-endpoints/integration-methods-and-environment-endpoints.md#sandbox-and-production-urls), you will be using different API keys. One key is used for sandbox, and one is used for production. Make sure your API key and secret are never stored on the client’s side; they are only intended for Server-to-Server API calls.
{% endhint %}

## Availability <a href="#availability" id="availability"></a>

To create an API key, your Verifone Central account must have one of the following roles:&#x20;

* Merchant Admin
* Merchant External Partner
* Merchant Supervisor
* Merchant Cashier

## :key: Authentication methods <a href="#authentication-methods" id="authentication-methods"></a>

There are two authentication methods provided by Verifone that can be used within the REST API calls:

<a href="/pages/RO4zsRgh84XA56V4pKWS" class="button primary">Basic authentication</a>

<a href="/pages/ipaeqGinh2n64tA7XCwL" class="button primary">Bearer authentication</a>&#x20;


---

# 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/api-integration-methods-auth-and-endpoints/api-authentication.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.
