
# Error Codes

Some errors include an error code that can be used to identify their cause and write application logic to handle them appropriately. Below, you can find a list of all the error codes that can be returned by the API, alongside a description of the situation that caused them.

| Code                                     | Description                                                                                                |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `deviceImeiAlreadyExists`                | The IMEI provided is already assigned to another device.                                                   |
| `deviceSimAlreadyUsed`                   | The SIM provided is already used on another device.                                                        |
| `memberAlreadyExists`                    | A member with the same email address already exists                                                        |
| `orderExpired`                           | The order has expired and can not be confirmed anymore.                                                    |
| `paymentCardCvcInvalid`                  | The CVC number is incorrect.                                                                               |
| `paymentCardDeclined`                    | The card has been declined.                                                                                |
| `paymentCardExpired`                     | The card has expired.                                                                                      |
| `paymentCardInsufficientFunds`           | The card has insufficient funds.                                                                           |
| `paymentCardNotSupported`                | The card does not support this type of purchase.                                                           |
| `paymentCardNumberInvalid`               | The card number is incorrect.                                                                              |
| `paymentFailed`                          | An error occurred while processing the payment. Try again later or with a different payment method.        |
| `paymentMethodAccountInvalid`            | The payment method account is invalid.                                                                     |
| `paymentMethodDeclined`                  | An error occurred while processing the payment method. Try again later or with a different payment method. |
| `paymentMethodRequired`                  | A valid payment method must be provided to continue with the payment.                                      |
| `paymentRefundAmountExceeded`            | Refund amount can not exceed payment amount.                                                               |
| `portingAccountPinForCancelOnlyBehaviorInvalid` | For cancelOnly behavior, porting account pin must start with 6 digits followed by 3 letters (e.g. 123456ABC). |
| `portingAccountPinForPortInBehaviorInvalid` | For portIn behavior, porting account pin must start with 3 letters followed by 6 digits (e.g. ABC123456). |
| `portingAlreadyCanceled` | Porting is already canceled. |
| `portingAlreadyExists`                   | There is already an open porting request for this phone number (for a different subscription).                                                                      |
| `portingAttributeUpdateNotSupported` | Some of the attributes are not updatable for the porting. |
| `portingCancellationBehaviorNotSupported` | Subscription provider does not support cancelling previous service. |
| `portingConflictsWithPortOut`            | Porting in is not supported when a port out is in progress.                                                |
| `portingDonorProviderNotFound` | Donor service provider could not be found. |
| `portingNotCancelable` | Porting cannot be canceled as it is either in progress, already completed or not scheduled for future. |
| `portingNotDeletable` | Porting cannot be deleted as it is not in draft state. |
| `portingNotSupported`                    | The phone number can't be ported to the provider.                                                          |
| `portingNotUpdatable` | Porting cannot be updated as it is either in progress or already completed. |
| `portingPerUserLimitExceeded` | User already has maximum allowed draft portings. |
| `portingPhoneNumberBlocked` | The phone number is blocked for porting. |
| `portingProviderNotFound` | Subscription provider could not be found. |
| `portingScheduleNotSupported` | Subscription provider does not support scheduled portings. |
| `portingScheduledOnInvalid` | Porting cannot be scheduled in the past. |
| `portingUserAddressRequired` | User address must be set for porting to the subscription provider. |
| `portingProviderMismatch`                | Provider of subscription and recipient provider of porting don't match.                                    |
| `portOutAlreadyExists`                   | There is already an open port out for this subscription.                                                 |
| `portOutConflictsWithPorting`            | Porting out is not supported when a porting is in progress.                                                |
| `serviceUnavailable`                     | Service is currently unavailable and we've been automatically notified.                                    |
| `simAlreadyUsed`                         | SIM already in use with an existing subscription.                                                          |
| `subscriptionPortingAlreadyCompleted`    | Subscription already has a completed porting.                                                              |
| `subscriptionPortingAlreadyOpen`         | Subscription has an open porting.                                                                    |
| `unknown`                                | An unexpected error has occurred and we've been automatically notified.                                    |
| `userAddressAlreadyExists`               | Address already exists.                                                                                    |
| `userAddressInvalid`                     | The given address is not valid.                                                                            |
| `userAlreadyExists`                      | A user with the same email address already exists.                                                         |
| `voucherCodeExpired`                     | Voucher code has expired.                                                                                  |
| `voucherCodeInvalid`                     | Voucher code is invalid.                                                                                   |
| `voucherCodeNotFound`                    | The voucher code could not be found.                                                                       |
| `voucherNotFound`                        | The voucher could not be found.                                                                            |
