Skip to main content

API Response & Error Codes

The following is a list of errors that can be returned by any API method.

Status CodeHttp CodeDescription
Unauthorized401The input parameter security token was not specified or is invalid.
Forbidden403The IP invoking the API was not one of the allowed IPs.
Not Found404The request method was not found as the URL parameter was not specified in the URL.
Method Not Allowed405The URL parameter was not specified in the URL for the request method.
Unsupported Media Type415Server refused the request because the format is unsupported by the requested resource
Too Many Requests429The number of requests for this API has exceeded the maximum number of allowed requests.
System Error500A system error occurred in the Nium platform.
Service Unavailable503The system is temporarily unavailable.

Validation Errors

When an API calls fails due to a validation error an error response will be returned, with the http status code reported as 400.

The error response is an "ErrorResponseWrapper" object representation similar to the one shown below. Note that the "response.details" property will specify which property failed validation (the CARD_REFERENCE in this case) and the type of validation failure (NOT_FOUND in this case)

{
"envelope": {
"statusCode": "VALIDATION_ERROR",
"httpStatusCode": 400,
"apiReference": "616b0389972d4f7a84e8f598a7643e82",
"externalCallReference": null,
"timestamp": 1669117138157
},
"response": {
"details": {
"CARD_REFERENCE": "NOT_FOUND"
},
"body": {}
}
}

The types of validation failures are listed below.

DetailsDescription
NULL_OR_EMPTYThe input parameter was not specified.
NOT_FOUNDThe input parameter did not identify an existing or valid entry.
INVALID_VALUEThe specified input parameter contained invalid characters, invalid values, or invalid formats.
INVALID_LENGTHThe length of the specified input parameter is invalid.
INVALID_CHARSThe specified input parameter is invalid due to invalid characters used.
NOT_UNIQUEThe specified input parameter must be unique across all entries of the same type.
INVALID_STATEThe input parameter virtual card factory name did not identify a virtual card factory in an active state.
INVALID_FORMATThe specified input parameter was not in a valid format

Validation Rules

These are valid characters corresponding to parameters within the Nium API.

cardName parameter

The card name parameter must follow these rules

  • a to z
  • A to Z
  • 0 to 9
  • Dash (-), dot (.), underscore (_), forward slash (/), space ( )
  • \u00A1 to \u00FF (Latin-1)
  • \u0100 to \u017F (Latin Extended A)
  • \u0180 to \u024F (Latin Extended B)
  • \u4e00 to \u9fff (Unified CJK Ideographs)
  • \u0400 to \u04FF (Cyrillic)
  • \u0500 to \u0527 (Cyrillic Supplement)
  • \u2DE0 to \u2DFF (Cyrillic Extended A)
  • \uA640 to \uA673 and \uA67C to \uA697 (Cyrillic Extended B)

Authentication Errors

When an API calls fails due to an authentication error an error response will be returned, with the http status code reported as 409 in certain instances.

The error response is an "ErrorResponseWrapper" object representation similar to the one shown below. Note that the "response.details" property will specify the type of authentication error.

{
"envelope": {
"statusCode": "LOGICAL_ERROR",
"httpStatusCode": 409,
"apiReference": "616b0389972d4f7a84e8f598a7643e82",
"externalCallReference": null,
"timestamp": 1669117138157
},
"response": {
"details": {
"TOO_MANY_FAILED_ATTEMPTS": ""
},
"body": {}
}
}

The types of authentication failures handled in the manner described above are listed below.

DetailsDescription
TOO_MANY_FAILED_ATTEMPTSThe maximum number of failed login attempts has been exceeded.
LEGISLATION_RESTRICTEDThe login failed due to legislation restrictions.
COUNTRY_NOT_ALLOWEDThe specified country is not allowed for login.

Virtual Card Factory Errors

When an API calls fails due to a virtual card factory (card type) error an error response will be returned, with the http status code reported as 409.

The error response is an "ErrorResponseWrapper" object representation similar to the one shown below. Note that the "response.details" property will specify the type of failure.

{
"envelope": {
"statusCode": "LOGICAL_ERROR",
"httpStatusCode": 409,
"apiReference": "616b0389972d4f7a84e8f598a7643e82",
"externalCallReference": null,
"timestamp": 1669117138157
},
"response": {
"details": {
"LOW_ATV_USED": ""
},
"body": {}
}
}

