MPS Documentation
Build an integration

Follow a payment's timeline

Read every step a payment went through, and list your payments with their current state, to explain a result to a shopper or your support team.

The timeline shows what happened to each of your payments, in order: you created it, the shopper opened the checkout and paid or did not, MPS sent your webhook, and any refund. Use it to follow a payment and to explain a result.

Not the source of truth

Decide on a payment from the payment read, never from the timeline. The timeline is written after each step, so it can trail real time by a few seconds, and a step is occasionally missing. Never build a decision on the absence of a step.

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.

Before you start

  • An API key that holds the internet:read scope: the scope that reads a payment. Every test key and live key holds it.
  • A payment you created with that key, for one payment's timeline.

Your key sees only its own merchant's payments, and only those of its mode: a test key sees test payments, a live key live payments.

List your payments

# List your payments, newest first, 25 at a time
# Prerequisite: export MPS_API_KEY=mps_test_…
curl -sS --fail-with-body "https://gateway.mps-emi.com/api/payments/timeline?limit=25" \
  -H "Authorization: Bearer $MPS_API_KEY"

The gateway answers 200 OK with one page of your payments in data.items, each with its current state and no steps. An empty page is an empty items array.

Query parameters

FieldTypeRequiredDescription
limitintegerNoHow many payments a page holds, from 1 to 100. Defaults to 25. A larger value is refused, not cut.
continuationTokenstringNoThe continuationToken the previous page returned, unchanged. Leave it out for the first page.

Read the next page

# Read the page after the one that returned this continuationToken
# Prerequisite: export MPS_API_KEY=mps_test_… CONTINUATION_TOKEN=…
curl -sS --fail-with-body -G "https://gateway.mps-emi.com/api/payments/timeline" \
  -H "Authorization: Bearer $MPS_API_KEY" \
  --data-urlencode "limit=25" \
  --data-urlencode "continuationToken=$CONTINUATION_TOKEN"

Pass continuationToken back exactly as you received it: it is opaque, so never build or change one. The last page has no continuationToken. Any other value is a 400 that names continuationToken.

Read one payment's timeline

# Read every step of one payment
# Prerequisite: export MPS_API_KEY=mps_test_… PAYMENT_REFERENCE=test-…
curl -sS --fail-with-body "https://gateway.mps-emi.com/api/payments/$PAYMENT_REFERENCE/timeline" \
  -H "Authorization: Bearer $MPS_API_KEY"

The gateway answers 200 OK with the payment's current state in data.payment and its steps in data.events, oldest first. Use the paymentReference exactly as create returned it.

Response

A payment

In each item of the list, and in data.payment of one payment's timeline. A field with no value is null; the examples show only the fields with a value.

FieldTypeDescription
paymentReferencestringThe payment reference create returned. An opaque string: never parse it.
referencestringYour own order reference, as you sent it on create.
statusstringpending, executed, failed or abandoned: the same words the payment read uses. More values may appear.
reasonCodestringWhy the payment, or its last attempt, did not succeed. See Reason codes.
amountintegerThe amount in euro cents, as created.
currencystringThe ISO currency code.
methodstringcard, or bank_transfer for a payment the shopper authorised at their bank. Absent until the shopper pays.
createdAtstringWhen the payment was created. Absent only while its creation step has not arrived.
updatedAtstringWhen anything last happened to the payment.
200 OK, list
{
  "data": {
    "items": [
      {
        "paymentReference": "test-00000000-0000-4000-8000-000000000002",
        "reference": "order-1043",
        "status": "abandoned",
        "reasonCode": "abandoned",
        "amount": 1200,
        "currency": "EUR",
        "createdAt": "2026-11-20T09:40:11+00:00",
        "updatedAt": "2026-11-21T09:40:11+00:00"
      },
      {
        "paymentReference": "test-00000000-0000-4000-8000-000000000001",
        "reference": "order-1042",
        "status": "executed",
        "amount": 2495,
        "currency": "EUR",
        "method": "card",
        "createdAt": "2026-11-20T09:14:02+00:00",
        "updatedAt": "2026-11-20T09:15:31+00:00"
      }
    ],
    "continuationToken": "W3sidG9rZW4iOiIxIn1d"
  }
}

A step

In data.events of one payment's timeline. A field with no value is null; the examples show only the fields with a value.

