> For the complete documentation index, see [llms.txt](https://docs.ecommerce.seb.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecommerce.seb.ee/integration/merchant-api.md).

# Merchant API

The **Merchant API** consists of REST APIs that support payment initiation, payment lifecycle management, and checkout functionality. Using these APIs, you can create and manage payments, capture authorized transactions, process refunds, and receive callback notifications for payment and token lifecycle events.

A **direct API integration** provides the highest level of flexibility and customization. However, before building a direct API integration, evaluate the available **SDKs** and **Web-Plugins**, which can simplify implementation by reducing development effort and accelerating time to market.

### Available APIs

The Merchant API is organized into the following APIs:

* **Payments** – Manage the payment lifecycle, including payment initiation, capture, cancellation, and payment status retrieval.
* **Checkout Sessions** – Support payment method selection, collection of payment details, and customer actions required to authorize a payment, such as 3-D Secure authentication.
* **Refunds** – Initiate and track full or partial refunds for previously processed payments.
* **Gateway Tokens** – Retrieve and manage stored payment tokens, enabling recurring payments and one-click checkout experiences.
* **Shops** – Retrieve shop configuration and merchant information, perform payment-related setup operations such as initiating Apple Pay web sessions.
* **Callback Notifications** – Receive asynchronous notifications for payment and token lifecycle events, enabling your systems to stay synchronized with payment status changes and stored payment token updates.

For endpoint specifications, schemas, and field descriptions, see the [**Merchant API Reference**](/api-reference/merchant-api.md).

### Integration Models

Integration models define how the payment flow is distributed between your system and the **SEB Ecommerce Payment Gateway**.

* **Full API Integration** - Allows you to manage the complete payment experience, including checkout, payment data collection, and payment lifecycle operations through the Merchant API.
* **Hybrid Integration** - Payment lifecycle operations, such as payment initiation, capture, cancellation, and refunds, are performed via the API or SDK, while the checkout experience and sensitive payment data collection are handled through a gateway-hosted checkout page.

The Hybrid Integration model is the most common approach as it combines the flexibility of API-driven payment management with the simplicity, security, and reduced compliance scope of a hosted checkout solution.


---

# 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.ecommerce.seb.ee/integration/merchant-api.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.
