> For the complete documentation index, see [llms.txt](https://docs.alternativepayments.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alternativepayments.io/readme.md).

# Introduction

## 👋 Welcome to the Alternative Payments API

The Alternative Payments API lets you create and manage customers, issue invoices, collect payments, track transactions, and reconcile payouts, all through secure, RESTful endpoints. It’s designed for partners, MSPs, and platforms that want to integrate billing and payment operations directly into their own systems.

***

## 🔧 What you can do with the API ?

Use the Alternative Payments API to create and manage customers and invoices, generate one-time payment links, track transactions, and reconcile payouts. It follows a simple OAuth 2.0 client-credentials flow and returns JSON over HTTPS.

* **One-off checkout experiences.** Create a Payment Request, share the hosted link, redirect users back to your app, and poll for status. [Payment Request](/getting-started/quick-start/guides.md#payment-request)
* **Invoice-based payments.** Create invoices with line items, fetch a hosted payment link for the invoice, and get a link to download the invoice PDF. [Invoices](/getting-started/quick-start/guides.md#invoices)
* **Customer management.** Create customers, list and fetch them, archive when needed, list payment methods, and manage customer users. [Customers](/getting-started/quick-start/guides.md#customers)
* **Transaction history.** List payments with filters like type, status, customer, invoice, and method. [Transactions](/getting-started/quick-start/guides.md#transactions)
* **Payout reconciliation.** List payouts, fetch a payout by ID, and retrieve the transactions that rolled into a payout. [Payouts](/getting-started/quick-start/guides.md#payouts)

***

## :question:How does it work?

* **Protocol:** REST over HTTPS
* **Format:** JSON requests and responses
* **Auth:** OAuth 2.0 client credentials flow using API keys

{% hint style="warning" %}

### <mark style="color:$primary;">Authentication</mark>

1. Generate an [API key in the Partner Dashboard](/getting-started/quick-start/api-keys.md).
2. Exchange it for an access token using the `client_credentials` grant.
3. Include `Authorization: Bearer <token>` in every request.\
   Tokens expire as indicated by `expires_in` and are scoped per environment.
   {% endhint %}

{% hint style="warning" %}

### Pagination & filters

Most list endpoints use **cursor-based pagination** with `after`, `before`, `start_cursor`, and `end_cursor`. Filters vary by endpoint (status, date, type, customer ID, etc.).
{% endhint %}

{% hint style="warning" %}

### Errors & limits

* Standard HTTP status codes with JSON error objects
* Rate limit: **5 requests/sec** per API key
* Handle 429s with exponential backoff
  {% endhint %}

***


---

# 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 dynamically by asking a question.

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

```
GET https://docs.alternativepayments.io/readme.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 `build a script that syncs our docs to a CMS` 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.
