Mozarto - The Payments Orchestration Platform
    • 1. Introduction
    • 2. Quick Start
    • 3. Authentication
    • 4. Webhook Setup
    • 5. Errors
    • 6. Redirect flow
      • Pay-In Flow
      • Pay-Out Flow
    • 7. Payment Providers (PSPs)
      • Overview
      • Brite
      • CashLib
      • Cleo
      • Contiant
      • emerchantpay
      • Flexepin
      • ForumPay
      • Gigadat
      • Neosurf
      • OFApay
      • PayModum
      • PayOne
      • PawaPay
      • Trust Payments
      • Worldpay
    • 8. Redirect Flow APIs
      • Redirect Flow APIs - overview
      • Pay-In
        • Brite
        • CashLib
        • Cleo
        • Contiant
        • emerchantpay
        • Flexepin
        • Forumpay
        • Gigadat
        • Neosurf
        • OFApay
        • PayOne
        • PawaPay
        • Trust Payments
        • WorldPay
      • Pay-Out
        • Cleo
        • Forumpay
        • Gigadat withdraw ACH
        • Gigadat withdraw ETO
        • PawaPay
        • PayOne
        • Trust Payments
    • Webhook
      • ForumPay status webhook
      • PayOne status webhook
    • Schemas
      • TransactionData

    5. Errors

    Errors#

    HTTP status codes#

    CodeMeaning
    200 OKRequest succeeded
    400 Bad RequestInvalid request body - missing required field or validation failure
    401 UnauthorizedMissing or invalid Bearer token
    403 ForbiddenToken valid but action not permitted (e.g. password expired)
    500 Internal Server ErrorUnexpected server error - retry with backoff

    Error response format#

    All errors return a consistent JSON body:
    {
      "status": "error",
      "isSuccess": false,
      "message": "Payment could not be processed due to invalid PSP credentials.",
      "errorCode": "INVALID_PSP_CREDENTIALS",
      "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
      "errors": [],
      "data": {}
    }
    FieldTypeDescription
    statusstringAlways "error" for error responses
    isSuccessbooleanAlways false for error responses
    messagestringFriendly human-readable description - safe to display to end users
    errorCodestringNormalized Mozarto error code - use this for programmatic handling. See Normalized error codes below
    transactionIdstringMozarto transaction ID - present when a transaction was created before the error occurred
    errorsarrayList of specific validation messages (may be empty)
    dataobject/nullRaw PSP response payload - kept for backward compatibility. Structure varies by provider
    errorCode is the stable integration point. message is a friendly English string. data contains the raw PSP fields and is kept for backward compatibility - use errorCode for branching logic.

    Normalized error codes#

    Mozarto maps every PSP error to a canonical errorCode value. Use errorCode for programmatic handling rather than parsing message strings or data.* raw fields.

    Credentials and configuration#

    errorCodeWhen
    INVALID_PSP_CREDENTIALSAPI key is wrong, missing, or the PSP account is suspended
    PSP_NOT_CONFIGUREDPayment provider is not configured for your brand in the back office
    PSP_ENDPOINT_NOT_FOUNDPSP endpoint returned 404 - check your API credentials configuration

    Payment failures#

    errorCodeWhen
    CARD_DECLINEDCard was declined by the issuer
    CARD_EXPIREDCard has expired
    INSUFFICIENT_FUNDSCard or account has insufficient funds
    THREE_DS_REQUIRED3D Secure authentication is required
    THREE_DS_FAILED3D Secure authentication failed

    Limits and validation#

    errorCodeWhen
    AMOUNT_BELOW_MINTransaction amount is below the provider minimum
    AMOUNT_ABOVE_MAXTransaction amount exceeds the provider maximum
    CURRENCY_NOT_SUPPORTEDCurrency is not supported by the payment provider
    COUNTRY_NOT_SUPPORTEDCountry is not supported by the payment provider
    DUPLICATE_TRANSACTIONA duplicate transaction was detected

    Orchestration#

    errorCodeWhen
    ORCHESTRATION_RULE_NOT_MATCHEDNo enabled provider account matches the request
    ORCHESTRATION_CONDITION_FAILEDA matching account exists but the request falls outside its constraints (e.g. amount out of range)

    Connectivity#

    errorCodeWhen
    PSP_TIMEOUTPSP did not respond in time - safe to retry
    PSP_UNAVAILABLEPSP returned a 5xx error - safe to retry with backoff
    PSP_RATE_LIMITEDToo many requests to the PSP - retry after a delay

    Fallback#

    errorCodeWhen
    UNKNOWN_PSP_ERRORPSP returned an unrecognised response - contact support if it persists
    INTERNAL_ERRORUnexpected Mozarto-side error

    Retryability#

    RetryableError codes
    Yes - retry with backoffPSP_TIMEOUT, PSP_UNAVAILABLE, PSP_RATE_LIMITED
    No - fix the request or configurationAll other codes

    Common errors#

    Missing required field - 400#

    {
      "status": "error",
      "message": "Missing required field: pspType",
      "isSuccess": false,
      "errors": []
    }
    Check the PSP reference page for required fields.

    Validation failed - 400#

    {
      "status": "error",
      "message": "Validation failed",
      "isSuccess": false,
      "errors": [
        "amount must not be empty",
        "email must be a valid email"
      ]
    }

    Invalid token - 401#

    {
      "status": "error",
      "message": "Unauthorized",
      "isSuccess": false,
      "errors": []
    }
    Verify the Bearer token is present and has not expired.

    No matching provider account - 400#

    {
      "status": "error",
      "message": "Rules action is not matched",
      "isSuccess": false,
      "errors": []
    }
    No enabled provider account matches your brand and the selected PSP. Go to Payments Module in the back office, select your brand, and open the account for the pspType you are using. Confirm the account is enabled and that its Processing Scope covers the country and currency in the request before retrying. If the scope already covers the request, contact your Mozarto account manager - routing for your brand may need to be activated on the Mozarto side.

    Request outside the processing scope - 400#

    {
      "status": "error",
      "message": "Error",
      "isSuccess": false,
      "errors": [
        "Amount should be greater than 100. Current value is 11."
      ]
    }
    A provider account matched but the request does not satisfy its constraints - for example, the transaction amount is outside the configured min/max range. The errors array contains the specific constraint that failed. Adjust the request to meet the constraint, or update the account in the back office under Payments Module - Processing Scope. Constraints that are not editable there are managed by Mozarto - contact your account manager to have them changed.

    Country or currency outside the processing scope - 400#

    {
      "status": "error",
      "message": "Payment method is not available for this country or currency",
      "isSuccess": false,
      "transaction_status": "FAILED"
    }
    The request's country or currency is not enabled on the provider account your brand uses. Open the account under Payments Module - Processing Scope and add the country or currency, or send a request that matches what is already configured.
    The same check runs at company level first, and returns a different message:
    messageMeaning
    This country or currency is not enabled for this provider at company level. Please contact your administratorThe provider is not enabled for that country or currency for your whole company
    Payment method is not available for this country or currencyThe company allows it, but the account your brand uses does not
    Payment method is not enabled for this transactionThe country and currency match, but the resolved payment method is switched off on the account
    PSP is disabled for this company. Please contact your administratorThe provider is switched off at company level
    PSP account is disabled. Please contact your administratorThe specific provider account is switched off
    All Pay-In payment methods are disabled for this provider at company level. Please contact your administratorEvery Pay-In method is off for that provider at company level
    All Pay-Out payment methods are disabled for this provider at company level. Please contact your administratorEvery Pay-Out method is off for that provider at company level
    All payment methods are disabled for this provider account. Please contact your administratorEvery method is off on that account
    A missing country is not rejected. If you omit it, Mozarto geo-locates the caller's IP and matches the scope against the country it detects. When the IP cannot be resolved, the country check is skipped and the request continues to the provider. Send country explicitly so routing does not depend on where your servers run - see Country.

    PSP configuration not found - 400#

    {
      "status": "error",
      "message": "Something went wrong",
      "isSuccess": false,
      "data": "PSP Configuration not found. Please check you psp Configuration"
    }
    The payment provider is not configured for your brand in the Mozarto back office. Go to Payments Module, select your brand, and open the provider account. Save the required credentials (username, password, webhook URL, and any provider-specific fields) in the API Credentials section of the Processing Scope tab before retrying.

    Provider returned an error - 400#

    {
      "status": "error",
      "message": "Payment provider rejected the request",
      "isSuccess": false,
      "errors": ["Invalid currency for selected provider"]
    }
    The request reached the payment provider but was rejected. Check the errors array for the provider's reason.

    PSP-specific error responses#

    Each provider returns rejection details in a different shape inside the data field. PayOne returns a normalized errorCode at the top level. Worldpay, ForumPay, and Gigadat will include errorCode once migrated to the normalized error format - see Normalized error codes for the full code list.

    Worldpay#

    Worldpay errors return a numeric errorCode and a human-readable errorMessage in data:
    {
      "status": "error",
      "message": "Something went wrong",
      "isSuccess": false,
      "data": {
        "errorCode": "5",
        "errorMessage": "Invalid card details",
        "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1"
      }
    }
    FieldDescription
    data.errorCodeNumeric error code from Worldpay - use for programmatic handling
    data.errorMessageHuman-readable description of the rejection
    data.transactionIdMozarto transaction ID - use to look up the failed transaction

    ForumPay#

    ForumPay errors include an err string and an err_code identifier in data. Some errors also include an additional object with provider-specific metadata:
    {
      "status": "error",
      "message": "Invoice amount is too high.",
      "isSuccess": false,
      "data": {
        "err": "Invoice amount is too high.",
        "err_code": "amountExceedsTransactionLimit",
        "additional": {
          "limit": "8486.30",
          "invoice_currency": "EUR"
        },
        "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1"
      }
    }
    FieldDescription
    data.errHuman-readable error string from ForumPay
    data.err_codeMachine-readable error code from ForumPay - use this for programmatic handling
    data.additionalOptional object with provider-specific context (e.g. transaction limits, currency). Present on some errors only
    data.transactionIdMozarto transaction ID - use to look up the failed transaction
    ForumPay Pay-Out errors follow the same structure. err_code values are camelCase strings defined by ForumPay (e.g. amountExceedsTransactionLimit). The additional field is not guaranteed on every error - check for its presence before accessing its properties.

    PayOne#

    PayOne errors include a normalized errorCode at the top level. The raw PSP message is kept in data.error for backward compatibility:
    {
      "status": "error",
      "isSuccess": false,
      "errorCode": "INVALID_PSP_CREDENTIALS",
      "message": "Payment could not be processed due to invalid PSP credentials.",
      "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
      "errors": [],
      "data": {
        "error": "Invalid account details"
      }
    }
    FieldDescription
    errorCodeNormalized Mozarto error code - use this for programmatic handling. See Normalized error codes
    messageFriendly message mapped from errorCode - safe to display to end users
    data.errorRaw error string from PayOne - kept for backward compatibility
    Use errorCode for branching logic. data.error contains the raw PSP value for integrations written against the previous format.

    Gigadat#

    Gigadat errors use the standard top-level errors array. There is no provider-specific data field:
    {
      "status": "error",
      "message": "Error",
      "isSuccess": false,
      "errors": [
        "Amount should be greater than 12. Current value is 10."
      ]
    }
    FieldDescription
    errorsArray of validation or rejection strings returned by Gigadat - may contain one or more messages
    messageAlways "Error" for Gigadat rejections - use errors[0] for the specific reason
    Gigadat Pay-Out (ETO and ACH) returns the same error shape. The errors array always contains at least one message.
    For 500 responses, Gigadat returns data as a string with the provider's error detail rather than null:
    {
      "status": "error",
      "message": "Internal server error",
      "isSuccess": false,
      "data": "CPI Payload validation failed: Mobile must be 10 digits (5551234567) or 11 digits with country code (15551234567)"
    }
    Read data as a string when handling Gigadat 500 responses.

    ForumPay Pay-Out - on hold (not an error)#

    A successful ForumPay Pay-Out returns 200 OK with transaction_status: "On Hold", not an error response. The pay-out is held for admin approval before processing:
    {
      "status": "success",
      "message": "Transaction is on hold",
      "isSuccess": true,
      "data": {
        "invoice_currency": "EUR",
        "invoice_amount": "13.00",
        "currency": "BTC",
        "payment_source": "cash",
        "wait_time": "20 minutes",
        "network_processing_fee": "0.00000735",
        "rate": "68899.7244",
        "amount_exchange": "0.00018868",
        "amount": 13,
        "fast_transaction_fee": "0.00001044",
        "fast_transaction_fee_currency": "BTC/kB",
        "payment_id": "1a52f405-5652-4fb6-b37f-538e1feb24d0",
        "reference_no": "6a01ed09b681e530b9f26584",
        "address": "btc-1eda64a85da94d71a2ac5ed84e929553",
        "access_token": "<forumpay-access-token>",
        "transactionId": "6a01ed09b681e530b9f26584",
        "merchantReference": ""
      }
    }
    Do not treat this as a failure. Wait for the webhook with a terminal transaction_status before crediting or debiting the user.

    Retry guidance#

    Retry only when the failure is likely transient. Retrying a request with invalid data can create noise and slow down recovery.
    When errorCode is present, use it to determine retryability: PSP_TIMEOUT, PSP_UNAVAILABLE, and PSP_RATE_LIMITED are safe to retry with backoff. All other codes indicate a permanent failure - fix the request or configuration before retrying.
    When retrying 500 errors, use exponential backoff (for example: 1s, 2s, 4s, 8s; cap at 30s) and stop after a small number of attempts.
    Modified at 2026-09-14 11:34:13
    Previous
    4. Webhook Setup
    Next
    6. Redirect flow
    Built with