logo
StartErrors

Errors

Every error response follows the same structure, making it easy to handle errors consistently across all endpoints.

Error format

{
  "successful": false,
  "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description",
    "details": { ... }
  }
}
FieldTypeDescription
successfulboolAlways false
request_idstringUnique request ID — include this when contacting support
error.codestringMachine-readable error code for programmatic handling
error.messagestringHuman-readable description
error.detailsobjectAdditional context (optional, varies by error)

Always use error.code (not HTTP status code) to determine the specific error. Multiple different errors can share the same HTTP status code.


Authentication errors

These errors can occur on any endpoint.

HTTPCodeDescription
401API_KEY_MISSINGX-Api-Key header is missing or empty
403API_KEY_INVALIDAPI key is invalid or deactivated
403OWNER_BLOCKEDMerchant account owner is blocked
403MERCHANT_BLOCKEDMerchant account is banned
403MERCHANT_NOT_ACTIVEMerchant account is not yet activated

Invoice errors

Returned by POST /api/v1/create-invoice and GET /api/v1/invoice/{invoice_id}.

HTTPCodeDescription
409DUPLICATE_EXTERNAL_IDInvoice with this external_id already exists
409PENDING_INVOICE_EXISTSCustomer already has a pending invoice
403CUSTOMER_RATE_LIMITToo many unpaid invoices for this customer
422CURRENCY_INVALIDCurrency code not found or disabled
503NO_AVAILABLE_REQUISITESNo payment requisites available at the moment
503DEALS_SYSTEM_DISABLEDPayment system is temporarily disabled
404INVOICE_NOT_FOUNDInvoice with the specified ID was not found

CUSTOMER_RATE_LIMIT details

When rate limited, the details object includes information to help you handle the situation:

{
  "error": {
    "code": "CUSTOMER_RATE_LIMIT",
    "message": "Customer created too many unpaid invoices",
    "details": {
      "window_minutes": 60,
      "limit": 5,
      "next_allowed_at": "2026-02-26T15:30:00+00:00",
      "customer_id": "user_12345"
    }
  }
}

Wait until next_allowed_at before creating a new invoice for this customer.


Currency errors

Returned by GET /api/v1/currencies.

HTTPCodeDescription
503RATES_UNAVAILABLEExchange rate service is temporarily unavailable
503RATES_INVALIDExchange rate data is corrupted
404RATE_NOT_FOUNDNo rates available for any currency
422RATE_INVALIDInvalid rate for a specific currency

Withdrawal errors

Returned by GET /api/v1/withdrawals and GET /api/v1/withdrawals/{withdraw_uuid}.

HTTPCodeDescription
404WITHDRAWALS_NOT_FOUNDNo withdrawals found for this merchant
404WITHDRAWAL_NOT_FOUNDWithdrawal with the specified UUID not found

Validation errors

Returned when the request body fails schema validation (invalid JSON, missing required fields, wrong types).

HTTP status: 400 Error code: VALIDATION_ERROR

{
  "successful": false,
  "request_id": "...",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request payload",
    "details": [
      {
        "loc": ["body", "amount"],
        "code": "value_error.missing",
        "message": "field required"
      },
      {
        "loc": ["body", "currency_code"],
        "code": "string_pattern_mismatch",
        "message": "String should match pattern '^[A-Z]{3}$'"
      }
    ]
  }
}

Details fields

FieldTypeDescription
locarrayPath to the invalid field, e.g. ["body", "amount"]
codestringPydantic validation error type
messagestringHuman-readable validation message

Server errors

These indicate a problem on our side. They are rare but should be handled gracefully.

HTTPCodeDescription
500INTERNAL_ERRORUnexpected server error
503DB_UNAVAILABLEDatabase is temporarily unavailable

INTERNAL_ERROR details

{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Something went wrong",
    "error_id": "f8e2a1b3"
  }
}

The error_id is a short identifier that helps our team locate the issue in logs. Include it when contacting support.


Error handling recommendations

Implement error handling based on error.code, not HTTP status codes. This gives you the most specific information about what went wrong.

503******** errors (NO_AVAILABLE_REQUISITES, RATES_UNAVAILABLE, DEALS_SYSTEM_DISABLED, DB_UNAVAILABLE) are temporary. Retry the request after a short delay (5–30 seconds).