Configuration Options & Parameters
This article is dedicated to walking you through how to manage the React Native SDK configuration options.
You will get to know each parameter type and its usage of it so that you can easily configure the SDK to suit your business needs.
PaymentSdkConfigurationDetailsβ
The PaymentSdkConfigurationDetails class can be instantiated using the PaymentSdkConfigBuilder, which follows the builder design pattern to facilitate structured and customizable configuration setup.
Sample Code:β
- Required configuration methods
- All including the optional methods
var configuration = PaymentSdkConfigurationDetails(
profileId: profileId,
serverKey: serverKey,
clientKey: clientKey,
cartId: cartId,
cartDescription: cartDescription,
amount: amount,
currencyCode: currencyCode,
merchantCountryCode: merchantCountryCode
);
var configuration = PaymentSdkConfigurationDetails(
profileId: profileId,
serverKey: serverKey,
clientKey: clientKey,
cartId: "cartId,
cartDescription: cartDescription,
merchantName: "My Store",
screentTitle: "Pay Now",
amount: 100.0,
currencyCode: "SAR",
merchantCountryCode: "SA",
transactionType: PaymentSdkTransactionType.SALE,
transactionClass: PaymentSdkTransactionClass.ECOM,
billingDetails: billingDetails,
shippingDetails: shippingDetails,
showBillingInfo: true,
showShippingInfo: true,
forceShippingInfo: false,
locale: PaymentSdkLocale.EN,
);
Methods used via this object:β
- startCardPayment
- start3DSecureTokenizedCardPayment
- startTokenizedCardPayment
- startSamsungPayment
- startAlternativePaymentMethods
Properties:β
- Required Properties
- Optional Properties
| Parameter | Data Type | Required | ||
|---|---|---|---|---|
profileIDβ | INT | Accept only valid profile number. | β | |
| The merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT Dashboard? solution article.. | ||||
| ||||
serverKeyβ | STRING | Accepts only a valid Server Key of your profile | β | |
| This a unique identifiers, used to authenticate your integration. | ||||
| ||||
clientKeyβ | STRING | Accepts only a valid client Key of your profile | β | |
| This a unique identifiers, used to authenticate your integration. | ||||
| ||||
amountβ | DOUBLE | Min: 0.01 | Max: 9999999999.99 | β |
| Indicates the amount of the transaction the customer is about to be charged. Both min and max values are subjected to the merchant transaction limits. | ||||
| ||||
billingDetailsβ | OBJECT | β | ||
| Indicates the customer details for this payment. If provided, the payment page will be prefilled with the provided data. To know more about this parameter please click here. | ||||
| ||||
| Nested Parameter | Data Type | Min | Max | Required |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | 2 | 2 | β |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
shippingDetailsβ | OBJECT | β | ||
| Indicates the customer shipping details for this payment. If provided, the payment page will be prefilled with the provided data.. | ||||
| ||||
| Nested Parameter | Data Type | Min | Max | Required |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | N/A | N/A | β |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| STRING | 2 | 2 | β |
| STRING | 3 | 128 | β |
| STRING | N/A | N/A | β |
| Parameter | Data Type | Required | ||
|---|---|---|---|---|
screenTitleβ | STRING | β | ||
| The title that'll be shown on the payment form screen under the logo. | ||||
merchantNameβ | STRING | β | ||
| The name of the merchant will be shown to the customer on the SamsungPay wallet screen. | ||||
hideCardScannerβ | Boolean | β | ||
| Indicates whether to show the camera card scanner button from the payment form screen or not. | ||||
isDigitalProductβ | Boolean | β | ||
| Implementing this option will enable you to initiate payments targeted to be paid using the supported types of credit cards such as Visa, MasterCard, Amex, etc. using only the customer name and email in case your products/services are not physical and don't need to be shipped to the customers. Note that the digital product mode is not universally compatible with all processors. Therefore, it is advisable to seek guidance from your Relationship Manager (RM) to determine if it is suitable for your specific processor. | ||||
showBillingInfoβ | BOOLEAN | β | ||
| Indicates whether to hide billing information or not from the payment form screen. Noting that the customer details are still required and must be passed, in case any of the details are missing or passed with invalid values; the request will fail and the SDK will throw an exception. | ||||
cardApprovalβ | PaymentSdkCardApproval | β | ||
| Allow you to collects approval of the customer card details via an API, before proceed with payment process. | ||||
| ||||
| Nested Parameter | Data Type | Min | Max | Required |
| String | N/A | N/A | β |
| Provide a list of card prefixes strings (usually first 4, can be up to first 10 prefixes digits) that will be used to determine if the discount should be applied to the transaction.). | ||||
| INTEGER | 0.01 | 9999999999.99 | β |
The actual discount should be deducted from the amount, could be a value or percentage according to the isPercentage value | ||||
| Boolean | N/A | N/A | β |
| Description of the discount that will be displayed for the customer on the hosted payment page. | ||||
showShippingInfoβ | BOOLEAN | β | ||
| Indicates whether to show the shipping information or not from the payment form screen. | ||||
tokeniseTypeβ | TokeniseType | β | ||
| The tokenization format the generated token should follow. | ||||
tokenFormatβ | TokenFormat | β | ||
| This indicates the type of tokenization used. | ||||
alternativePaymentMethodsβ | AlternativePaymentMethod | β | ||
| Used to add another payment method in the payment form screen (such as Aman, StcPay, OmanNet, .. etc) or not. For more information please check the related section on this from here. | ||||
tokenβ | STRING | β | ||
| The customer's saved card token which has to be passed within the transaction. This field is required for creating tokenized (recurring) transactions. | ||||
samsungTokenβ | STRING | β | ||
Pass Samsung Pay token to the configuration and call startSamsungPayPayment method to start the payment process. | ||||
transactionReferenceβ | STRING | β | ||
| Indicates the Transaction Reference on the PayTabs side check details on [Response Parameters | tran_ref] | ||||
| ||||