Berkeley follows standard HTTP response status codes to indicate success or failure of an API request.
All HTTP response status codes are separated into five classes (or categories). The first digit of the status code defines the class of response. The last two digits do not have any class or categorization role. Berkeley will return codes in the following ranges:
2xx
(Successful): The request was successfully received, understood, and accepted4xx
(Client Error): The request contains bad syntax or cannot be fulfilled5xx
(Server Error): The server failed to fulfill an apparently valid request
In the rare case of an error with Berkeley's system a 500
status code will be returned and the error message will contain an error code of internal_error
.
Generic Errors
There are a few generic error codes that apply to any type of request. The following lists the error codes you may encounter when making an HTTP request into the Berkeley API.
The following table lists all the generic errors codes and messages.
Error Type | HTTP Status | Error Code | Message | Description |
---|---|---|---|---|
Generic | resource_already_exists | Resource already exists | Unable to create the request resource since it already exists | |
Generic | 404 | resource_not_found | Unable to find requested resource | Can not find the requested resource |
Generic | 401 | invalid_credentials_supplied | Invalid credentials supplied | The authorization token is invalid and Berkeley cannot process the request |
Generic | 404 | url_invalid | Url is not valid | Url is invalid |
Generic | 429 | rate_limit | Too many requests where received too quickly | Too may requests where received please wait and try again |
Generic | 400 | invalid_content_type | Invalid Content Type | Incorrect value was sent in Content-Type Headers |
Card Issuing Errors
If a request fails due to a client error it will contain a 400
HTTP status code with the corresponding body following below:
{
"error": {
"message": "Human readable error message, subject to change",
"code": "Error code that can be programmatically checked against"
}
}
Additional fields may be included when described below.
If a request fails with a 5xx
series error the response will contain a tracking code. The example below shows the body of an HTTP 500
(Internal Server) error:
{
"error": {
"code": "internal_server_error",
"message": "Internal Server Error",
"tracking_code": "41519fff-439c-4d3d-ab33-4b74c763d2de"
}
}
When reporting an issue, please return the "tracking_code" field to Berkeley to aid in resolving the issue.
CARD ISSUING - TRANSACTION ERROR CODES
Error Type | Error Code | Description |
---|---|---|
Card Issuing | transitory_failure | The request could be processed but, due to a temporary condition, cannot be processed now. |
Card Issuing | invalid_parameters | One or more parameters of the request are invalid or missing. |
Card Issuing | invalid_status | The operation cannot complete due to the status of an entity. For example, trying to load an account that has been closed. |
Card Issuing | invalid_{entity} | The entity you passed us in the request is invalid. Entity can be replaced by program, value_load, cardholder, etc. |
Value Loads and Unloads | load_limit_exceded | The load amount requested is outside the limits of the program. |
Value Loads and Unloads | load_failed | Our processor failed to process the load. See the message for more detail. |
Value Loads and Unloads | insufficient_funds | There are not enough funds on either the card or the MFA to complete the transaction. |
Value Loads and Unloads | limit_exceded | The load has violated a non-monetary limit set by the program. |
Activate Card | activate_card_failed | The card you attempted to activate could not be activated. This could mean the card was closed, already activated or some other issue. |
Create Cardholder | velocity_check_failed | Velocity check has failed while creating a cardholder. |
Card Issuing | not_supported | The operation is not supported given the current program configuration. For example, a feature specific to Canada will return this if accessed form a USA program. |
Card Issuing | not_supported_by_program | The operation is not supported by the current configuration of the program. The most likely case is that the feature has not been enabled for your program. |
Card Issuing | program_inactive | The program you are trying to modify has been marked as inactive and cannot be changed. |
Card Issuing | list_exausted | The list you are paging through has no more elements. |
CARD ISSUING - KYC RESULTS
KYC Verifications will be rejected or sent for manual approval if the consumer information provided as part of the Create Cardholder
is not correct or does not match the database records of our KYC provider. For a list of test cases, please go to this page
If a request is unsuccessful then it will contain a 400
status code with the corresponding body following below:
{
"code": "kyc_verification_rejected",
"message": "The cardholder was rejected due to KYC verification failure.",
"kyc_result_codes": [
{
"code": "street_mismatch",
"description": "Street does not match records",
"found": "ENGELMANN DR",
"match_type": "partial_match",
"value": "49 ENGLEMANN DR"
},
{
"code": "insufficient_credit_record",
"description": "Insufficient credit history for a match"
}
],
"kyc_transaction_id": "bca156b3-0668-49f7-bdf8-11cc6b628120"
}
KYC RESULT CODES
There are a number of result messages that can be returned when a KYC verification is executed. The full list of KYC result descriptions can be found here.
Field | Type | Is Required | Description |
---|---|---|---|
code | String | Yes | A code indicating a problem found during the KYC check |
description | String | Yes | A human readable description of code |
match_type | String | No | What kind of a match was made (full, partial, etc) |
value | String | No | A reflection of the field value |
found | String | No | The field value found in the credit records |
Result Type | Result Code | Description |
---|---|---|
REJECTED | kyc_verification_rejected | The KYC verification failed. One or more of the verification rules was triggered. Cardholder creation also failed due to this result. |
MANUAL REVIEW | kyc_verification_review | The KYC verification is under review. One or more of the verification rules was triggered. Cardholder creation is pending due to this result. |
Card Issuing - Validation Failures
When a model fails validation, a field_errors
field will be attached to the error message describing why each failing field did not pass validation. An example is below:
{
"error": {
"code": "invalid_object",
"field_errors": [
{
"code": "valid_field",
"message": "Field Failed to pass validation",
"position": [
"test"
],
"value": "Test"
}
],
"message": "Invalid field(s) in Object"
}
}
Possible fields for fields errors are:
Field | Value | Required | Description |
---|---|---|---|
code | String | Yes | The error code for the failure. |
message | String | Yes | Human readable error message. |
position | String | Yes | The location of the field in the request. |
value | any | Yes | The value of the field in the request |
valid_values | any | No | Valid values for this field |
invalid_elements | any | No | Any invalid elements in the request field. |
DirectSend - Tokenization Errors
Tokenization errors may occur due to reasons as explained below. If a request fails and throws an error it will contain a 400
HTTP status code with the corresponding body following below:
{
"error": {
"message": "Human readable error message, subject to change",
"code": "Error code that can be programmatically checked against",
"transaction_id": // With be part of response if this error was part of a transaction request
}
}
TOKENIZATION ERROR CODES
Error Type | Error Code | Message | Description |
---|---|---|---|
Tokenization | invalid_financial_account_details | Financial Account details provided are invalid | Incorrect values provided when creating a token for a financial account |
Tokenization | account_not_verified | The payment card was not verified with the issuer. Do not proceed with the transaction | Card not verified by the issuer |
Tokenization | account_marked_lost_stolen | The payment card has been marked as lost or stolen. Please notify the issuer. Do not proceed with the transaction | "Lost card, pick up (fraud account) or Stolen card, pick up (fraud account)" |
Tokenization | suspected_fraud | The card was not verified. Transaction may be fraudulent | Suspected fraud |
Tokenization | cvv_failure | The card was declined for CVV2 failure | The card failed the CVV security check |
Tokenization | test_cards_only | Only test cards can be used in this environment | The supplied card is not a valid test card |
DirectSend - Account Holder Errors
There are a few error codes related to Account Holders
. The following lists the error codes you may encounter when making an HTTP request into the Berkeley API.
ACCOUNT HOLDER ERROR CODES
The following table lists all the errors codes and messages.
Error Type | Error Code | Message | Description |
---|---|---|---|
Account Holder | invalid_account_holder | Transaction cannot be completed for Account Holder Type | This Transaction Type cannot be processed by the given account holder type |
DirectSend - Financial Account Errors
There are a few error codes related to Financial Accounts
The following lists the error codes you may encounter when making an HTTP request into the Berkeley API.
FINANCIAL ACCOUNT ERROR CODES
The following table lists all the errors codes and messages.
Error Type | Error Code | Message | Description |
---|---|---|---|
Financial Account | invalid_token | Token provided is invalid | Token provided can not be located |
Financial Account | invalid_financial_account_for_account_holder | Financial Account is incorrect type for Account Holder | This financial account can not be attached to the account holder, ex(business card attached to an individual) |
DirectSend - Transaction Errors
Transaction errors may occur due to reasons such as: invalid card information, the inability to process a transction on a payment network, etc.
If a request is unsuccessful then it will contain a 400
or 500
status code with the corresponding body following below:
{
"error": {
"message": "Human readable error message, subject to change",
"code": "Error code that can be programmatically checked against",
"transaction_id": // Will be part of response if this error was part of a transaction request
}
}
TRANSACTION ERROR CODES
The following table lists all the errors codes and messages.
Error Type | Error Code | Message | Description |
---|---|---|---|
Transaction | unsupported_transaction_type | Transaction Type can not be completed for Financial Account | Financial Account Provided can not create Transactions of the request type |
Transaction | invalid_transaction_details | Invalid parameters provided in the transaction payload | Incorrect values provided in the transaction payload |
Transaction | not_sufficient_funds | No sufficient funds to process the transaction | Not sufficient funds to process transaction |
Transaction | duplicate_transaction | Transaction was seen as a duplicate and discarded | Duplicate transaction received due to idempotency key repeat |
Transaction | idempotent_request_still_processing | Original idempotent request is still processing, please try again with same idempotency key | Another request with the same idempotency key and parameters is still being processed and we don't have the result available to return at this point |
Transaction | payment_network_error | Payment Network has failed to process transaction | Payment Network failed to process transaction |
Transaction | transaction_declined | Transaction has been declined: < contains additional details regarding decline > | Transaction was declined by payment network |
Transaction | transaction_already_reversed | Reverseable total exceeded | The full amount of the parent transaction has been reversed already |
Transaction | reverse_time_window_exceed | Time window for reverse transaction has been exceeded | Depending on the Payment Network a Reverse Transaction can only be created within a given time limit after the original Pull transaction |
Transaction | reverse_parent_transaction_invalid | Orignal Pull Transaction can not be reversed | A Reverse Transaction cannot be created for the given Pull Transaction |
Transaction | sibling_transaction_outstanding | A sibling transaction tied to the Parent Pull Transaction is still outstanding and must be processed | A sibling transaction linked by the parent pull transaction is still outstanding |
Transaction | can_not_locate_linked_transaction | Can not find linked transaction | The linked transaction can not be located |
Transaction | transaction_exceeds_limit | Transaction value exceeds limits | Transaction amount exceeds approved limits |
Transaction | subscription_limits_reached | You have reached your subscription limit for this period | You have reached the limits of your subscription plan |
Transaction | no_active_subscription | You don't have an active subscription for this product | You must purchase this product in order to use this api service |
Transaction | invalid_account_status | There's something wrong with the merchant account. Please contact Berkeley | Merchant account has been suspended |
Transaction | invalid_tds_authentication | 3D Secure Authentication provided cannot be used for this transaction | 3DSecure Authentication can no be used for Pull Transcation |
DirectSend - 3D-Secure Errors
There are a few error codes related to 3DSecure Authentications
. The following lists the error codes you may encounter when making an HTTP request into the Berkeley API.
3D-SECURE ERROR CODES
The following table lists all the errors codes and messages.
Error Type | Error Code | Message | Description |
---|---|---|---|
3DSecure Authentication | tds_not_applicable | Financial Account doesn't use the 3DSecure Process | The Financial Account provided doesn't use the 3DSecure Process, for example bank accounts |
3DSecure Authentication | transaction_exceeds_limit | Transaction value exceeds limits | Transaction amount exceeds approved limits |