Document Status | CLOSED |
---|---|
Document Owner(s) | |
Reviewers |
Context
Iberia proposes the inclusion of new error messages in the error detailing flow, following the established processes in stories:
Story: IBFEC-2647
Story: IBFEC-2856
The objective is to enhance error communication between the backend and frontend.
✅ Proposed Solution
To address these issues, we propose the creation of new error classes in the backend that will be sent to the frontend. This implementation will include specific error codes for different scenarios, such as payment cancellations, instead of using generic codes. This change will allow the frontend to display more informative and contextualized error messages, improving clarity and the overall user experience.
Backend
After the solution approval, will need to update the below documents with new classes, code errors, and any important things.
Paycomet errors: https://docs.paycomet.com/en/recursos/codigos-de-error
Iberia errors list: Sheet
Payment code errors: /wiki/spaces/RWLAPPwiki/pages/4858741214
Payment mappers: /wiki/spaces/RWLAPPwiki/pages/5001150489
Description errors
Created classes:
AuthSecurityError
ExternalError
FraudError
PspError
ExternalValidationError
Classes will be created:
InvalidAmountError
AuthenticationError
CardCountryNotAllowed
CardLimitExceededError
DeclinedCardError
CardTypeNotAllowedError
CardholderSecurePurchaseKeyError
ConfirmationDataNotValidError
CouldNotFindPreviousOperationError
DataExternalValidationError
DeclinedCardError
DuplicatedExternalReferenceError
ExpiredCardError
NoFundsCardError
OperationDeniedError
RefundNotPossibleError
ScaAuthenticationError
TimeOutConnectionError
ThreeDsChallengeFailedError
intl-packages
Rename the class:
From: OperationCancelledError
To: OperationCancelledFailedError
Will be created new classes in the path:
intl-packages/packages/psp-base/src/errors/psp-error-2/
Export the classes:
path:
intl-packages/packages/psp-base/src/errors/psp-error-2/index.ts
Will create the new error codes:
path:
intl-packages/packages/psp-base/src/errors/psp-error-2/psp-error-2.ts
Code Errors:
intl-psp-paycomet-service
We will need to map the error code:
path:
intl-psp-paycomet-service/src/errors/paycomet-error-map.ts
Check the possibility of mapping errors where classes have already been created.
e.g.:
Error Messages
Paycomet | Key | Class Error | Description | Modal Title | Modal Message | Modal CTA | Screen |
---|---|---|---|---|---|---|---|
100 |
| ExpiredCardError | Expired Card - | “Expired Card” | “Your card has expired. Please change your payment method in order to complete the transaction.” | “Change Payment Method” | |
105 |
| NoFundsCardError | Insufficient Credit to make charge - Represents an error when the card does not have enough funds in order to perform the payment | “Payment Failed” | “Your payment couldn't be processed due to an issue with your payment method. Please review your payment method or choose a different one to complete your purchase.” | “Change Payment Method” | |
127 |
| DataExternalValidationError | Invalid Parameter - Represents an error when there is an invalid parameter | “Payment Failed" | “Something went wrong with this payment. Please try again later." | "Go Back and Try Again Later” | |
137 |
| DeclinedCardError | Invalid Card - Represents an error when the card declined for various reasons | “Payment Declined” | “You card was declined by the issuer. Please, change your payment method and try again.” | “Change Payment Method” | |
141 |
| InvalidAmountError | Zero or Invalid Quantity - Represents an error when the amount is zero or not valid | “Payment Failed” | “Something went wrong with this payment. Please try again.” | “Go Back and Try Again” | |
143 |
| AuthenticationError | Authentication error - Represents errors related to security and authentication within the payment system. | “Authentication Failed” | “Your payment was declined due to security reasons. Please go back and try again.” | “Go Back and Try Again” | |
195 |
| ScaAuthenticationError | Requires SCA Authentication - Represents an error a Strong Customer Authentication error. SCA (Strong Customer Authentication) is a requirement of the European directive PSD2 (Revised Payment Services Directive) aimed at enhancing the security of online financial transactions | “Payment Declined" | “Your payment has been declined. A multi-factor authentication is required by the issuer of your payment method in order to proceed.” | “Go Back” | |
500 |
| ExternalError2 | Unexpected Error - General, unspecified payment error. | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again Later” | |
506 |
| ConfirmationDataNotValidError | Invalid Confirmation Data - Represents an error when confirmation data is not valid | “Invalid Confirmation Data” | “It seems the system could not validate the data entered. Please go back and try again.” | “Go Back and Try Again” | |
510 |
| RefundNotPossibleError | Return is not possible - Represents an error when the refund is not possible | “Refund is not P ossible” | “Something went wrong with this payment. Please try again.” | “Go Back and Try Again” | |
513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 535, 549 and 549 |
| ExternalError2 | General, unspecified payment error. | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again Later” | |
555 |
| CouldNotFindPreviousOperationError | Represents an error when could not find the previous operation | “Payment Failed” | “Something went wrong with this payment. Please go back and try again.” | “Go Back and Try Again” | |
569 |
| OperationDeniedError | Operation Rejected (Denied by the issuer) - Represents an error when the operation cannot be performed | “Payment Declined” | “Your payment was declined by your card issuer. Please select another payment method in order to proceed.” | "Change Payment Method” | |
1019 |
| TimeOutConnectionError | Request Timed Out - Represents an error when there is a timeout | “Request Timed Out” | “Looks like the server is taking to long to respond, please try again.” | “Go Back and Try Again” | |
1026 |
| DuplicatedExternalReferenceError | Duplicate external reference - Represents an error when there is a duplicated external reference | “Duplicated Payment” | “Duplicate transaction detected. It seems this payment has already been processed. Please check your order history or try again in a moment.” | “Go Back and Try Again” | |
1038 |
| DataExternalValidationError | Incorrect DS_MERCHANT_AMOUNT field - Represents an error when the field DS_MERCHANT_AMOUNT is incorrect | “Payment Failed” | “Something went wrong with this payment. Please go back and try again later.” | “Go Back and Try Again Later” | |
1099 |
| ExternalError2 | Unexpected error (Error when processing the transaction) - General, unspecified payment error | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again Later” | |
1185 |
| CardLimitExceededError | Minimun limit not allowed- Represents an error when the Minimun limit not allowed | “Payment Declined" | “Your payment was declined due to security reasons. Please review your order and try again.” | "Go Back” | |
1186 |
| CardLimitExceededError | Maximum limit per transaction not allowed (Default 1000 Euros) - Represents an error when the card amount/number of transaction limit has been exceeded | “Payment Declined" | “Your payment was declined due to security reasons. Please review your order and try again.” | "Go Back” | |
1194 |
| CardTypeNotAllowedError | Card Brand not allowed - Represents an error when the card type (type/brand/etc.) is not allowed for this transaction | “Payment Failed” | “It seems the card brand you're using is not supported. Please return and select a different payment method to complete your transaction.” | “Change Payment Method” | |
1197 |
| CardCountryNotAllowed | Represents an error when the card / issuing bank country is not allowed for the transaction | “Payment Declined” | “Unfortunately, payments from different country than card issuer are not allowed on this platform. Please use a card issued in the same country or change your payment method.” | “Change Payment Method” | |
1254 |
| CardholderSecurePurchaseKeyError | Attempt to process a secure payment, and the card does not allow it. - Represents an error when there is a commerce with secure cardholder and cardholder without secure purchase key | “Payment Failed” | “The payment couldn’t be processed because your card doesn’t support secure authentication methods. Please go back and try another payment method.” | “Change Payment Method” | |
1326 |
| CardholderSecurePurchaseKeyError | Represents errors generated when a transaction is suspected of being fraudulent. This class extends `ExternalError` to encapsulate fraud-related issues, including abnormal user behavior, suspicious transaction patterns, and other indicators of potential fraud. It is designed to aid in the identification and management of transactions that may pose a risk to the payment system | “Payment Declined” | “Your payment was declined due to security reasons. Please select a new payment method and try again.” | "Change Payment Method” | |
1327 |
| ThreeDsChallengeFailedError | Denied by security reasons - Represents an error when the 3DS Challenge failed | “Payment Declined" | “Your payment was declined due to security reasons. Please select a new payment method and try again.” | "Change Payment Method” | |
1417 |
| DeclinedCardError | PayPal - The instrument presented has been declined. Please select another one. - Represents an error when the card declined for various reasons | “Payment Declined” | “You card was declined by the issuer. Please, change your payment method and try again.” | “Change Payment Method” | |
1425 |
| DeclinedCardError | Paypal - Operation Canceled by the user | “Payment Declined” | “You card was declined by the issuer. Please, change your payment method and try again.” | “Change Payment Method” |
Out-of-scope
It is out of the scope to create the Lokalise key, since the key can be added directly to the Lokalise portal.
For help, there is a list of keys that can be created in the Lokalise portal in the description error table (Lokalise key column).
Potential Challenges
N/A
💰 Cost
Describe any additional cost this solution may imply.
🎛️ Configuration
For this feature work, need to enable this feature flag: enable-rbi-error-2
📈 Metrics
Measure the number of cancellations made by the user.
🗓️ Delivery Plan
Link to the task or list of all the tasks required to deliver the solution, along with its progress.
🧑🚒 QA Plan
N/A
⚠️ Call-outs
Tip: Document here any improvement or discussion regarding the feature
Add Comment