Errors

HTTP Status Codes

APIs uses HTTPS response status code to indicate the success or failure of your API requests. If your request fails, APIs returns an error using the appropriate status code.

  • 2XX codes indicate success and that the request worked as intended

  • 4XX codes indicate errors due to some mistakes in the request.

  • 5XX codes indicate an error with DSQUARES's servers.

Error Object

When an error occurs and the response code is 4XX, APIs send an Error Object that has two parameters, message, statusCode, statusName.

Example

{
  "message": "Process comlpeted successfully",
  "statusCode": 1,
  "statusName":"Successfully"
}

Error Codes

APIs sends an error code in the body of the response, each code has a corresponding error message that is descriptive of what went wrong, below are the codes along with their description.

ResponseDescription

-1

Action_Can_Not_Executed

-4

Action_Can_Not_Executed_Wallet_Deactivated

0

Success

1

Invalid_WalletCode

2

Invalid_Points

3

Wallet_Not_Found

4

Wallet is inactive

5

Not_Matched_WalletCode

6

Invalid Sku

7

Invalid_Branch

8

Invalid_MSISDN_Or_Code

9

WalletCode_Already_Exist

10

Subscription_Limit_Exceeded

11

SKU_Acc_Limit_Exceeded

12

Invalid_Invoice_Number

13

Child_MSISDN_Already_Parent

14

Invalid_Cash_Back

15

Accumulation_Limit_Exceeded

16

Invalid_Payment_Parameters

17

Invalid_Campaign_Parameters

18

Amount_Exceeded_Total_Balance

19

Points_Exceeded_Max_Points

20

Invalid_Transaction_Id

21

Transaction_Already_Refunded

22

Invalid_Sim_Number

23

Invalid_Merchant

24

Not_Allowed_Mobile_Number

25

InvalidNotificationId

26

Amount_Less_Than_SKU_Amount

27

PinCode_Trials_Exceeded_Limit

28

Pin_Code_Incorrect

29

Voucher_Not_Found

30

Pin_Code_Expired

31

Wallet_Added_On

32

Wallet_Related_Same_Id

33

First_Digit_is_invalid

34

Invalid_SkuPoints_OrPointsValue

35

Insufficient_Points

36

Offer_subscription

37

Accumulation_Refunded_Before

38

Transaction_Id_Required

39

Invalid_Amount

40

Transation_Not_Found

41

Amount_Greater_Original

42

Exceeded_Accumulation_Capping

43

Points_Exceeded_Redemption_Max_Points

44

Offer_Not_Found

45

RedValueFactor_Is_Zero

46

OTP_Expired

47

Transaction_Already_Canceled

48

SMS_Can_Not_Be_Sent

49

Sms_Is_Sent_Before

50

Wallet_Not_Opted_In

51

Not_Eligible_For_Redemption

52

Not_Online_Activated

53

Invalid_Mobile_Number

54

Pin_Code_NotExist

55

Not_Allowed_For_Role

56

Invalid_Wallet_Paramters

57

ContactMsisdn_Already_Exist

58

Wallet_Added

59

Wallet_Activated

60

Parent_Wallet_Not_Exist

61

Parent_Wallet_Has_Parent

62

Number_Of_Child_Wallet_Exceeded

63

Worker_Added_Success

64

Invalid_Parent_WalletCode

65

Parent_WalletCode_Not_Exist

66

WalletCode_Not_Parent

67

Worker_Delete_Success

68

Invalid_Data

69

BlackListTypeErrorMissing

70

Customer_Code_Not_Match

71

User_Balance_Zero

72

Transaction_Id_Already_Exist

73

PointsLog_Already_Exist

74

Missing_Contact_Msisdn

75

Wallet_BlackListed

76

Wallet_Created_WithNoReward

77

Is_Reward_Required

78

Contact_Msisdn_Limit_Exceed

79

No_Merchant_Found

80

Invactive_Merchant

81

Could_Not_Download_File_Sftp

99

Error_Occured

100

Failure

N/A

invalid_clientId

N/A

invalid_grant

N/A

dirty_account

Last updated