# Overview (/overview)
> What the MPS payment gateway is, the host you talk to, and the shape of every integration.
The MPS payment gateway is the public API for taking payments through MPS. Your backend sends its
**API key** as the bearer on every call. You do not exchange it for anything first.
It offers one kind of payment, the **online payment**: you send the shopper to the MPS checkout, the
shopper pays with ANNA (by bank) or by card, and comes back to your shop. See [Accept a payment](/online-payments).
## The hosts
| Host | What it is | Who calls it |
|---|---|---|
| `https://gateway.mps-emi.com` | The API: `/api/payments/…` for the payment endpoints, called with your API key | Your backend |
| `https://pay.mps-emi.com` | The checkout, the `checkoutUrl` of an online payment | The shopper's browser, never your code |
Redirect the shopper to `checkoutUrl` exactly as returned. Never build it yourself.
**There is one environment, and no separate test host.** You test on these same hosts with a
**test key**: an API key that starts with `mps_test_`. A test key's payments use the same endpoints,
checkout, states and webhooks as live ones. They accept only the [test cards](/online-payments#test-mode)
and never charge or pay out anything. Moving to live mode means swapping the key, not the host.
You create API keys on the MPS platform under **Online › API keys**, test and live keys alike. They only work on `https://gateway.mps-emi.com`. Sent anywhere else, the
call fails with `401`.
## Every integration has the same shape
> **Server only.** The API cannot be called from a browser. The gateway answers no cross-origin (CORS) requests, and the API key must never reach a browser. Call it from your server.
### Your backend holds an API key
It sends the key as `Authorization: Bearer mps_…` on every call. The key stays on your backend: a
browser or an app never calls MPS itself. See [Authentication](/authentication).
### Create a payment and redirect
`POST /api/payments/internet/create` with the amount, your return URLs and an `Idempotency-Key`,
one per checkout attempt, so a retry returns the same payment instead of opening a second. You get
back a `paymentReference`, which you store with the order, and a `checkoutUrl` to redirect the
shopper to.
### Confirm the outcome
MPS posts a signed `payment.received` [webhook](/webhooks) to your `callbackUrl` once the payment
is received. When the shopper comes back, read the payment by its `paymentReference` on your backend.
> **Warning.** Landing on successUrl is not proof of payment. Verify the webhook signature, read the payment, and check its state, amount, currency, and reference before marking an order paid.
## Endpoints at a glance
| Endpoint | Method | Scope |
|---|---|---|
| `https://gateway.mps-emi.com/api/payments/internet/create` | POST | `internet:create` |
| `https://gateway.mps-emi.com/api/payments/internet/{paymentReference}` | GET | `internet:read` |
| `https://gateway.mps-emi.com/api/payments/{paymentReference}/refunds` | POST | `payments:refund` |
| `https://gateway.mps-emi.com/api/payments/{paymentReference}/refunds` | GET | `payments:refund` |
| `https://gateway.mps-emi.com/api/payments/{paymentReference}/refunds/{refundId}` | GET | `payments:refund` |
| `https://gateway.mps-emi.com/api/payments/{paymentReference}/refunds/{refundId}` | DELETE | `payments:refund` |
| `https://gateway.mps-emi.com/api/payments/payment-links` | POST | `payment-links:create` |
| `https://gateway.mps-emi.com/api/payments/payment-links` | GET | `payment-links:read` |
| `https://gateway.mps-emi.com/api/payments/payment-links/{id}` | GET | `payment-links:read` |
| `https://gateway.mps-emi.com/api/payments/payment-links/{id}` | DELETE | `payment-links:create` |
| `https://gateway.mps-emi.com/api/partners/registration-links` | POST | `registration-links:manage` |
| `https://gateway.mps-emi.com/api/partners/registration-links` | GET | `registration-links:manage` |
| `https://gateway.mps-emi.com/api/partners/registration-links/{id}` | GET | `registration-links:manage` |
| `https://gateway.mps-emi.com/api/partners/registration-links/{id}` | DELETE | `registration-links:manage` |
Nothing else is part of the public API. Every parameter, schema and status of these
endpoints is in the [API reference](/api-reference), and as an OpenAPI document at
[`/openapi.json`](/openapi.json).
This whole site is available as plain text for language models. See
[Build with AI](/build-with-ai), or hand your assistant [`/llms.txt`](/llms.txt) directly.
## Related
- [Take your first online payment](/quickstart): create a payment, send the shopper to the checkout, read it back
- [Accept a payment](/online-payments): create, redirect, return, read, and test mode
- [Authentication](/authentication): API keys, choosing the merchant and scopes
- [Payment lifecycle](/payment-lifecycle): every state and what to do with it