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

# maib e-commerce API

Interaction with **maib ecomm** occurs through HTTPS (POST / GET / DELETE) requests to API endpoints with data in **JSON** format.&#x20;

The responses received on the website/app from **maib ecomm** will be HTTPS POST requests with data in **JSON** format.

All endpoints are structured according to the following pattern: *{base-url}/{api-version}/{point}*

Base URL: *<https://api.maibmerchants.md>*

Current API version: *v1*

### API Endpoints

<table><thead><tr><th width="461">Endpoint</th><th>Description</th></tr></thead><tbody><tr><td>https://api.maibmerchants.md/v1/generate-token</td><td><a href="/pages/fTqjNIjNuCQUYDa3EjlT">Access Token generation</a></td></tr><tr><td>https://api.maibmerchants.md/v1/pay</td><td><a href="/pages/UP6rsL0XybCBMZEVotos">Direct payment</a></td></tr><tr><td>https://api.maibmerchants.md/v1/hold</td><td><a href="/pages/YOiLLJsE3hrE7R7Okka4">Payment authorization </a>(two-step payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/complete</td><td><a href="/pages/YNOR4RaQZJHiwmCwcPF1">Payment capture</a> (two-step payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/refund</td><td><a href="/pages/mH8npEBTomoJACAgMaWM">Payment refund</a></td></tr><tr><td>https://api.maibmerchants.md/v1/pay-info</td><td><a href="/pages/iE3h8DwI5kEMhL3GSmQ1">Payment information</a></td></tr><tr><td>https://api.maibmerchants.md/v1/savecard-recurring</td><td><a href="/pages/26kngtcuglfjbNRnUCOy">Register card</a> (recurring payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/execute-recurring</td><td><a href="/pages/aYViZeAuTDFzzMbc5D8p">Execute recurring payment </a>(recurring payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/savecard-oneclick</td><td><a href="/pages/DUXO0X0SFhDWsdNZk4Lm">Register card</a> (one-click payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/execute-oneclick</td><td><a href="/pages/sQWucvb5WpraGmKk2bvv">Execute one-click payment</a> (one-click payments)</td></tr><tr><td>https://api.maibmerchants.md/v1/delete-card</td><td><a href="/pages/B19P8LI7uOrcVqbOfNUs">Deleting the card</a> (recurring and one-click payments)</td></tr></tbody></table>

### Interaction via API

E.g for Direct Payment:

1. Customer chooses product or service in Merchant online shop (website/app) and adds it to his cart.
2. The Customer presses the «**Place order**» button, and the Merchant sends an HTTPS POST request (with transaction data) to the API endpoint.
3. **maib ecomm** returns an *intermediate response* containing the link (*payUrl*).
4. The Customer is redirected to the *payUrl* link and access the **maib ecomm checkout** page.
5. The Customer enters the card data (or pay via Apple Pay/Google Pay).
6. The **maib ecomm** processes the transaction.
7. The Customer is redirected back to the Merchant online shop (website/app), on *okUrl* or *failUrl* (depending on the status of the transaction).
8. The Merchant online shop receives (on *callbackUrl* via HTTPS POST request) a final response containing the status and basic transaction data.

### Postman Collection

{% file src="/files/BpDWkUTCCJp1ZpVEz6WL" %}


---

# 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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maibmerchants.md/e-commerce/maib-e-commerce-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
