Skip to main content

Error response shape

The gateway returns errors in one fixed format:
Do not base logic on the message text. Branch on the HTTP status only. The messages change without notice, and some of them contain internal backend class names - for example PaySubProductEntity not found. There is no separate machine-readable error code.
Two departures from the shape above are worth knowing: Malformed JSON in the request - caught before the data reaches business logic:
An unexpected failure on the Paymove side - always with the same generic message:

Error table

What this API does not have

This section matters as much as the table above. The gateway does not provide the mechanisms below - writing code that handles them is dead weight and misleading:

Errors that look like successes

The most dangerous category: the API returns 200 even though the request was wrong. Check these before declaring the integration working.
A decimal amount is silently truncated. "price": 12.99 is stored as 12 grosze and the response is 200. Convert with Math.round(amount * 100).
Unknown fields are ignored. Sending amount instead of price, or currency or returnUrl at the top level instead of inside details, raises no error - the payment is created with incomplete data.
A reused externalId returns the old payment. The response is 200 with the previously created redirectUrl, and the new amount is discarded. Change amounts via PATCH /api/pay/product/{productId}/subproduct/{externalId}.
A missing externalId returns 500, not 400. Before treating a 500 as transient and retrying, check that your body contains externalId.
A missing price or details.returnUrl raises no error at all. You get 200 and a working redirectUrl - to a payment with no amount, or with no way back to your shop. You have to check those fields yourself, before sending the request.
A malformed UUID in the path also returns 500. A typo in productId does not produce a readable 400 - you get the generic Something went wrong.

Handling errors in code

Retrying makes sense only for 500 and network failures, and only after confirming the request was complete. Statuses 400, 401, 403 and 404 indicate a problem on your side - a retry returns the same result.

SDK errors

The Node.js SDK wraps the responses above in typed exceptions:
The SDK’s amount validation only checks that the value is a number greater than zero. An amount of 49.99 passes that check and the API truncates it to 49 grosze.

What’s next

REST API

The correct request structure and full responses.

Signature verification

Error handling on the webhook-receiving side.