> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymentoptions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

Access to the API is authenticated using **HTTP Basic Auth** ([Learn More](https://en.wikipedia.org/wiki/Basic_access_authentication))
along with the `x-api-key` header.

### **Getting Started**

Authentication information will be available after the account creation. Authentication can be used in the following ways:

* **Using ‘LIVE API KEY’**:
  The **LIVE API KEY** details are available on the website. Provide your LIVE API KEY as the Basic Auth username value. You do not need to provide a password.<img src="https://mintcdn.com/dasdoc/NIfdTDr2rgRx_fiM/images/flows-authentication-encode.svg?fit=max&auto=format&n=NIfdTDr2rgRx_fiM&q=85&s=946a8927ccbcb7b7633ed70e9af6c7f1" alt="Payment Options Documentation" width="1997" height="833" data-path="images/flows-authentication-encode.svg" />

* **Using Encoded ‘LIVE API KEY’**:
  Encode the **LIVE API KEY** by using the **ENCODE BASE64** button available on the website.<img src="https://mintcdn.com/dasdoc/NIfdTDr2rgRx_fiM/images/flows-authentication-decode.svg?fit=max&auto=format&n=NIfdTDr2rgRx_fiM&q=85&s=90adebd1497c43a6b7ca358f0f3e0ec0" alt="Payment Options Documentation" width="1997" height="833" data-path="images/flows-authentication-decode.svg" />

After encoding the **LIVE API KEY**, attach the string **Basic** in front of the encoded key followed by a space, and provide this value in the `Authorization` header.

```bash theme={null}

curl --location --request POST '<URL>' \
--header 'Authorization: Basic <Encoded LIVE API KEY>'

```

## Authenticating API Calls

To authenticate each API request, include both the Authorization and x-api-key headers.

```bash theme={null}

curl --location --request POST '<URL>' \
--header 'Authorization: Basic <Encoded LIVE API KEY>' \
--header 'x-api-key: <x-api-key value>'

```

<Note> Always ensure that your **LIVE API KEY** is encoded securely and passed correctly in the headers for successful authentication. </Note>

## **API Headers**

API headers provide additional metadata for each API call, including crucial information about the request and response.

| **Header**          | **Description**                  |
| :------------------ | :------------------------------- |
| **`x-api-key`**     | Provided along with credentials. |
| **`Authorization`** | Basic `<Encoded LIVE API KEY>`.  |

### **Important Note**

If using plain LIVE API KEY for the **Authorization** header, include **"Basic"** before the base64-encoded API key to authenticate requests properly.

<Info title="Example" emoji="information">
  Authorization: Basic Encoded LIVE API KEY
</Info>

<img src="https://mintcdn.com/dasdoc/NIfdTDr2rgRx_fiM/images/flows-APIheader.svg?fit=max&auto=format&n=NIfdTDr2rgRx_fiM&q=85&s=e4b1c99f6ddd74aee7ea1ac4e809837c" alt="Live API Key" width="1998" height="400" data-path="images/flows-APIheader.svg" />

<Card title="Need Help?" icon="life-ring" href="/support/contact">
  If you need assistance or have questions regarding setting up your authentication, please [contact our support team](./support/contact) for further guidance.
</Card>
