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:
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:
Mechanism
State
Rate limiting and status 429
Do not exist - the gateway does not throttle calls
Status 422
Never returned. Validation failures surface as 400 or 500
Idempotency-Key header
Does not exist. externalId plays the role of an idempotency key
API versioning
None. There is no /v1/ prefix and no version header
Deprecation / Sunset headers
Never sent
Machine-readable error code (code, type)
Does not exist. Only status and message are available
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.
const response = await fetch(url, options);if (!response.ok) { const error = await response.json(); // { status, message } switch (response.status) { case 401: case 403: // Configuration problem - retrying will not help throw new PaymentConfigError(error.message); case 404: throw new PaymentNotFoundError(error.message); case 400: // Bad request - fix the data, do not retry throw new PaymentRequestError(error.message); case 500: // Verify the body is complete first, only then retry throw new PaymentServerError(error.message); default: throw new Error(`Paymove ${response.status}: ${error.message}`); }}
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.
The Node.js SDK wraps the responses above in typed exceptions:
Class
When
PaymoveValidationError
An argument was rejected by the SDK before the request was sent. The field property names the parameter
PaymoveApiError
The API returned a non-2xx status. statusCode and responseBody hold the original response
PaymoveNetworkError
The request never completed. cause holds the underlying exception
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.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Paymove Docs","colors":{"primary":"#4c6ff7","light":"#7d96ff","dark":"#1a1a1a"},"logo":{"light":"https://mintcdn.com/paymove/PpHxa3yf6uDsNUt4/logo/paymove-light.svg?fit=max\u0026auto=format\u0026n=PpHxa3yf6uDsNUt4\u0026q=85\u0026s=437bbda97025f27e0159c5fab9430847","dark":"https://mintcdn.com/paymove/PpHxa3yf6uDsNUt4/logo/paymove-dark.svg?fit=max\u0026auto=format\u0026n=PpHxa3yf6uDsNUt4\u0026q=85\u0026s=2e199e7de0f631677532b82f2e07439b"},"favicon":"https://mintcdn.com/paymove/TSMvwO93mxKXot0v/favicon.svg?fit=max\u0026auto=format\u0026n=TSMvwO93mxKXot0v\u0026q=85\u0026s=56f05f5663da48b496cd5ba34b306022","api":{"playground":{"display":"simple"},"mdx":{"auth":{"method":"key","name":"X-API-KEY"},"server":"https://gateway-api.sandbox.paymove.io"}},"appearance":{"default":"system"},"background":{"color":{"light":"#ffffff","dark":"#000000"}},"navbar":{"links":[{"icon":"play","href":"https://demo.checkout.paymove.io/","label":"Demo"}],"primary":{"type":"button","label":"Panel klienta","href":"https://panel.paymove.io"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/paymove"}},"search":{"prompt":"Szukaj lub zadaj pytanie..."},"seo":{"indexing":"all"},"fonts":{"family":"Google Sans Flex"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"one-dark-pro","dark":"one-dark-pro"}},"latex":false},"errors":{"404":{"redirect":false,"title":"Nie znaleźliśmy tej strony","description":"Adres mógł się zmienić. Spróbuj wyszukiwarki albo zacznij od jednej z popularnych stron."}},"contextual":{"options":["copy","view","claude","chatgpt","cursor","vscode","windsurf","download-spec",{"title":"Agent skill","description":"Wklej ten URL swojemu agentowi AI, aby wdrożył integrację","icon":"bot","href":"https://docs.paymove.io/skill.md"}],"display":"header"},"markdown":{"schema":true,"instructions":["## paymove integration rules for AI agents","","These rules are verified against the live API. Follow them exactly.","","1. Amounts are INTEGERS in grosze (minor units). `1000` means 10.00 PLN. PLN is the only supported currency and there is no currency field in the API.","2. A float `price` (e.g. `12.99`) is SILENTLY TRUNCATED to 12 grosze and still returns HTTP 200. Always send an integer: `Math.round(pln * 100)`.","3. Authenticate with the `X-API-KEY` header. Never `Authorization: Bearer`. Sandbox keys start with `sk_test_`, production keys with `sk_live_`.","4. Server-side only. A call from a merchant page is rejected. Never put the key in frontend code.","5. Unknown request fields are silently ignored and still return HTTP 200 - a wrong body shape looks like success. Match the documented shape exactly.","6. A missing `externalId` returns HTTP 500 `Something went wrong`, not 400. A missing `price` or `details.returnUrl` returns HTTP 200 and a usable `redirectUrl` - no error at all. Validate the body yourself before sending it.","7. Always verify the `X-Paymove-Signature` header on incoming webhooks before trusting them: https://docs.paymove.io/en/webhook-signature.md","8. Errors are `{\"status\": \u003cint>, \"message\": \"\u003ctext>\"}`. Branch on the HTTP status only - never on `message`, which is unstable and leaks internal class names.","9. There is no rate limiting, no HTTP 429, no HTTP 422, no `Idempotency-Key` header and no API versioning. Do not write code that handles them.","10. Re-POSTing an `externalId` that already exists returns HTTP 200 with the ORIGINAL `redirectUrl` and silently discards EVERY field you send - the new price, description and details are all ignored. Use `PATCH /api/pay/product/{productId}/subproduct/{externalId}` to change a price.","11. Webhooks fire only on `COMPLETED` by default. Registering a webhook requires both `retries` and `expectedCode` - omitting either returns HTTP 500, and `retries: 0` means no retry at all. Delivery counts as successful when the HTTP status equals `expectedCode` - the response body is never inspected.","12. Never fulfil an order on the `returnUrl` redirect. The checkout does not redirect there by itself: the customer has to click \"back to shop\", and inside the widget modal that redirect never happens. Fulfil only in the webhook handler, after verifying the signature.","13. Do not pin a version of `@paymove-io/sdk` - install the latest.","14. If the merchant has no `productId` yet, do not stop at a placeholder: ask for the API key, the `partnerId` and the shop name, propose defaults for `location` and `timezone` (`Europe/Warsaw`), offer the optional fields once, then create the product for them with `POST /api/product/pay` and take `productId` from `id` in the response. Do the same for the webhook: register it, then assign it to the product. Guided procedure: https://docs.paymove.io/skill.md (Steps 1-2).","15. Full documentation index: https://docs.paymove.io/llms.txt · Copy-paste quickstart: https://docs.paymove.io/en/quickstart.md · Agent skill: https://docs.paymove.io/skill.md"]},"navigation":{"languages":[{"language":"pl","default":true,"banner":{"content":"[Rozpocznij integrację z AI](/ai-agents)","dismissible":true,"color":{"light":"#4c6ff7","dark":"#101638"}},"href":"introduction"},{"language":"en","banner":{"content":"[Start integrating with AI](/en/ai-agents)","dismissible":true,"color":{"light":"#4c6ff7","dark":"#101638"}},"href":"en/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"paymove","hasAudioNarration":false,"actualSubdomain":"paymove","customDomains":["docs.paymove.io"],"gitSource":{"type":"gitlab","owner":"paymove/utils","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"projectId":79743263,"mountPath":"","label":""},"entitlements":{},"buildId":"6aed9dd16048afba019df1a2","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Referencja API","count":33},{"language":"pl","tag":"Przewodniki","count":31},{"language":"en","tag":"Guides","count":28},{"language":"default","tag":"DocPay","count":26},{"language":"pl","tag":"Integracje","count":20},{"language":"en","tag":"Integrations","count":17},{"language":"pl","tag":"Integracja","count":11},{"language":"pl","tag":"Bramka płatnicza","count":9},{"language":"en","tag":"Payment Gateway","count":9},{"language":"en","tag":"Integration","count":9},{"language":"default","tag":"Formularze","count":8},{"language":"default","tag":"Bramka płatnicza","count":7},{"language":"default","tag":"Webhooki","count":7},{"language":"default","tag":"Personalizacja UI","count":5},{"language":"pl","tag":"Przycisk płatności (widget)","count":4},{"language":"pl","tag":"Tutoriale","count":4},{"language":"en","tag":"Payment button (widget)","count":4},{"language":"en","tag":"Tutorials","count":4},{"language":"default","tag":"Cennik","count":4},{"language":"pl","tag":"Wprowadzenie","count":3},{"language":"pl","tag":"AI Payments","count":3},{"language":"en","tag":"Introduction","count":3},{"language":"default","tag":"Płatności","count":3},{"language":"pl","tag":"Pomoc","count":2},{"language":"pl","tag":"Zasoby","count":2},{"language":"en","tag":"Help","count":2},{"language":"en","tag":"Resources","count":2},{"language":"en","tag":"DocPay","count":2},{"language":"default","tag":"Produkt","count":2},{"language":"default","tag":"Zwroty","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/paymove/9d551cf9009adf46/style.css"}],"page":{"pagePath":"en/errors","slug":"/en/errors","pageMetadata":{"title":"Error codes","description":"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.","icon":"triangle-alert","href":"/en/errors"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Info,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`error-response-shape`,children:`Error response shape`}),`\n`,_jsx(_components.p,{children:`The gateway returns errors in one fixed format:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:`401`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:`\"Invalid API key\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:`The HTTP status code, repeated in the body`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`A human-readable description`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Do not base logic on the `,_jsx(_components.code,{children:`message`}),` text.`]}),` Branch on the HTTP status only. The messages change without notice, and some of them contain internal backend class names - for example `,_jsx(_components.code,{children:`PaySubProductEntity not found`}),`. There is no separate machine-readable error code.`]})}),`\n`,_jsx(_components.p,{children:`Two departures from the shape above are worth knowing:`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Malformed JSON in the request`}),` - caught before the data reaches business logic:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:`400`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:`\"Malformed JSON request. Please check your request body.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`An unexpected failure on the Paymove side`}),` - always with the same generic message:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:`500`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`: `}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:`\"Something went wrong\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`error-table`,children:`Error table`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Malformed JSON request. Please check your request body.`})}),_jsx(_components.td,{children:`The body is not valid JSON, or an enum field holds an unknown value`}),_jsx(_components.td,{children:`Check the syntax and field types`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bank account not found for this partner`})}),_jsx(_components.td,{children:`The partner’s settlement account is not configured`}),_jsx(_components.td,{children:`Contact Paymove`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Missing credentials`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`X-API-KEY`}),` header is absent`]}),_jsx(_components.td,{children:`Add the header`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid API key`})}),_jsx(_components.td,{children:`The key was not recognised, expired or was revoked`}),_jsxs(_components.td,{children:[`Check that you use the key for the right environment: `,_jsx(_components.code,{children:`sk_test_`}),` in sandbox, `,_jsx(_components.code,{children:`sk_live_`}),` in production. Generate a new key in the `,_jsx(_components.a,{href:`https://panel.paymove.io`,children:`panel`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Missing access levels: [PARTNER_WRITE, CREATE_RESOURCES]`})}),_jsx(_components.td,{children:`The key has no write permission - affects setup calls such as creating a product`}),_jsxs(_components.td,{children:[`Generate a key with write access in the `,_jsx(_components.a,{href:`https://panel.paymove.io`,children:`panel`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Access denied`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`partnerId`}),` in the body is not the partner the key belongs to`]}),_jsxs(_components.td,{children:[`Check the `,_jsx(_components.code,{children:`partnerId`}),` - Paymove assigns it; do not guess other values`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Product \u003cuuid> does not belong to you`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`productId`}),` belongs to another partner`]}),_jsxs(_components.td,{children:[`Check that the `,_jsx(_components.code,{children:`productId`}),` matches the key you used`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PayProductEntity not found`})}),_jsxs(_components.td,{children:[`No product exists with that `,_jsx(_components.code,{children:`productId`})]}),_jsxs(_components.td,{children:[`Verify the `,_jsx(_components.code,{children:`productId`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`WebhookEntity not found`})}),_jsxs(_components.td,{children:[`No webhook exists with that `,_jsx(_components.code,{children:`webhookId`})]}),_jsxs(_components.td,{children:[`Verify the `,_jsx(_components.code,{children:`webhookId`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PaySubProductEntity not found`})}),_jsx(_components.td,{children:`No payment exists with that identifier`}),_jsx(_components.td,{children:`Check that you use the right identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Something went wrong`})}),_jsxs(_components.td,{children:[`An internal failure, `,_jsxs(_components.strong,{children:[`a missing `,_jsx(_components.code,{children:`externalId`})]}),`, `,_jsx(_components.strong,{children:`or a malformed UUID in the path`})]}),_jsxs(_components.td,{children:[`Check the body is complete and `,_jsx(_components.code,{children:`productId`}),` well-formed first - only then retry`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-this-api-does-not-have`,children:`What this API does not have`}),`\n`,_jsxs(_components.p,{children:[`This section matters as much as the table above. The gateway `,_jsx(_components.strong,{children:`does not provide`}),` the mechanisms below - writing code that handles them is dead weight and misleading:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mechanism`}),_jsx(_components.th,{children:`State`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Rate limiting and status `,_jsx(_components.code,{children:`429`})]}),_jsx(_components.td,{children:`Do not exist - the gateway does not throttle calls`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Status `,_jsx(_components.code,{children:`422`})]}),_jsxs(_components.td,{children:[`Never returned. Validation failures surface as `,_jsx(_components.code,{children:`400`}),` or `,_jsx(_components.code,{children:`500`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Idempotency-Key`}),` header`]}),_jsxs(_components.td,{children:[`Does not exist. `,_jsx(_components.code,{children:`externalId`}),` plays the role of an idempotency key`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`API versioning`}),_jsxs(_components.td,{children:[`None. There is no `,_jsx(_components.code,{children:`/v1/`}),` prefix and no version header`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Deprecation`}),` / `,_jsx(_components.code,{children:`Sunset`}),` headers`]}),_jsx(_components.td,{children:`Never sent`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Machine-readable error code (`,_jsx(_components.code,{children:`code`}),`, `,_jsx(_components.code,{children:`type`}),`)`]}),_jsxs(_components.td,{children:[`Does not exist. Only `,_jsx(_components.code,{children:`status`}),` and `,_jsx(_components.code,{children:`message`}),` are available`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors-that-look-like-successes`,children:`Errors that look like successes`}),`\n`,_jsxs(_components.p,{children:[`The most dangerous category: the API returns `,_jsx(_components.code,{children:`200`}),` even though the request was wrong. Check these before declaring the integration working.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A decimal amount is silently truncated.`}),` `,_jsx(_components.code,{children:`\"price\": 12.99`}),` is stored as `,_jsx(_components.code,{children:`12`}),` grosze and the response is `,_jsx(_components.code,{children:`200`}),`. Convert with `,_jsx(_components.code,{children:`Math.round(amount * 100)`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Unknown fields are ignored.`}),` Sending `,_jsx(_components.code,{children:`amount`}),` instead of `,_jsx(_components.code,{children:`price`}),`, or `,_jsx(_components.code,{children:`currency`}),` or `,_jsx(_components.code,{children:`returnUrl`}),` at the top level instead of inside `,_jsx(_components.code,{children:`details`}),`, raises no error - the payment is created with incomplete data.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`A reused `,_jsx(_components.code,{children:`externalId`}),` returns the old payment.`]}),` The response is `,_jsx(_components.code,{children:`200`}),` with the previously created `,_jsx(_components.code,{children:`redirectUrl`}),`, and the new amount is discarded. Change amounts via `,_jsx(_components.code,{children:`PATCH /api/pay/product/{productId}/subproduct/{externalId}`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`A missing `,_jsx(_components.code,{children:`externalId`}),` returns `,_jsx(_components.code,{children:`500`}),`, not `,_jsx(_components.code,{children:`400`}),`.`]}),` Before treating a `,_jsx(_components.code,{children:`500`}),` as transient and retrying, check that your body contains `,_jsx(_components.code,{children:`externalId`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`A missing `,_jsx(_components.code,{children:`price`}),` or `,_jsx(_components.code,{children:`details.returnUrl`}),` raises no error at all.`]}),` You get `,_jsx(_components.code,{children:`200`}),` and a working `,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`A malformed UUID in the path also returns `,_jsx(_components.code,{children:`500`}),`.`]}),` A typo in `,_jsx(_components.code,{children:`productId`}),` does not produce a readable `,_jsx(_components.code,{children:`400`}),` - you get the generic `,_jsx(_components.code,{children:`Something went wrong`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`handling-errors-in-code`,children:`Handling errors in code`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`const`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` response`}),_jsx(_components.span,{style:{color:`#56B6C2`,\"--shiki-dark\":`#56B6C2`},children:` =`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` await`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` fetch`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`url`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`, `}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`options`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`if`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:` (`}),_jsx(_components.span,{style:{color:`#56B6C2`,\"--shiki-dark\":`#56B6C2`},children:`!`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`response`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`ok`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` const`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` error`}),_jsx(_components.span,{style:{color:`#56B6C2`,\"--shiki-dark\":`#56B6C2`},children:` =`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` await`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:` response`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:`json`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(); `}),_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:`// { status, message }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` switch`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:` (`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`response`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`status`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` case`}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:` 401`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` case`}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:` 403`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` // Configuration problem - retrying will not help`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` throw`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` new`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` PaymentConfigError`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`message`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` case`}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:` 404`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` throw`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` new`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` PaymentNotFoundError`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`message`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` case`}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:` 400`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` // Bad request - fix the data, do not retry`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` throw`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` new`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` PaymentRequestError`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`message`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` case`}),_jsx(_components.span,{style:{color:`#D19A66`,\"--shiki-dark\":`#D19A66`},children:` 500`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7F848E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#7F848E`,\"--shiki-dark-font-style\":`italic`},children:` // Verify the body is complete first, only then retry`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` throw`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` new`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` PaymentServerError`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`message`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` default`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` throw`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:` new`}),_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:` Error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`(`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:\"`Paymove \"}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:\"${\"}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`response`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`status`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`}`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:`: `}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:\"${\"}),_jsx(_components.span,{style:{color:`#E5C07B`,\"--shiki-dark\":`#E5C07B`},children:`error`}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`.`}),_jsx(_components.span,{style:{color:`#E06C75`,\"--shiki-dark\":`#E06C75`},children:`message`}),_jsx(_components.span,{style:{color:`#C678DD`,\"--shiki-dark\":`#C678DD`},children:`}`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:\"`\"}),_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#ABB2BF`,\"--shiki-dark\":`#ABB2BF`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Retrying makes sense only for `,_jsx(_components.code,{children:`500`}),` and network failures, and only after confirming the request was complete. Statuses `,_jsx(_components.code,{children:`400`}),`, `,_jsx(_components.code,{children:`401`}),`, `,_jsx(_components.code,{children:`403`}),` and `,_jsx(_components.code,{children:`404`}),` indicate a problem on your side - a retry returns the same result.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`sdk-errors`,children:`SDK errors`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/en/sdk/javascript`,children:`Node.js SDK`}),` wraps the responses above in typed exceptions:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Class`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymoveValidationError`})}),_jsxs(_components.td,{children:[`An argument was rejected by the SDK before the request was sent. The `,_jsx(_components.code,{children:`field`}),` property names the parameter`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymoveApiError`})}),_jsxs(_components.td,{children:[`The API returned a non-2xx status. `,_jsx(_components.code,{children:`statusCode`}),` and `,_jsx(_components.code,{children:`responseBody`}),` hold the original response`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymoveNetworkError`})}),_jsxs(_components.td,{children:[`The request never completed. `,_jsx(_components.code,{children:`cause`}),` holds the underlying exception`]})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The SDK’s `,_jsx(_components.code,{children:`amount`}),` validation only checks that the value is a number greater than zero. An amount of `,_jsx(_components.code,{children:`49.99`}),` passes that check and the API truncates it to 49 grosze.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what’s-next`,children:`What’s next`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`REST API`,icon:`code`,href:`/en/rest-api`,children:_jsx(_components.p,{children:`The correct request structure and full responses.`})}),_jsx(Card,{title:`Signature verification`,icon:`shield-check`,href:`/en/webhook-signature`,children:_jsx(_components.p,{children:`Error handling on the webhook-receiving side.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"one-dark-pro","dark":"one-dark-pro"}},"config":{},"pageMetadata":{"title":"Error codes","description":"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.","icon":"triangle-alert","href":"/en/errors"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Error response shape","slug":"error-response-shape","depth":2,"children":[]},{"title":"Error table","slug":"error-table","depth":2,"children":[]},{"title":"What this API does not have","slug":"what-this-api-does-not-have","depth":2,"children":[]},{"title":"Errors that look like successes","slug":"errors-that-look-like-successes","depth":2,"children":[]},{"title":"Handling errors in code","slug":"handling-errors-in-code","depth":2,"children":[]},{"title":"SDK errors","slug":"sdk-errors","depth":2,"children":[]},{"title":"What’s next","slug":"what’s-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/paymove/14045507321b65c9/custom.js"],"subdomain":"paymove","siteName":"Paymove Docs","title":"Error codes - Paymove Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pl":{"href":"/errors","matchLevel":1},"en":{"href":"/en/errors","matchLevel":0}}},"lastModified":"2026-09-04T07:32:06.444Z","originalFileLocation":"en/errors.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Paymove Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Error codes - Paymove Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Paymove Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.paymove.io/en/errors\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paymove.mintlify.site/_mintlify/api/og/v2?division=Integration\u0026amp;title=Error+codes\u0026amp;description=Every+error+the+payment+gateway+returns%2C+what+causes+it+-+and+the+mechanisms+the+API+does+not+have.\u0026amp;theme=5eef5e65f816b8d836123849\u0026amp;signature=964f0f7aad424a03cd7623659b92543f039ab44ba0149dc94395b55cd05a5bdb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Error codes - Paymove Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paymove.mintlify.site/_mintlify/api/og/v2?division=Integration\u0026amp;title=Error+codes\u0026amp;description=Every+error+the+payment+gateway+returns%2C+what+causes+it+-+and+the+mechanisms+the+API+does+not+have.\u0026amp;theme=5eef5e65f816b8d836123849\u0026amp;signature=964f0f7aad424a03cd7623659b92543f039ab44ba0149dc94395b55cd05a5bdb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/paymove/NUkdi2wV0O8khn02/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Paymove Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4c6ff7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.paymove.io/en/errors\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/errors.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.paymove.io/en/errors\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pl\" href=\"https://docs.paymove.io/errors\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.paymove.io/errors\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.paymove.io/#organization\",\"name\":\"Paymove Docs\",\"url\":\"https://docs.paymove.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/paymove/PpHxa3yf6uDsNUt4/logo/paymove-light.svg?fit=max\u0026auto=format\u0026n=PpHxa3yf6uDsNUt4\u0026q=85\u0026s=437bbda97025f27e0159c5fab9430847\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.paymove.io#website\",\"name\":\"Paymove Docs\",\"url\":\"https://docs.paymove.io\",\"publisher\":{\"@id\":\"https://docs.paymove.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.paymove.io/en/errors#webpage\",\"url\":\"https://docs.paymove.io/en/errors\",\"name\":\"Error codes\",\"description\":\"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\",\"dateModified\":\"2026-09-04T07:32:06.444Z\",\"isPartOf\":{\"@id\":\"https://docs.paymove.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.paymove.io/en/errors#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.paymove.io/en/errors#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://docs.paymove.io/en/products/payment-gateway\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Payment Gateway\",\"item\":\"https://docs.paymove.io/en/products/payment-gateway\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Integration\",\"item\":\"https://docs.paymove.io/en/webhooks\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Error codes\",\"item\":\"https://docs.paymove.io/en/errors\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.paymove.io/en/errors#article\",\"headline\":\"Error codes\",\"name\":\"Error codes\",\"description\":\"Every error the payment gateway returns, what causes it - and the mechanisms the API does not have.\",\"url\":\"https://docs.paymove.io/en/errors\",\"mainEntityOfPage\":{\"@id\":\"https://docs.paymove.io/en/errors#webpage\"},\"dateModified\":\"2026-09-04T07:32:06.444Z\",\"publisher\":{\"@id\":\"https://docs.paymove.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.paymove.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Paymove Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Paymove Docs","nav":{"global":null,"languages":[{"language":"pl","default":true,"banner":{"content":"[Rozpocznij integrację z AI](/ai-agents)","dismissible":true,"color":{"light":"#4c6ff7","dark":"#101638"}},"pages":[{"title":"pl","href":"/errors"}]},{"language":"en","banner":{"content":"[Start integrating with AI](/en/ai-agents)","dismissible":true,"color":{"light":"#4c6ff7","dark":"#101638"}},"tabs":[{"tab":"Guides","groups":[{"group":"Introduction","pages":[{"title":"Introduction","icon":"house","mode":"center","href":"/en/introduction"},{"title":"Quickstart","icon":"rocket","href":"/en/quickstart"},{"title":"Payment methods","icon":"wallet","href":"/en/payment-methods"}]},{"group":"Integrations","pages":[{"group":"Payment Gateway","icon":"credit-card","pages":[{"title":"Start","icon":"circle-play","href":"/en/products/payment-gateway"},{"group":"Integration","icon":"plug","pages":[{"title":"Configuration","icon":"webhook","href":"/en/webhooks"},{"title":"SDK","icon":"box","href":"/en/sdk/javascript"},{"title":"Browser widget","icon":"app-window","href":"/en/sdk/widget"},{"title":"REST API","icon":"code","href":"/en/rest-api"},{"title":"Webhook signature verification","icon":"shield-check","href":"/en/webhook-signature"},{"title":"Payment statuses","icon":"list-checks","href":"/en/payment-status"},{"title":"Refunds","description":"Refund a payment over the API: feature availability, endpoint, refund statuses, listing refunds and the limitations.","icon":"undo-2","href":"/en/refunds"},{"title":"Error codes","icon":"triangle-alert","href":"/en/errors"}]}]},{"group":"DocPay","icon":"receipt-text","pages":[{"title":"Start","description":"DocPay - payments for single documents: payment demands, tickets and invoices, delivered as a QR code.","icon":"circle-play","href":"/en/products/docpay"},{"group":"Integration","icon":"plug","pages":[{"title":"REST API","icon":"code","href":"/en/products/docpay/rest-api"}]}]},{"group":"Payment Link","icon":"link","pages":[{"title":"Start","icon":"circle-play","href":"/en/products/payment-link"},{"title":"Integration","icon":"plug","href":"/en/products/payment-link/integration"}]},{"group":"Payment button (widget)","icon":"mouse-pointer-click","pages":[{"title":"Start","icon":"circle-play","href":"/en/app-widget"},{"title":"Configuration","icon":"sliders-horizontal","href":"/en/app-widget/configuration"},{"title":"Controlling the widget","icon":"code","href":"/en/app-widget/javascript-api"},{"title":"Apple Pay activation","icon":"apple","href":"/en/app-widget/apple-pay"}]}]},{"group":"Tutorials","pages":[{"title":"Payment Gateway: basic integration","icon":"rocket","href":"/en/products/payment-gateway/tutorial"},{"title":"Payment Gateway: webhooks","icon":"radio-tower","href":"/en/products/payment-gateway/tutorial-webhook"},{"title":"DocPay: basic integration","icon":"qr-code","href":"/en/products/docpay/tutorial"},{"title":"DocPay: webhooks","icon":"bell","href":"/en/products/docpay/tutorial-webhook"}]},{"group":"Help","pages":[{"title":"Building with AI agents","icon":"bot","href":"/en/ai-agents"},{"title":"Support","icon":"headset","href":"/en/support"}]},{"group":"Resources","pages":[{"title":"Branding","href":"/en/branding"},{"title":"QR codes","href":"/en/qr-codes"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/płatności/utwórz-płatność"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en/changelog"}]}]}]},"basePath":"","title":"Error codes - Paymove Docs","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BcDCEkh6.js","dist-CwjSCXIK.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-eKJ4rcii.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}