FieldTypeDescription
typestringThe step. See Step types.
occurredAtstringWhen the step happened. Steps can arrive late, so order them by this field.
reasonCodestringOn a step that did not succeed. See Reason codes.
amountintegerThe amount in euro cents, where the step carries one.
currencystringThe ISO currency code, where the step carries an amount.
methodstringcard or bank_transfer, where known.
cardBrandstringThe card scheme on a card step, such as visa, mastercard or bancontact. Never a digit of the card.
webhookHttpStatusintegerOn WebhookAttempted: the HTTP status your callbackUrl answered.
webhookDurationMsintegerOn WebhookAttempted: how long your server took to answer, in milliseconds.
webhookAttemptintegerOn WebhookAttempted: the delivery attempt, starting at 1.
refundIdstringOn a refund step: the refundId the refund request returned.
200 OK, one payment
{
  "data": {
    "payment": {
      "paymentReference": "test-00000000-0000-4000-8000-000000000001",
      "reference": "order-1042",
      "status": "executed",
      "amount": 2495,
      "currency": "EUR",
      "method": "card",
      "createdAt": "2026-11-20T09:14:02+00:00",
      "updatedAt": "2026-11-20T09:15:31+00:00"
    },
    "events": [
      { "type": "PaymentCreated", "occurredAt": "2026-11-20T09:14:02+00:00", "amount": 2495, "currency": "EUR" },
      { "type": "CheckoutOpened", "occurredAt": "2026-11-20T09:14:05+00:00" },
      { "type": "CardSubmitted", "occurredAt": "2026-11-20T09:14:40+00:00", "method": "card", "cardBrand": "visa" },
      { "type": "PaymentAuthorised", "occurredAt": "2026-11-20T09:15:22+00:00", "amount": 2495, "currency": "EUR", "method": "card", "cardBrand": "visa" },
      { "type": "WebhookAttempted", "occurredAt": "2026-11-20T09:15:31+00:00", "webhookHttpStatus": 200, "webhookDurationMs": 184, "webhookAttempt": 1 }
    ]
  }
}

Step types

More step types may appear. Ignore a type you do not know.

typeWhen
PaymentCreatedYou created the payment.
CheckoutOpenedThe shopper opened the checkout. Recorded each time they open it.
CardSubmittedThe shopper submitted a card on the checkout.
RedirectedToBankThe shopper was sent to their bank to pay by bank transfer.
ScaStartedThe shopper's bank asked for a 3-D Secure check (SCA).
ScaCompletedThe 3-D Secure check finished.
PaymentAttemptFailedOne attempt did not succeed. The payment is still open.
PaymentAuthorisedThe money was collected.
PaymentFailedThe payment did not complete.
PaymentAbandonedNothing was paid within the time the payment stays open.
WebhookAttemptedMPS sent a webhook to your callbackUrl, with the status, the duration and the attempt number.
RefundRequestedYou asked for a refund, with its amount and refundId.
RefundCanceledYou canceled the refund before it was sent. Nothing is paid back.
RefundAwaitingFundsThe refund waits: a payment made by bank transfer is paid back only once the transfer has reached MPS.
FundsReceivedThe bank transfer reached MPS.
RefundedThe refund was paid out, with its amount and refundId.
RefundFailedThe refund was not paid out.

Not every payment has every step. A card payment has no RedirectedToBank, and a payment paid on the first attempt has no PaymentAttemptFailed.

Reason codes

A payment or a step that did not succeed carries a reasonCode from this list. A new code is announced in the changelog.

reasonCodeMeaning
declined_by_issuerThe card issuer declined the payment.
sca_cancelled_by_customerThe shopper cancelled the 3-D Secure check.
sca_failedThe 3-D Secure check did not succeed.
rejected_by_bankThe shopper's bank rejected the transfer.
interruptedThe shopper left the bank's flow before it finished.
abandonedNothing was paid within the time the payment stays open.
technical_errorA system on the way could not process the payment.
unknownThe payment did not succeed for a reason outside this list.

The timeline shows what you need to follow a payment, and nothing of how MPS processed it: no identifiers or codes of the card processor or the bank, no internal trace, and not the body of the webhook. If MPS support needs more, give them the payment reference.

Errors

StatusCodeCauseResolution
400—limit is outside 1 to 100, or continuationToken is not a value a page returned. The body names the field.Fix the field the error names. For continuationToken, start again from the first page. See Validation errors.
401—No API key, or an unknown one.Send a valid key as Authorization: Bearer.
403—The key lacks the internet:read scope, or a partner's key sent no x-wallet-number.Ask MPS for the scope, or name the merchant (see Choosing the merchant).
404—No such payment for this merchant in this mode: unknown, another merchant's, or a test payment read with a live key (and the reverse).Check the payment reference and the key. The answer never says which of these it is.
429—More than 100 requests a minute from this key.Wait for the Retry-After seconds. See Rate limits.

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