Errors

Lean uses conventional HTTP response codes with requests to help you identify errors and how to rectify them. We also provide a status and message within the body of an error response to indicate how to resolve the error that has occurred.

In general: codes in the 2XX range indicate success, codes in the 4XX range indicate a bad request and codes in the 5XX range indicate something went wrong on our end.

javascript

HTTP CODE: 400
{
results_id: "139820938109823",
status: "MISSING_PARAMETERS",
message: "The request does not have all the required parameters to complete the call.",
payload: null
meta: {
...meta_data
}
timestamp: "2020-08-08T00:00:00Z"
}

Platform Errors

statusCodeDescription
AMOUNT_OVER_MAX_VALUE400The amount specified for the payment intent is greater than the maximum amount allowed for the currency. Use a lower amount and try again. The maximum amount allowed for AED is 40,000 and for USD is 10,850.
AMOUNT_UNDER_MIN_VALUE400The amount specified for the payment intent is lower than the minimum amount allowed for the currency. Use a higher amount and try again. The minimum amount allowed for AED is 10 and for USD is 3
CERTIFICATE_TOKEN_MISMATCH401The mTLS certificate used for the API call is a valid certificate issued by Lean but does not match the certificate that is assigned to the application token you have provided in the header.
CUSTOMER_ALREADY_EXISTS409A Lean customer object already exists for the app_user_id you have provided.
INCORRECT_ACCESS_LEVEL403You are making a call to a service that you do not have the correct access permission levels for.
INSUFFICIENT_ACCESS_LEVEL403You are making a call to the production endpoint whereas your application only has access to the sandbox environment. Make the same API call with sandbox.leantech.me/foo instead of api.leantech.me/foo.
INTERNAL_SERVER_ERROR500This one's on us. Something has gone wrong in our system and you should let us know.
INVALID_AMOUNT400The amount specified for the payment intent is incorrectly formatted. Make sure the amount is formatted correctly and has the appropriate number of decimals for the currency specified.
INVALID_CERTIFICATE403The provided certificate is not valid.
INVALID_HTTP_METHOD405The HTTP method used for the API call is incorrect but the URL is correct. You've likely used a GET instead of a POST or vice versa.
INVALID_IBAN400The IBAN specified for the Payment Destination is invalid. It may be incorrectly formatted or our system detected that the IBAN is invalid. You can check if an IBAN is valid using https://www.iban.com/iban-checker.
INVALID_NAME400The name specified for the Payment Destination is invalid. You must enter the full name of the person or entity. The name string must be at least two words.
INVALID_PARAMETERS400One or more parameters specified in the request body were invalid. This could be an unrecognized or misspelled key or an ill formatted value. We are always trying to be more specific with which parameter was invalid so you should contact us and tell us when you see this error so we can make a specific INVALID_[PARAMETERNAME] error for it.
INVALID_URL404The URL specified for this request is invalid. Double check the spelling and whether you used the plural or singular of a noun.
MISSING_PARAMETERS400A parameter required for this request was not specified.
RATE_LIMIT_EXCEEDED429Too many of the exact same request hit our API too quickly. We recommend an exponential backoff when retrying requests.
UNKNOWN_ACCOUNT404The account you specified in the request body cannot be found for the entity you specified. Use the Get Accounts endpoint to ensure that the account_id specified in the request matches one of the accounts for the entity.
UNKNOWN_APP_TOKEN401The app_token specified in the header of the request is not recognized. You can check your app token in the Authentication page of your application dashboard.
UNKNOWN_APP_USER404The app_user you are trying to retrieve the customer object for cannot be found in our system. Ensure that the app_user_id provided as a query parameter is formatted correctly.
UNKNOWN_CUSTOMER404The customer specified in your request does not exist.
UNKNOWN_ENTITY404The entity specified in your request does not exist or, when applicable does not belong to the customer also specified in the query parameter.
UNKNOWN_PAYMENT_DESTINATION404The payment_destination specified in your request does not exist.
UNKNOWN_PAYMENT_INTENT404The payment_intent specified in your request does not exist.
UNKNOWN_PAYMENT_SOURCE404The payment_source specified in your request does not exist or, when applicable does not belong to the customer also specified in the query parameters.
UNKNOWN_RESULTS_ID404The results_id specified in your query parameters does not exist.
USER_PERMISSIONS_NOT_GRANTED403Your customer has not granted you permission to access the data you are requesting. You define the permissions asked for in the Link() flow in the SDK and you can query which permissions you asked for by using the Get Entity request.

