PayTabs Payment Gateway Integration in Swift

Updated 20 January 2018


Hi guys , today we will learn about how to implement PayTabs payment gateway in iOS application.

You can read their integration guide

Before starting to code first we need to know what a payment gateway is

payment gateway is a merchant service provided by an e-commerce application service provider that authorises credit card or direct payments processing for e-businesses, online retailers, bricks and clicks, or traditional brick and mortar.

Thus , its enough for us now. Lets start by following the instructions below.

  1. Download the PayTabs iOS SDK
  2. Copy or drag drop all the content inside Demo Merchants folder into your project.
  3. Create bridging header or XCode will automatically create it for you when you drag drop content inside Demo Merchants/headerfiles.
  4. Inside the bridging header.h file paste #import “PayTabCardReaderViewController.h”.
  5. Now into you Payment ViewController create an object of PayTabCardReaderViewController like this.

6. Now paste this code inside your payment class

7. Call the function callPaytabPaymentGateway()  into the action of your payment button.

8. After the successful or unsuccessful transaction PayTabs stores the transaction id and response code into your UserDefaults. To check the                         payment status call checkPaymentStatus() function into your payment ViewController’s viewWillAppear function.

9. Finally You have successfully implemented the PayTabs Payment Gateway in your iOS application.


  1. PayTabs SDK does’t support XCode simulator.
  2. You need to disable bitcode from build settings of your project target .





. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Akash
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home