Skip to main content

Error handling


Keepz API errors follow a standardized format. Each error is returned with an HTTP status code (in the response header) and a JSON body:

{
"message": "You do not have permission to save card!",
"statusCode": 6031,
"exceptionGroup": 3
}

Fields:

ParameterTypeDescription
messagestringHuman-readable error description.
statusCodenumberUnique error code assigned by Keepz.
exceptionGroupnumberNumeric identifier of the exception group.

Exception Groups

Errors are grouped into categories to simplify handling. The value of exceptionGroup in the response corresponds to one of the following:

GroupValueTypical HTTP Status CodesDescription
VALIDATION1400 Bad RequestInput/data validation failures
BUSINESS_LOGIC2409 Conflict, 410 Gone, 429 Too Many Requests, 451 Unavailable For Legal ReasonsViolations of domain rules or state
AUTH3403 ForbiddenPermission/authorization issues
EXTERNAL_REST4502 Bad Gateway, 500 Internal Server Error,Errors calling external/third-party systems
RESOURCE_NOT_FOUND5404 Not FoundMissing or inactive resources
GENERAL6`500 Internal ServerUnexpected system/runtime issues
INTERNAL_REST7500 Internal Server ErrorErrors calling internal services

Status codes by Group

Resurces not found

CodeMessage
6002Active check order not found
6004,6008Active Integrator not found
6005Integrator order not found
6030Tip receiver not found
6044Active third party not found
6045Third party order not found
6046Order not found
6075Integrator card not found
6093DEFAULT direct link provider not found
6100Subscription plan not found
6112Subscription plan history not found

Business logic

CodeMessage
6003Integrator order expired
6006Order not found or already finalised and can't be canceled
6015Order is not valid anymore
6016Order is already paid
6017Order is expired
6023Order with this integratorOrderId already exists
6024Receiver type must be 'BRANCH'
6034Provided more than one direct link provider

Validation

CodeMessage
CodeMessage
6007Refund amount out of range
6026Amount out of limit range
6027Given initiate currency is not allowed
6028Given distribution currency is not allowed
6029Given acquiring currency is not allowed
6035validUntil must be a future date
6041Invalid date range
6049Invalid integrator order create param
6053Not valid method argument
6058Amount scale is more than 2 after floating point
6059Split amount sum is not equal to main amount
6060In split details main receiver not found
6061In split details main receiver is included more than once
6064Split details not provided
6062Split details less than 2 size
6066Split amount sum is greater than main amount
6068Amount must be greater than zero
6070Personal number is required
6076Integrator order properties cannot be null
6077Invalid order property value
6078Missing order property value
6079Invalid order property field
6081Amount is different from service provider debt
6082XML signature validation failed
6085Invalid integrator type
6086RS order is in payment process already
6087RS order is already paid
6088RS order not valid for payment anymore
6091Direct link provider is required
6094Partial refund not allowed without details
6095Order refund param validation failed
6096Invalid refund details
6097Duplicated receiver
6098Invalid split receiver type
6099Invalid split receiver identifier format
6101Given payment provider not allowed for subscription
6109Invalid third party order create param
6110Invalid third party order finalise param
6113Amount must be zero
6021Number format is not valid

General

CodeMessage
6009Failed to encrypt data
6010Failed to decrypt data
6011Failed to parse data
6013Failed to decrypt data using AES
6014Failed to encrypt data using AES
6054Unhandled general exception

Auth

CodeMessage
6022No permission to create orders
6025No permission to create multi currency orders
6031No permission to save card
6032No permission to define order expire date
6033No permission to receive direct link
6036No permission to use dynamic redirect
6037No permission to use additional fields
6038No permission to use refund
6090No permission to pay with saved card!
6111No permission for subscription
6056No permission to use dynamic callback
6057No permission to use split functionality

Error Handling Best Practices

To ensure smooth troubleshooting and faster resolution, integrators should:

  • Log the full error response (message, statusCode, exceptionGroup, and the HTTP status).

  • Identify the exception group to understand the error category (e.g., AUTH means a permission issue).

  • Retry carefully:

    • Do not retry validation/auth errors — fix the request instead.

    • Business logic and external REST errors may sometimes succeed after retry.

  • Escalate when needed: If you encounter an unknown statusCode or unclear error, forward the logged details to Keepz Support.