Skip to main content

Step 2 - Configure the integration method

PayTabs provides you with the backend packages that make the integrating with PayTabs payment gateway very easy by providing ready-made classes that handle the payment process.

After you have set up our Node.js 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. Kindly check the below steps that will walk you through how to configure the package:

Configure the integration

  • Open your Node.js project directory.


  • You will have to require the package and set the main configurations as shown below in your module:


    const paytabs = require('paytabs_pt2');

    let profileID = "8***4",
    serverKey = "SJJNZ****D-J2J****ML6-99******DZ",
    region = "SAR";

    paytabs.setConfig( profileID, serverKey, region);



Integration keys and details

ProfileID

NameprofileID
Type

INT

DescriptionThe merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT2 Dashboard? solution article. To know more about this parameter please click here.
DescriptionAccept only valid profile number.
Default

-

Required

Example
let profileID = 8####;

paytabs.setConfig( profileID, serverKey, region);


ServerKey

NameserverKey
Type

STRING

Description 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..
DescriptionAccept only a valid server key that is associated with the profile ID.
Default

-

Required

Example
let serverKey = "SJJNZ****D-J2J****ML6-99******DZ",

paytabs.setConfig( profileID, serverKey, region);


Region

Nameregion
Type

STRING

DescriptionIndicates 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.
Description
  • Must be in ISO alpha-2 format.
  • Accept only one value from the below:
    Region Code Value
    Saudi Arabia
    SAU
    United Arab Emirates
    ARE
    Egypt
    EGY
    Oman
    OMN
    Jordan
    JOR
    Kuwait
    KWT
    Global
    GLOBAL
Default

-

Required

Example
let region = "SAU",

paytabs.setConfig( profileID, serverKey, region);

We are glad to be always in help. We aim to serve you better each time. As such, please spare a minute to share feedback about your recent experience with PayTabs Developers , on Trustpilot, or Google Reviews.