MPS Documentation
Api reference

Build a request

Build a request from an API key and a payment, and copy it in curl, TypeScript, C#, Python or PHP, without sending anything.

Pick an operation, fill in the fields, and the request below updates as you type: the raw HTTP request and the same call in five languages, each ready to copy. Every documented response is listed with its example body, so you know what to expect back.

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

  • A test key (mps_test_…) from Online › API keys on the MPS platform, in Test mode. See Authentication.
  • A terminal or a server to run the copied request from.

Pick an operation.

Fill in your test key and the fields of the request. A payment or a refund also gets an Idempotency-Key, made here once per attempt: resend the copied request unchanged to retry it, and take a new key for a new attempt. See Retrying safely.

Copy the request in the language you need and run it from your backend or a terminal.

Nothing is sent from this page. Copy the request and run it from your backend or terminal.

Operation

Requires the payment-links:create scope.

Headers

Sent as Authorization: Bearer …. Kept in this page's memory only and gone when you leave it. Left empty, the output shows <api_key>.

Only with a partner key: the wallet of the merchant the call is for. Leave empty for a merchant's own key.

Path

The link's id, exactly as create returned it. An opaque string: never parse it.

Request

DELETE /api/payments/payment-links/k3Qz9aVbN2xR7wYc1dFgHw HTTP/1.1Host: gateway.mps-emi.comAuthorization: Bearer <api_key>

Responses

  • 204No Content

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    No body.

  • 401No API key, or a wrong, malformed or revoked one: no body.

    Header WWW-Authenticate: Bearer error="invalid_token".

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    No body.

  • 403The key does not carry the payment-links:create scope, or a partner key sent no x-wallet-number: no body. A partner's key asking for a live link is answered 403 with the code payment_link_live_partner. x-wallet-number names a wallet the key does not cover: the body below, error invalid_request.

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    application/json
    {  "error": "invalid_request",  "error_description": "The requested wallet is not covered by this key's account."}
  • 404Not Found

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    No body.

  • 409Conflict

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    application/problem+json
    {  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10",  "title": "Conflict",  "status": 409,  "detail": "A payment with this Idempotency-Key is still being created; retry shortly",  "code": "idempotency_key_in_use",  "traceId": "00-a27c57cb2b3e4f5d8c9a0b1c2d3e4f50-1a2b3c4d5e6f7a8b-01",  "documentationUrl": "https://docs.mps-emi.com/errors-and-rate-limits#conflicts"}
  • 429Over the 100 requests a minute per API key, shared by every endpoint, or more than 10 failed API keys a minute from your address: no body. Wait the number of seconds in Retry-After, then retry.

    Header Retry-After: Seconds to wait before retrying.

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    No body.

  • 500A problem on our side, as a problem document with the traceId to quote to MPS. Other 5xx answers can carry no body. Retry a read with backoff; retry a create or refund only with the same Idempotency-Key.

    Header traceparent: The call's W3C trace: 00-{trace id}-{span id}-{flags}. Sent on every answer, a success or a refusal without a body included. Quote it when you contact MPS about the call; its trace id is the one in a problem's traceId.

    application/problem+json
    {  "type": "https://tools.ietf.org/html/rfc9110#section-15.6.1",  "title": "An error occurred while processing your request.",  "status": 500,  "traceId": "00-a27c57cb2b3e4f5d8c9a0b1c2d3e4f50-1a2b3c4d5e6f7a8b-01",  "documentationUrl": "https://docs.mps-emi.com/errors-and-rate-limits#server-errors"}

Response

The request builder lists every documented response of the operation with its example body. The fields of each one are on the operation's page in the API reference.

Errors

StatusCodeCauseResolution
400—A field of the copied request is invalid.Fix the field the body names. See Validation errors.
401—The API key is missing, wrong or revoked.Check the key. See API key errors.
403—The key lacks the scope, or does not cover the x-wallet-number.See Authentication errors.
429—Rate limited.Wait Retry-After seconds. See Rate limits.

Errors and rate limits lists every status.

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