# Follow a payment's timeline (/payment-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. Decide on a payment from [the payment read](/online-payments#read-the-outcome), 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. - 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-payments] ```bash # 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 [#query-parameters] | Field | Type | Required | Description | |---|---|---|---| | `limit` | integer | No | How many payments a page holds, from `1` to `100`. Defaults to `25`. A larger value is refused, not cut. | | `continuationToken` | string | No | The `continuationToken` the previous page returned, unchanged. Leave it out for the first page. | ### Read the next page [#read-the-next-page] ```bash # 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-a-payment-timeline] ```bash # 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 [#response] ### A payment [#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. | Field | Type | Description | |---|---|---| | `paymentReference` | string | The payment reference create returned. An opaque string: never parse it. | | `reference` | string | Your own order reference, as you sent it on create. | | `status` | string | `pending`, `executed`, `failed` or `abandoned`: the same words the payment read uses. More values may appear. | | `reasonCode` | string | Why the payment, or its last attempt, did not succeed. See [Reason codes](#reason-codes). | | `amount` | integer | The amount in euro cents, as created. | | `currency` | string | The ISO currency code. | | `method` | string | `card`, or `bank_transfer` for a payment the shopper authorised at their bank. Absent until the shopper pays. | | `createdAt` | string | When the payment was created. Absent only while its creation step has not arrived. | | `updatedAt` | string | When anything last happened to the payment. | ```json title="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 [#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. | Field | Type | Description | |---|---|---| | `type` | string | The step. See [Step types](#step-types). | | `occurredAt` | string | When the step happened. Steps can arrive late, so order them by this field. | | `reasonCode` | string | On a step that did not succeed. See [Reason codes](#reason-codes). | | `amount` | integer | The amount in euro cents, where the step carries one. | | `currency` | string | The ISO currency code, where the step carries an amount. | | `method` | string | `card` or `bank_transfer`, where known. | | `cardBrand` | string | The card scheme on a card step, such as `visa`, `mastercard` or `bancontact`. Never a digit of the card. | | `webhookHttpStatus` | integer | On `WebhookAttempted`: the HTTP status your `callbackUrl` answered. | | `webhookDurationMs` | integer | On `WebhookAttempted`: how long your server took to answer, in milliseconds. | | `webhookAttempt` | integer | On `WebhookAttempted`: the delivery attempt, starting at `1`. | | `refundId` | string | On a refund step: the `refundId` the refund request returned. | ```json title="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 [#step-types] More step types may appear. Ignore a type you do not know. | `type` | When | |---|---| | `PaymentCreated` | You created the payment. | | `CheckoutOpened` | The shopper opened the checkout. Recorded each time they open it. | | `CardSubmitted` | The shopper submitted a card on the checkout. | | `RedirectedToBank` | The shopper was sent to their bank to pay by bank transfer. | | `ScaStarted` | The shopper's bank asked for a 3-D Secure check (SCA). | | `ScaCompleted` | The 3-D Secure check finished. | | `PaymentAttemptFailed` | One attempt did not succeed. The payment is still open. | | `PaymentAuthorised` | The money was collected. | | `PaymentFailed` | The payment did not complete. | | `PaymentAbandoned` | Nothing was paid within the time the payment stays open. | | `WebhookAttempted` | MPS sent a webhook to your `callbackUrl`, with the status, the duration and the attempt number. | | `RefundRequested` | You asked for a [refund](/refunds), with its amount and `refundId`. | | `RefundCanceled` | You [canceled the refund](/refunds#cancel-a-refund) before it was sent. Nothing is paid back. | | `RefundAwaitingFunds` | The refund waits: a payment made by bank transfer is paid back only once the transfer has reached MPS. | | `FundsReceived` | The bank transfer reached MPS. | | `Refunded` | The refund was paid out, with its amount and `refundId`. | | `RefundFailed` | The 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 [#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](/changelog). | `reasonCode` | Meaning | |---|---| | `declined_by_issuer` | The card issuer declined the payment. | | `sca_cancelled_by_customer` | The shopper cancelled the 3-D Secure check. | | `sca_failed` | The 3-D Secure check did not succeed. | | `rejected_by_bank` | The shopper's bank rejected the transfer. | | `interrupted` | The shopper left the bank's flow before it finished. | | `abandoned` | Nothing was paid within the time the payment stays open. | | `technical_error` | A system on the way could not process the payment. | | `unknown` | The 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 [#errors] | Status | Code | Cause | Resolution | |---|---|---|---| | `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](/errors-and-rate-limits#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](/authentication#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](/errors-and-rate-limits#rate-limits). | ## Related [#related] - [Payment lifecycle](/payment-lifecycle): what each `status` means, and which ones are final. - [Webhooks](/webhooks): the webhook a `WebhookAttempted` step records. - [Refund a payment](/refunds): the refunds whose steps appear on the timeline. - [Accept a payment](/online-payments): the payment read that decides whether a payment is paid.