# Introduction

## Authentication <a href="#authentication" id="authentication"></a>

Most requests to the Payment API must be authenticated with an API key. You can create an API key in your [Settings](https://merchant.fizen.io/dashboard/) page after creating a Fizen Pay account.

Authenticated API requests should be made with a `X-FP-API-KEY` header. Your secret API key should be passed as the value.

If authentication fails, a JSON object with an error message will be returned as a response along with HTTP status 401 Unauthorized.

## Pagination <a href="#pagination" id="pagination"></a>

All GET endpoints which return an object list support pagination with pagination information inside the URL queries. This means that to get all objects, you need to paginate through the results. Default limit is set to 10 but values up to 100 are permitted.

| Query  | Description                                  | Default        |
| ------ | -------------------------------------------- | -------------- |
| page   | The page number                              | 1 (first page) |
| limit  | The number of items in page. Up to 100 items | 10             |
| search | Search some fields of items by given text    | empty          |

## Errors

All error messages include a `statusCode` identifier and a pre-defined`message`. , which is used for address the error and localize a human readable message. For example:

`{ "message": "SECURITY.INVALID_OTP", "statusCode": 401 }`

{% content-ref url="/pages/twiJA7UYNY3hXvumoDzW" %}
[Getting Started](/getting-started.md)
{% endcontent-ref %}

{% content-ref url="/pages/k0wcPqt2MtfboOd83Z0C" %}
[API Reference](/reference/api-reference.md)
{% endcontent-ref %}


---

# 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://pay-apidocs.fizen.io/introduction.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.
