• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
docs.
France
Spain
Europe (English)
India
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

Error handling

Presentation

Mobile SDK errors are returned through the LyraException object which has the following parameters:

Parameter Description
errorCode It allows you to identify the current error (in [PREFIX]_[CODE] format).
errorMessage Explains the error corresponding to the code.
detailedErrorCode Code of the underlying error causing the exception (or null).
detailedErrorMessage Message of the underlying error (or null).

Le champ detailedError indique la cause précise de l'erreur.

Error types

It is necessary to differentiate errors that occur during development from those that may occur during execution of the SDK.

Development errors

Dans ce cas, le SDK lance une exception de type LyraException, qui doit être capturée par le développeur.

Cela peut se produire dans les cas suivants :

  • Après l'appel à la méthode initialize() :

    • Si le format du paramètre publicKey est incorrect, une exception MOBP_001-INVALID_KEY sera levée.

    • Si le format du paramètre apiServerName est incorrect, une exception MOBP_012-UNKNOWN_API_SERVER_NAME sera levée.

  • Après l'appel à la méthode process() :

  • Si le SDK n'est pas initialisé au préalable, une exception MOBP-002-INITIALIZATION_REQUIRED sera levée.

Runtime errors

En el caso de otros errores, la información se transmite en el objeto LyraException en la función de devolución de callback onError(), como se describe en la guía de integración.

Error codes

An error code is in the form [PREFIX]_[CODE]:

[PREFIX] Defines the application layer where the error occurred.
[CODE] Numeric error code.

There are different prefixes:

PREFIX Description EXAMPLE OF AN ERROR
MOB Mobile SDK error MOB_004
ACQ Error on the acquirer side ACQ_001
AUTH Authentication error. AUTH_149
INT Integration error (on the merchant side) INT_007
PSP Error on the payment gateway side PSP_001

New error codes are added regularly (even if you don't update your SDK and mobile app). Your implementation must therefore take this into account and integrate a generic error handling algorithm.

ACQ, AUTH, INT and PSP errors

These error codes concern communications with the payment servers (to the payment platform, your merchant server, etc.). See Error Codes for details of this error type.

Error handling recommendation

Whatever the case of error, we recommend that you:

  • to always display a message to inform the user that the payment did not take place.
  • to clearly trace theerrorCode, thedetailedErrorCodeet leurs messages associés afin de pouvoir analyser les incidents que vous pouvez rencontrer et les résoudre de manière autonome. En cas d'erreur, vous ne devez JAMAIS considérer que le paiement a été effectué.

MOB errors

These errors occur if an error occurs on the mobile SDK side.

ERROR CODE Definition
MOB_001 Invalid public key
MOB_002 SDK initialization is required before calling process
MOB_003 Invalid formToken
MOB_004 Invalid formToken version
MOB_005 Impossible to communicate with server
MOB_006 Network is not available
MOB_007 Invalid response of Lyra Rest API
MOB_008 Payment refused
MOB_009 Payment cancelled
MOB_010 Server timeout error, check IPN
MOB_011 Unknown API Server Name
MOB_012 Unknown Order Status
MOB_013 Payment cannot be cancelled
MOB_014 Payment by Apple Pay not available
MOB_999 Unexpected error

Error code details

MOB_001

Code MOB_001
DEFINITION Invalid public key

The public key provided when initializing the SDK is incorrect. You may be trying to perform a test transaction with a production key or vice versa. See: Prerequisites

MOB_002

Code MOB_002
DEFINITION SDK initialization is required before calling process

Vous tentez d'appeler la méthode process avant d'avoir appelé la méthode init. Voir : Guide d'intégration Android et Guide d'integration iOS sur l'initialisation du SDK.

MOB_003

Code MOB_003
DEFINITION Invalid formToken

The form ID appears to be incorrect. Make sure you have followed the instructions given in the integration guides. If nothing is likely to cause an error, contact technical support.

MOB_004

Code MOB_004
DEFINITION Invalid formToken version

The form id version is not correct. To ensure you have the correct version, call the SDK's ,getFormTokenVersion, method and pass the results into the ,formTokenVersion, parameter of the SDK. createPayment.

MOB_005

Code MOB_005
DEFINITION Impossible to communicate with server

Contact technical support.

MOB_006

Code MOB_006
DEFINITION Network is not available

The device does not appear to be connected to the Internet. Send a message to the user to make sure they are logged in.

MOB_007

Code MOB_007
DEFINITION Invalid response of Lyra Rest API

Contact technical support.

MOB_008

Code MOB_008
DEFINITION Payment refused

The number of additional attempts is reached and the payment is refused.

MOB_009

Code MOB_009
DEFINITION Payment cancelled

The payment was voluntarily canceled. The buyer has voluntarily left the checkout screen or the Lyra.cancelProcess() has been called.

MOB_010

Code MOB_010
DEFINITION Server timeout error, check IPN

The payment server did not respond within 60 seconds. This may simply be due to a temporal slowdown, so it is strongly recommended to check the IPN notification afterwards and cancel the transaction to maintain consistency.

MOB_011

Code MOB_011
DEFINITION Unknown API Server Name

The value sent in the apiServerName field is not recognized, probably due to a typing error.

MOB_012

Code MOB_012
DEFINITION Unknown Order Status

This error is raised if the payment platform returns a payment status other than RUNNING, PAID, PARTIALLY_PAID or UNPAID.

MOB_013

Code MOB_013
DEFINITION Payment cannot be cancelled

Payment cannot be canceled following a call to Lyra.cancelProcess().

MOB_014

Code MOB_014
DEFINITION Payment by Apple Pay not available

This error is raised following the call to Lyra.cancelProcess() with the option [LyraPaymentOptions.paymentMethodType: LyraPaymentMethods.applePay] and payment via Apple Pay is not is not available.

MOB_999

Code MOB_999
DEFINITION Unexpected error

An unexpected error has occurred. Please contact the support team.

Lorsque vous contactezl'assistance technique, communiquez :

  • Your 8-digit shop number
  • The OS and SDK version
  • Device used (iPhone 6S, PC, iPad Pro, etc.)
  • The OS version
  • Error date and time
  • theerrorCodeanddetailedErrorCodethat you encounter if this is the case

This information makes it easier to analyze and understand your problem.

Jobs
Legal
GDPR
25.18-1.11