CryptiumPayDocs
API reference

Errors and retries

Distinguish validation errors, authentication refusals, conflicts, and uncertain outcomes.

Response formats

Validation errors include a machine-readable code:

{ "statusCode": 400, "code": "INVALID_REQUEST", "message": "Request validation failed" }

Mapped domain errors use their code as the message:

{ "statusCode": 409, "code": "ORDER_ID_ALREADY_EXISTS", "message": "ORDER_ID_ALREADY_EXISTS" }

Authentication and path-validation errors can use the standard Nest format instead:

{ "statusCode": 401, "message": "Invalid merchant credentials", "error": "Unauthorized" }

Do not assume every error has a code property. Handle HTTP status first, then inspect the available safe code or message.

Common outcomes

HTTP statusExamplesAction
400INVALID_REQUEST, malformed fieldsCorrect the request.
401Missing or invalid merchant credentialsCheck merchant status, ID, key, and serialization.
403API_SOURCE_NOT_ALLOWEDCheck the allowed source addresses.
404ITEM_NOT_FOUND, INVOICE_NOT_FOUNDCheck the saved identifier and ownership.
409ORDER_ID_ALREADY_EXISTS, ITEM_ARCHIVED, expiry or method conflictsResolve the business conflict before retrying.
422Unsupported currency, token, network, or payment methodUse an eligible combination.
502Invalid upstream payment state or upstream failureReconcile the invoice and contact support if persistent.
503Dependency or rate unavailableRetry later with the same operation identity.
504UPSTREAM_TIMEOUTThe operation may have committed; reconcile or retry idempotently.

Safe invoice retries

Supply order_id on the first create request. Reuse it with identical business fields after a timeout or temporary failure. Changing fields for that existing order returns a conflict. Without an order ID, separate calls can create separate invoices.

Do not regenerate an explicit expiry, order ID, or other request field on every retry. A changed request is a different set of conditions. The server normalizes insignificant decimal zeroes and object-key order for invoice deduplication, but API authentication still follows its own exact serialization rules.

Limits and support

Request-field limits are listed on the endpoint pages. Production rate limits and ingress policies depend on deployment; this documentation does not promise an unverified requests-per-second quota.

For support, include a request time in UTC, the endpoint, HTTP status, and invoice or order reference. Never include secrets, signatures, or session cookies.

On this page