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


This article is dedicated to walking you through how to initiate the payment/request payload using the configuration options and parameters that have already been clarified in the previous step, "Step 2 - Native IOS SDK | Configure the integration method".


You will need to identify an object from the PaymentSdkConfigBuilder classwhich you will pass your credentials and payment details through, as shown below. To know more about what is the exact values that should be passed here, please check our 2.1.1 Native Android SDK | Configuration Options & Parameters solution article.


val configData = PaymentSdkConfigBuilder( profileId,
                                     serverKey, 
                                     clientKey, 
                                     amount ?: 0.0, 
                                     currency) 
        .setLanguageCode(locale) 
        .setMerchantCountryCode("AE") // ISO alpha 2 
        .setScreenTitle(screenTitle) 
        .build();


You will have to pass a valid profile id along with the corresponding integration keys with ONLY the type of "Mobile SDK". To know more about the usage of every parameter in the PaymentSdkConfigBuilder please check the table below:


PropertyData TypeRequiredUsage
profileIdNumeric StringThe merchant Profile ID, which you can get from your PayTavs dashboard. For more information, please check our How to get your account information from PT2 Dashboard? solution article.
serverKeyStringThe 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.
clientKeyString

The merchant profile's client 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.
setMerchantCountryCode()String (ISO Alpha-2 Format

Indicates the merchant's PayTabs account region which he is operating from. For more information, please check our How to get your account information from PT2 Dashboard? solution article.
currencyString (ISO Alpha-3 Format)

Indicates the transaction currency, which the customer will be charged with. Noting that this currency must be configured first on your PayTabs account to accept payment with.
amountFloat Number



Indicates the amount of this transaction the customer is about to be charged.
 








⌂ To get familiar with the whole process and the other steps, kindly navigate to our "The Native Android SDK Integration Manual" solution article. 

 And to navigate to the previous step in the integration process "Step 1 - Setup and activate the integration method" kindly click here.

 And to get familiar with the rest of the steps regarding the current step "Step 2 - Configure the integration method" click here.

⇨ Or you can navigate to the next step in the integration process "Step 3 - Initiating the payment" kindly click here.