> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer.md).

# Authentication methods: Basic & Bearer

Choose the authentication scheme required by the API you are calling. Use this page to decide between Basic authentication and Bearer authentication before you build your request headers.

## Which method should you use?

* Use [BasicAuth](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/basicauth.md) when the API expects credentials in a Basic authorization header.
* Use [BearerAuth (JWT)](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/bearerauth-jwt.md) when the API expects a bearer token.

{% hint style="info" %}
Do not choose the authentication method by preference. Choose the method required by the endpoint or integration flow.
{% endhint %}

### Before you continue

* Confirm which API you are integrating with.
* Confirm whether the API expects a static credential or a token-based flow.
* Make sure you already have the required keys, credentials, or token generation setup.

### Quick path

1. Read the auth method that matches your API.
2. Build the header exactly as required.
3. Test the request in your target environment.

{% content-ref url="/pages/RO4zsRgh84XA56V4pKWS" %}
[BasicAuth](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/basicauth.md)
{% endcontent-ref %}

{% content-ref url="/pages/ipaeqGinh2n64tA7XCwL" %}
[BearerAuth (JWT)](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/bearerauth-jwt.md)
{% endcontent-ref %}

### Related guides

* [API authentication](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication.md)
* [Get your API Keys](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/get-your-api-keys.md)
* [Manage your API Keys](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/manage-your-api-keys.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.verifone.com/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