The types of card factory failures are listed below.

DetailsDescription
LOW_ATV_USEDNo available configurations due to low average transaction value.
NO_MATCHING_CONFIGNo matching factory configuration was found.

Card and Fund Management Errors

When an API calls fails due to card or fund management errors an error response will be returned, with the http status code reported as 409.

These are error that can be returned during any process that involves fund movement or a
change in the state of a card.

The error response is an "ErrorResponseWrapper" object representation similar to the one shown below. Note that the "response.details" property will specify the type of failure.

{
"envelope": {
"statusCode": "LOGICAL_ERROR",
"httpStatusCode": 409,
"apiReference": "616b0389972d4f7a84e8f598a7643e82",
"externalCallReference": null,
"timestamp": 1669117138157
},
"response": {
"details": {
"NOT_ENOUGH_FUNDS": ""
},
"body": {}
}
}

The types of card or fund management failures are listed below.

DetailsDescription
NOT_ENOUGH_FUNDSThe specified source instrument of the transaction does not have enough funds.
INVALID_ISSUERThe specified source and destination must have the same issuer. Note that transfers between different issuers are allowed only when both the source and destination are funding accounts.
ISSUING_LIMIT_EXCEEDEDThe issuing capacity limit for the respective issuer and currency was reached.
CURRENCY_NOT_ALLOWED_FOR_TRANSACTIONThe action is not allowed between the input cross-currencies.
TRANSFER_AMOUNT_TOO_SMALLThe specified amount is too small.
TRANSFER_AMOUNT_TOO_LARGEThe specified amount is too large.
DESTINATION_INSTRUMENT_ALREADY_FUNDEDThe instrument being funded has been configured as a single fund instrument and hence reloading is not allowed.
LOAD_ALREADY_PROCESSEDThe update of the scheduled load fails if the schedule date is in the past and parameters like funding account reference, amount and schedule date are being updated. The reason is that the load transaction has already been processed and changes cannot occur.
CANCELLATION_NOT_ALLOWEDThe scheduled load cannot be cancelled since the instruction has been completed. In other words, the clearance date is in the past.
CLEARANCE_DATE_IN_THE_PASTThe clearance date cannot be a date less than today or a date greater than the expiry date.
CLEARANCE_DATE_AFTER_MAXIMUM_CLEARANCE_DATEThe clearance date cannot be a date greater than the maximum clearance date of a card.
CLEARANCE_DATE_BEFORE_A_SCHEDULED_LOADA clearance date must be later than all scheduled loads on a card.
SCHEDULED_LOAD_DATE_AFTER_CLEARANCE_DATEA scheduled load can happen before the clearance date of the card (even on the same day).
CARD_IMAGE_NOT_FOUNDThe getCardImages parameter is true and one or both of the card images were not found.
CARD_STATE_INVALIDThe virtual card identified with the input card reference was not active.
CARD_DELETION_FAILEDThe virtual card deletion failed.
TIME_FRAME_GREATER_ONE_YEARThe period between input parameter start date and input parameter end date was greater than one year.
FACTORY_UNAVAILABLEThe input parameter instrument factory name did not identify a valid instrument factory.
NEW_EXPIRY_DATE_IS_BEFORE_CURRENTThe new expiry date is earlier than the current one.
CARD_ALREADY_EXPIREDThe chosen card is already expired.
EXTENSION_UNSUPPORTEDExtension of expiry date is not supported by the virtual card factory of this card.
AUTHENTICATION_DATA_NOT_SUPPORTEDThe handling of authentication data for virtual cards is not supported by the card provider.
MINIMUM_AVAILABLE_BALANCE_EXCEEDEDThe minimum available balance threshold of the instrument was exceeded by the transaction.

Instrument Management Errors

When an API calls fails due to instrument management errors an error response will be returned, with the http status code reported as 409.

These are error that can be returned during any process that involves instrument management.

The error response is an "ErrorResponseWrapper" object representation similar to the one shown below. Note that the "response.details" property will specify the type of failure.

{
"envelope": {
"statusCode": "LOGICAL_ERROR",
"httpStatusCode": 409,
"apiReference": "616b0389972d4f7a84e8f598a7643e82",
"externalCallReference": null,
"timestamp": 1669117138157
},
"response": {
"details": {
"KEY": "VALUE"
},
"body": {}
}
}

