In some cases, you may need to switch between your different PayTabs profiles among different regions within the same integration method for your business needs. For example, you have multiple branches in KSA, UAE, and Egypt. Each branch of them of course has its own account and different dashboard domains. In this article, you will learn how to switch the profiles within your same integrated system.


You may need to check our "How to control the payment method on the payment page?" solution article to know more about enabling/disabling payment types in our Hosted Payment Page.



In this article, you will learn how to control that via:


How to access the PayTabs' different dashboard domains via regions?

  • First Option

  1. Navigate to our login page from here.
  2. Choose PT v2 option, then select your dashboard region and click on the "Login" button.




Code Business Flow


For better clarification, let's assume that you need to use different profiles via different regions to enable different payment methods on each profile, in this case, you will need to:

  1. Create a page that has images of the desired payment methods such as (Apple Pay (Visa), STC pay, ValU, etc).
  2. Enable each image to be clickable, to generate our hosted payment page by passing only this particular payment method along with its related profile. 
    So for example, when your client clicks on (e.g. Mada image for example) this will redirect the client to a hosted payment page generated using the profile ID and server key which only Mada terminal is configured in. However, if your client clicks on (e.g. ValU image) the system should redirect the client to the other profile that has only this payment method ValU, and so on. Each image (action) will hold its own profile ID and authentication keys, to create a unique payment page using this particular payment method.


This excludes, the eCommerce plugins, as it can't be done dynamically.



eCommerce Plugins


You can switch between profiles manually, as in plugins only one profile can work at a time. You will just need to seek the "Configure the Plugin" section on the solution article related to the plugin you are using from the "eCommerce Plugins" category section. You can switch the profile ID, Authentication keys, and the endpoint region you are seeking.


Only Shopify Plugin, each endpoint region has a different plugin link to use, which is clarified in our "Shopify Plugin" solution article.



Backend Libraries/Packages


You can switch between them at the same time (works in parrel) dynamically, by changing the configuration attributes on the runtime. These configuration attributes have the profile ID, authentication keys, and the payment API base URI, related to the selected payment method or country according to your business needs. 

For example, you will keep all of your profile configuration information in a global collection. On each payment, you will read/change the configurations to the specified collection item accordingly.

To know where these configurations are and how they are passed, you will need to navigate to the solution article related to your backend Package from the "Backend Packages" category section and seek the "Configuration" article section.


SDK mobile


You can switch between them at the same time (works in parrel) dynamically, by changing the configuration attributes on the runtime. These configuration attributes have the profile ID, authentication keys, country code, and currency code, related to the selected payment method or country according to your business needs. 

For example, you will keep all of your profile configuration information in a global collection. On each payment, you will read/change the configurations to the specified collection item accordingly.

To know where these configurations are and how they are passed, you will just need to navigate the solution article related to the mobile SDK from you are using the "Mobile SDKs" category section, then search for how the "PaymentSDKConfiguration" object is configured and passed in each payment method.


API Endpoints


You can switch between them at the same time (works in parrel) dynamically, by changing the configuration attributes on the runtime. These configuration attributes have the profile ID, and the authorization token/key, related to the selected payment method or country according to your business needs. 

For example, you will keep all of your profile configuration information in a global collection, and on each payment, you will read/change the configurations to the specified collection item accordingly as below:


  1. Change the API endpoint base URI according to your profile region as below:

    RegionAPI Base URI
    Saudi Arabiahttps://secure.paytabs.sa
    United Arab Emirateshttps://secure.paytabs.com
    Egypthttps://secure-egypt.paytabs.com
    Omanhttps://secure-oman.paytabs.com
    Jordanhttps://secure-jordan.paytabs.com
    Iraqhttps://secure-iraq.paytabs.com
    Any other countryhttps://secure-global.paytabs.com

  2. Then the "profile_id" passed in the request payload itself
  3. And finally, changing the "Authorization" parameter with the related server key as well.


To know more about how to use our latest endpoint, check our fully detailed PT2 API Endpoints Documentations.