PayTabs Node.js Package makes integration with the PayTabs payment gateway very easy by providing a ready-made payment class that handles the card entry, and billing & shipping information and completes the missing details.




After you have setup our package successfully, as clarified in the last step (Step 1 - Node.js Package | Setup and activate the integration method), you can now manage your integration configuration to start using our package easily in any further steps. Kindly check the steps that will walk you through how to configure the package:


  1. Open your Node.js project directory. 
  2. Then, you will need to create the payment handler script.
  3. You will have to require the package and set the main configurations as shown below:

    const paytabs = require('paytabs_pt2');
    
    let
        profileID = "8***4",
        serverKey = "SJJNZ****D-J2J****ML6-99******DZ",
        region = "EGY";
    
    paytabs.setConfig( profileID, serverKey, region);



    Profile ID


    The Parameter Tag/NameprofileID
    Data TypeSTRING  
    Purpose
    Indicates the profile of the merchant associated to this call. To know how to get yours from your PayTabs dashboard please check our How to get your account information from PT2 Dashboard?  solution article.
    Validation Rules
    Accept only valid profile number
    Required




    Server Key


    The Parameter Tag/NameserverKey
    Data TypeSTRING  
    Purpose
    The merchant profile's server key which used for authentication purposes. You can get it from your dashboard. To know more about how, please check our How to get my Authentication/Integration/API Keys? solution article.
    Validation Rules
    Accept only valid server key
    Required




    Region 


    The Parameter Tag/Nameregion
    Data TypeSTRING  
    Purpose
    Indicates the merchant account's country. It must be related to the profile used in the integration. Please check our What is my (Region)/(endpoint URL)? solution article.
     Validation Rules
    - Must be in ISO alpha-2 format.
    - Accept only one value from the below:
    ARE => United Arab Emirates
    
    SAU => Saudi Arabia
    
    OMN => Oman 
    
    JOR => Jordan
    
    EGY => Egypt
    
    GLOBAL => Global

    Required





⌂ To get familiar with the whole process and the other steps, kindly navigate to our "The Node.js Packge Integration Manual" solution article. 

And to get familiar with the rest of the steps regarding the previous step "Step 1 - Setup and activate the integration method" click here

 And to navigate to the next step in the integration process "Step 2 - Configure the integration method" kindly click here.