Status Codes - Balanceless

Status CodeHTTP CodeDescription
200OKBalances list retrieved successfully.
200OKBalance created successfully.
200OKBalances details retrieved successfully.
200OKBalance updated successfully.
200OKSuccessfully retrieved cards linked to the Balance.
200OKSuccessfully retrieved card details.
200OKCard updated successfully.
200OKThe card details link was successfully generated.
200OKTransfer was successful.
200OKSuccessfully retrieved transactions.
201CreatedCard was created successfully.
204No ContentBalance was successfully blocked. Blocking of cards linked to this Balance has been initiated.
204No ContentBalance was successfully unblocked. Unblocking of cards linked to this Balance has been initiated.
204No ContentBalance was successfully closed. Closing of cards linked to this Balance has been initiated.
204No ContentThe card was successfully blocked.
204No ContentThe card was successfully unblocked.
204No ContentThe card was successfully closed.
204No ContentThe Card details link was successfully deleted.
400Bad RequestBad Request. Refer to the Validation Error Codes Guide for a list of possible error codes.
401UnauthorizedUnauthorized access, authentication required.
403ForbiddenForbidden, you don’t have permission to access this resource.
404Not FoundResource not found.
409ConflictLogical error. Refer to the relevant Error Codes Guide for details.
500Internal Server ErrorAn internal server error occurred. Retry if retryable=true.

Error Codes and Descriptions for 409 response code:

ErrorDescription
AVAILABLE_BALANCE_MIN_GREATER_THAN_MAXThe provided minimum available balance is greater than the maximum.
CARD_CREATION_LIMIT_REACHEDThe maximum number of card creations has been reached.
CARD_MODEL_NOT_ALLOWEDThe card model is not supported by the provided card type.
CARD_TYPE_UNAVAILABLEThe card type provided is not available.
CLOSURE_END_DATE_BEFORE_START_DATEClosure end date is before the start date.
CREATION_END_DATE_BEFORE_START_DATECreation end date is before the start date.
CURRENCY_NOT_ALLOWEDThe selected currency is not permitted for this operation.
DESTINATION_INSTRUMENT_BLOCKEDDestination instrument is currently blocked.
DESTINATION_INSTRUMENT_NOT_FOUNDDestination instrument was not found.
DESTINATION_INSTRUMENT_TYPE_NOT_ALLOWEDDestination instrument type is not allowed.
DESTINATION_SAME_AS_SOURCESource and destination instruments cannot be the same.
END_DATE_BEFORE_START_DATEEnd date is earlier than start date.
FOREX_NOT_SUPPORTED_FOR_TRANSACTIONForex is not supported for this transaction.
INSTRUMENT_NOT_EMPTYThe instrument is not empty.
INSTRUMENT_STATE_INVALIDInvalid instrument state.
LINK_NOT_FOUND_OR_EXPIREDNo active or valid link found for the card reference.
MAX_DATE_RANGE_31_DAYSDate range exceeds the maximum of 31 days.
NAME_NOT_UNIQUEThe provided name is not unique.
NOT_ENOUGH_FUNDSInsufficient funds for the operation.
RANGE_START_DATE_OLDER_THAN_1_YEARRange start date is older than 1 year.
SOURCE_INSTRUMENT_BLOCKEDSource instrument is currently blocked.
SOURCE_INSTRUMENT_NOT_FOUNDSource instrument was not found.
SOURCE_INSTRUMENT_TYPE_NOT_ALLOWEDSource instrument type is not allowed.
SPEND_LIMIT_NOT_ALLOWEDThe specified spend limit is not supported.
SPEND_LIMITS_NOT_AVAILABLESpend limits are not configured.
TOO_MANY_TRANSACTIONSTransaction count has exceeded the allowed limit.
TRANSFER_AMOUNT_TOO_LARGEThe transfer amount exceeds the allowed limit.
TRANSFER_AMOUNT_TOO_SMALLThe transfer amount is below the allowed minimum.
TRANSFER_CURRENCY_DIFFERENT_FROM_SOURCE_AND_DESTINATIONTransfer currency differs from source or destination currency.
RANGE_START_DATE_OLDER_THAN_1_YEARStart date is older than one year.
CUSTOM_REFERENCE_NOT_UNIQUECustom reference provided is not unique.
UNKNOWN_ERRORAn unknown error occurred. Contact support.