MPS Documentation
Build an integration

Concepts

The keys, wallets, identifiers and payment states every page of these docs refers to, explained in one place.

Keys

Every integration authenticates with an API key, sent as Authorization: Bearer on every call from your backend. What a key can do depends on its kind:

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.
KindRecognised byTakes payments forSend x-wallet-number?
Test keyStarts with mps_test_Your own wallet, as test payments: nothing is charged, booked or paid out. It does not expire.No
Merchant keyStarts with mps_live_, issued for one merchantThat merchant's walletNo
Partner keyStarts with mps_live_, issued to a partner that onboards merchantsAny merchant the partner onboarded, named per callYes, always

You create keys under Online › API keys on the MPS platform: as many test keys as you like, and live keys per merchant once that merchant has signed its contract. A key generated on the platform comes with its own webhook signing secret, shown once, which signs the webhooks MPS sends to your callbackUrl. For a key MPS issued to you directly, ask MPS for one: see The signing secret.

The API key and the signing secret can be replaced, never recovered. Keep both on your backend: see Keep the key on your backend.

Wallets and merchants

A wallet identifies a merchant at MPS, written like BE0000000000. Every call acts for exactly one wallet, and every payment it creates is for that wallet. A test key or a merchant key acts for its own wallet and ignores any you send; a partner key names the merchant on every call with x-wallet-number. A payment created for one merchant cannot be read as another. See Choosing the merchant.

Scopes

An API key carries every scope it was issued:

ScopeAllows
internet:create, internet:readCreating and reading online payments
payments:refundRefunding a payment, and reading and cancelling its refunds. See Refunds
payment-links:create, payment-links:readMaking, cancelling, listing and reading payment links. See Create a payment link with the API
registration-links:manageA live partner's personal registration links. See Create a registration link

Hosts

Your backend calls the API at https://gateway.mps-emi.com; the shopper's browser opens the checkout at https://pay.mps-emi.com. Test keys and live keys use the same hosts: see The hosts.

Identifiers

IdentifierWhere it comes fromWhat it is for
paymentReferenceCreate, and every webhookThe MPS reference of an online payment, and the only key its read accepts. test- + a GUID for a test payment. In a webhook it identifies the payment the same way.
referenceYou, on createYour own order reference, shown to the shopper. Echoed back on the read, and as merchantReference in the webhook. At most 64 characters: letters, digits, spaces and . _ : / # + -. Never a lookup key.
Idempotency-KeyYou, on create and on a refundOne value per attempt — a payment's checkout attempt, or one refund — stored before you send it. A retry with the same key and body returns the first result instead of making a second. At most 255 characters: letters, digits and punctuation, no spaces. See Retrying safely.
refundIdRefund createThe refund, and the key Get a refund and Cancel a refund take; also in every refund webhook.
paymentIdThe webhookThe booking MPS made for a received payment.
traceIdEvery error (problem document)One call in MPS's logs. Quote it when you contact MPS about a failed call.
X-Mps-Delivery-IdThe webhook headersOne webhook, for logs and support. Every retry of it carries the same value, so it marks a repeat; settle orders by paymentReference.

Treat every identifier MPS returns as an opaque string: store it exactly as returned, allow up to 64 characters, and never parse or validate its format. The Idempotency-Key is yours, and can be up to 255 characters.

Payment lifecycle

The read answers a state: pending until it is decided, then executed (paid), failed or abandoned (not paid within 24 hours). Only a late ANNA bank payment turns failed or abandoned into executed. Payment lifecycle explains each one, draws how the states, the redirect and the webhook fit together, and says what to do with each.

state, status and the webhook

Two fields name an outcome, in three places. They are not interchangeable:

WhereFieldValues
Reading a paymentstatepending, executed, failed, abandoned
The payment.received webhookstatusAlways completed: the payment was received. Reading it then answers state executed.
A refund, read or in a refund webhookstatuspending, refunded, failed, canceled

Decide on the read's state. A webhook's status tells you which event it is, not what to ship.

A state you do not recognise is pending, never paid. New states may be added: see the changelog.

Need help? Contact MPS at contact@mps-emi.com or +32 55 89 09 77, or the MPS partner you work with. What to include.

Building with an AI assistant? Give it llms.txt, every page in llms-full.txt, this page as Markdown, or the OpenAPI document. See Build with AI.

Last updated on

On this page