# Authentication Process

All requests to the goodPayments API must be authorized using the merchant’s unique API key. Authorization is performed by including the API key in the HTTP header of every request.

**Base URL:** <https://app.goodpayments.io/v1/api>&#x20;

**Header format:**

```yaml
Authorization: <apiKey>
```

### Request Example

```yaml
curl -X 'GET' \
  'https://app.goodpayments.io/v1/api/merchant' \
  -H 'accept: application/json' \
  -H 'Authorization: 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662'
```

### Error Handling

If the header is missing, malformed, IP address is not in the Whitelist or the API key is invalid, the server returns a **403 Forbidden** response.

**Error response example:**

```json
{
  "detail": "Invalid API key"
}
```


---

# 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://goodpayments.gitbook.io/docs/api-reference/authentication-process.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.
