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 - Flutter SDK | Configure the integration method".
You will need to identify an object from the PaymentSdkConfigurationDetails class, which 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 Flutter SDK | Configuration Options & Parameters solution article.
var configuration = PaymentSdkConfigurationDetails(
profileId: "profile id",
serverKey: "your server key",
clientKey: "your client key",
cartId: "cart id",
merchantName: "merchant name",
locale: PaymentSdkLocale.EN, //PaymentSdkLocale.AR or PaymentSdkLocale.DEFAULT
amount: "0.0", //amount in double
currencyCode: "Currency code",
merchantCountryCode: "AE" //2 chars iso country code
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 PaymentSdkConfigurationDetails please check the table below:
|currencyCode||String (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.|
|Indicates the amount of this transaction the customer is about to be charged.|
|Indicates the cart/order id at the merchant end to easily relate the transaction to|
|Indicates the cart/order description at the merchant end to easily relate the transaction to.|