LinkSDK Statuses

StatusReason
OKSuccessful connection
ACTIVESuccessful connection
ACCEPTED_BY_BANKSuccessful payment
PENDING_WITH_BANKPayment is pending with the bank
FAILEDGeneric failure
UNKNOWNGeneric failure
REJECTED_BY_BANKBank rejected the operation
MFA_ATTEMPTS_EXHAUSTEDUser has attempted too many MFAs
INVALID_CREDENTIALSUser entered incorrect credentials
CREDENTIALS_UPDATE_REQUIREDUser has updated their username / password
MFA_REQUIREDUser needs to enter an OTP
INVALID_MFAUser entered an incorrect OTP
REQUIRES_LOGIN_MFAUser needs to enter an OTP
AWAITING_LOGIN_MFA_TOKENUser needs to enter an OTP
INVALID_LOGIN_MFAUser entered an invalid OTP
AWAITING_PAYMENT_MFA_TOKENUser needs to enter an OTP
INVALID_PAYMENT_MFAUser entered an invalid OTP
REQUIRES_BENEFICIARY_MFAUser needs to enter an OTP
INVALID_BENEFICIARY_MFAUser entered an incorrect OTP
REQUIRES_MFAUser needs to enter an OTP
AWAITING_APP_AUTHUser needs to confirm the transaction in a third party app
PENDING_BENEFICIARY_COOL_OFFUser's payment source is in a cool off state
AWAITING_END_USER_AUTHORIZATIONUser needs to approve the transaction
REQUIRES_LOGIN_SECURITY_QUESTIONSUser needs to enter security question(s)
INVALID_LOGIN_SECURITY_QUESTION_ANSWERUser entered incorrect security question answer(s)
REQUIRES_BENEFICIARY_SECURITY_QUESTIONSUser needs to enter security question(s)
INVALID_BENEFICIARY_SECURITY_QUESTION_ANSWERUser entered incorrect security question answer(s)
SECURITY_QUESTION_ATTEMPTS_EXHAUSTEDUser has exhausted security question answer attempts
SECURITY_QUESTION_ANSWER_REQUIREDUser needs to enter security question(s)
INVALID_SECURITY_QUESTION_ANSWERUser entered incorrect security question answer(s)
AWAITING_PAYMENT_SECURITY_QUESTIONSUser needs to enter security question(s)
INVALID_PAYMENT_SECURITY_ANSWERSUser entered incorrect security question answer(s)
SECURITY_QUESTION_ANSWER_ATTEMPTS_EXHAUSTEDUser has exhausted security question answer attempts
PAYMENT_SOURCE_ACCOUNT_BALANCESUser requested account balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_OKUser recieved account balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_REQUIRES_MFAUser prompted for OTP to view latest balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_INVALID_MFAUser entered incorrect MFA to view latest balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_REQUIRES_SECURITY_QUESTION_ANSWERUser prompted for security questions to view balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_INVALID_SECURITY_QUESTION_ANSWERUser entered incorrect details for a security question
PAYMENT_SOURCE_ACCOUNT_BALANCES_FAILEDLean was unable to update a user's account balances
PAYMENT_SOURCE_ACCOUNT_BALANCES_CREDENTIALS_UPDATE_REQUIREDUser needs to update credentials
PAYMENT_SOURCE_ACCOUNT_BALANCES_INVALID_CREDENTIALSUser entered incorrect credentials
PAYMENT_SOURCE_ACCOUNT_BALANCES_EXHAUSTED_SECURITY_QUESTION_ATTEMPTSUser exhausted security question answer attempts
PAYMENT_SOURCE_ACCOUNT_BALANCES_EXHAUSTED_MFA_ATTEMPTSUser exhausted OTP entry attempts