Most probably this error happened because of failing to authenticate/identify the sent request information from the merchant side to the PayTabs system, it can be via the different integration methods such as eCommerce systems, SDKs, and API endpoints.



How to investigate the reason that caused this error?

You can investigate the reason for such an error from the "API debug log" by navigating to your desired profile > developer menu > Testing > API Debug Logs



From there you can navigate to the request payload (API request body) from icon (i) (view request body) in the API debug logs


Also, from there you can check the header sent within the request header (API headers) from the icon (view headers).


eCommerce Plugins


It's better in this case before even investigating the issue is to check the following

  • Are all the necessary fields have been entered correctly
  •  Are you using the latest plugin version

Reason #1: Mismatch profile credentials

This means the Profile Id does not match with the authentication server/client key or vice versa. To check on this please check the following points:-

  • Match the “profile_id” sent within the request payload from your profile with the icon (i) (view request body) in the API debug logs with the correct one as in your PayTabs's profile.
  • Match the authentication server/client key sent within the request header from your profile with the icon i (view headers) with the correct one as in your PayTabs's profile.  

Reason #2: Wrong provided Region

In some plugins, there's are a region dropdown list in the configuration page that asks the merchant to choose its correct region according to their PayTabs merchant account. So, make sure you are choosing the correct one based on your PayTabs's account.


Reason #3: Old/incompatible plugin version


Sometimes you are already using a very old version that was already designed to be compatible with PayTabs version 1 (PT1). Usually, you will see Merchant email and secret key instead of profile id and server key, which was the old way of authentication, and it’s deprecated and no longer used anymore. 
In this case, you need to upgrade to the latest version using the instructions that exist in the integration methods from the solution articles eCommerce Systems Plugins. For example "How to upgrade PayTabs plugin in WooCommerce to the latest version?" in the "WooCommerce Plugin" solution article.



PT2 API Endpoints


Reason #1: Mismatch profile credentials


This means that the Profile Id does not match with the authentication server/client key or vice versa. To check on this please check the following points:-

  • Match the “profile_id” sent within the request payload from your profile with the icon (i) (view request body) in the API debug logs with the correct one as in your PayTabs's profile.
  • Match the authentication server/client key sent within the request header from your profile with the icon i (view headers) with the correct one as in your PayTabs's profile.

Reason #2: Wrong Subdomain in the used API endpoint

This means the used endpoint URL (subdomain) is wrong, for example, your account is registered on the KSA region, yet your are using the UAE subdomain instead. The regions subdomain are as follows:

Country/Region
Subdomain + Domain
UAE
KSA
Egypt
Oman
Jordan
Global



Mobile SDKs


It's better in this case before even investigating is to check the passed PaymentSDKConfiguration object (with values) along with the SDK version number as well. To make sure of the following:-

  • You have passed all necessary objects and values.
  • You are using the latest SDK version.
You can check the SDKs articles with their versions from the following link "Mobile SDKs".

Reason #1: Mismatch profile credentials


This means that the Profile Id s not matched with the authentication server/client key or vice versa. To check on this please check the following points:-

  • Match the “profile_id” sent within the request payload from your profile with the icon (i) (view request body) in the API debug logs with the correct one as in your PayTabs's profile.
  • Match the authentication server/client key sent within the request header from your profile with the icon i (view headers) with the correct one as in your PayTabs's profile.

Reason #2Invalid currency and country code

This means the currency code used or the country code used is not valid for your profile. For example, you are passing the AED currency code while you do not have any AED currency added to your profile. Or you are passing the country code base as EGY instead of EG.


Country code must be in ISO Alpha 2 format (e.g. EG)

Reason #3: Old/incompatible plugin version

Sometimes you are using a very old version that already had some issues and the newer version of it fixes them. In this case, you need to check if you are using the latest version of the SDK. You can check the SDKs articles with its version from the following link "Mobile SDKs". For example, the latest version for Native IOS SDK is 

pod 'PayTabsSDK', '~> 6.1.7'