APIs for Businesses
Home
APIs
  • Checkout/ Deeplink
  • Merchant Proxy
  • Bill24 Hosted
  • Auto Direct Debit
  • KHQR Integration Specification for API
  • Notification API
  • On Boarding Sub Biller API
Home
APIs
  • Checkout/ Deeplink
  • Merchant Proxy
  • Bill24 Hosted
  • Auto Direct Debit
  • KHQR Integration Specification for API
  • Notification API
  • On Boarding Sub Biller API
CHECKOUT/ DEEPLINK
Merchant ProxyBill24 HostedAuto Direct DebitKHQR Integration Specification for APINotification APIPayment Method
CHECKOUT/ DEEPLINK
Merchant ProxyBill24 HostedAuto Direct DebitKHQR Integration Specification for APINotification APIPayment Method
  1. MOBILE SDKS
  • CHECKOUT/ DEEPLINK
    • Overview
    • Webhook
    • Full Example
    • FAQ
    • Flutter SDK
    • MOBILE SDKS
      • iOS SDK
      • Android SDK
    • WEB SDKS
      • Web SDK
    • Authorization
      POST
    • Transaction Initiation
      POST
    • Transaction Verification
      POST
    • Webhook
      POST
  1. MOBILE SDKS

iOS SDK

iOS SDK

Build payments into your iOS mobile app with Swift.

The Bill24 iOS SDK with Swift helps you build customizable payments into your app. We provide powerful and customizable UI screens and allow your customer to make payment Easier and Faster.

 

1 How to integrate

Frist, you can get Bill24 package SDK from cocoapods, please check the latest version.

CocoaPods 1.13.0 or later
Create Podfile and add pod B24PaymentSdk check latest version

use_frameworks!
target 'MyApp' do
pod 'B24PaymentSdk',
:http => 'https://b24sdk.s3.ap-southeast-1.amazonaws.com/B24PaymentSdk-1-0-37.zip'
end

 
Run this command for install pod:

pod install

And you can import the package:

import UIKit
import B24PaymentSdk

 
Now you can access our function to initiate SDK.

To initiate SDK or load SDK you must use this class name B24PaymentSdk().intSdk

Example code:

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        }
     @IBAction func onClickCheckoutButton(_ sender: Any) {
       B24PaymentSdk().initSdk(
       controller: self,
       transactionId: "19F84F284841",
       refererKey: "123X",
       //'km' is Khmer, 'en' is English
       language: "km",
       darkMode: false,
       //'true' is production
       isProduction: false
       )
      }
  }

 
Grant Permission:
Add permission to save image in photos inside Info.plist

<key>Privacy - Photo Library Additions Usage Description</key>
<string>App needs access to the photo library for saving images.</string>

 
Requirement:

Require UIkit , Swift version 5.0.0
IOS minimum version 13.0
Xcode version 15.0

 

NOTE

To initiate SDK or load SDK you must provide tranId that you get from endpoint Transaction Initiation.

Modified at 2024-07-12 01:42:56
Previous
Flutter SDK
Next
Android SDK