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/ DEEPLINKMerchant ProxyBill24 HostedAuto Direct DebitKHQR Integration Specification for APINotification APIPayment Method
CHECKOUT/ DEEPLINKMerchant ProxyBill24 HostedAuto Direct DebitKHQR Integration Specification for APINotification APIPayment Method
  1. MOBILE SDKS
  • Payment Method API
    • Overview
    • Response Code
    • MOBILE SDKS
      • iOS SDK
      • Android SDK
    • Authorization
      • Authorization
    • Customer
      • Get Customer Details
      • Update Customer
      • Delete Customer
      • Create Customer
    • Get Payment Methods
      • Get Payment Methods
    • Get Wallet Balance
      • Get Wallet Balance
    • Settle Payment
      • Settle Payment
    • Get Bills
      • Get list bills
      • Get single bill
    • Get transaction Details
      • Get Transaction Detail
  • Activate Sub Biller API
    • Overview
    • Response Code
    • Authorization
      POST
    • Onboarding
      POST
    • Get Available Banks
      GET
    • Add Link Account
      POST
    • Verify Linked Bank Account
      POST
    • Sub-Biller Portal
      POST
  1. MOBILE SDKS

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.

How to integrate

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

CocoaPods 1.1.47 or check latest version

Create Podfile and add pod B24PaymentSdk

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

https://b24sdk.s3.ap-southeast-1.amazonaws.com/B24PaymentSdk-1-1-47.zip

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.instantPaymentSdk

Sample Display

Parameter Request:

ParameterTypeDescription
formString*Controller
userSyncCodeString*Unique code created from the customer endpoint (Create Customer)
refererKeyString*Can be any key to identity the client side (Bill24 will provide)
languageStringLanguage setting ("en" for English, "km" for Khmer)
isDarkModeBooleanEnables dark mode (true for dark mode, false for light mode)
isProductionBooleanIndicates environment (true for live, false for testing)
isDisplayCurrencySymbolBooleanDiplay Khmer currency symbol (៛)

Example code:

B24PaymentSDK.instantPaymentSdk(
    form: self,
    userSyncCode:"C0020",// customer need to create first
    refererKey: '3804', 
    language: 'en', // 'en' for English, 'km' for Khmer
    isDarkMode: false, // True for dark mode
    isProduction: false, // False for testing, true for live
    isDisplayCurrencySymbol: false // true for enable khmer currency
   
 );



  • To initiate SDK or load SDK to the wallet detail B24PaymentSdk.instantPaymentSdkDetail

Sample Display

Parameter Request:

ParameterTypeDescription
formString*Controller
customerSyncCodeString*Unique code created from the customer endpoint (Create Customer)
paymentMethodIdString*Wallet id that get from endpoint (Get Wallet balance )
refererKeyString*Can be any key to identity the client side (Bill24 will provide)
languageStringLanguage setting ("en" for English, "km" for Khmer)
isDarkModeBooleanEnables dark mode (true for dark mode, false for light mode)
isProductionBooleanIndicates environment (true for live, false for testing)
isDisplayCurrencySymbolBooleanDiplay Khmer currency symbol (៛)

Example code:

B24PaymentSdk.instantPaymentSdkDetail(
        from: self,
        customerSyncCode:"C0020",
        paymentMethodId: "8d036742-b2f7-447c-8fad-ef2e6ef2a6dc",// Id of wallet 
        refererKey: "3804",
        language: "en",
        isDarkMode: false,
        isProduction: false,
        isDisplayCurrencySymbol: false // true for enable khmer currency
 );



  • To initiate SDK or load SDK shortcut to top up amount B24PaymentSdk.instantPaymentSdkTopUp

Sample Display

ParameterTypeDescription
formString*Controller
paymentMethodIdString*Wallet id that get from endpoint (Get Wallet balance )
refererKeyString*Can be any key to identity the client side (Bill24 will provide)
languageStringLanguage setting ("en" for English, "km" for Khmer)
isDarkModeBooleanEnables dark mode (true for dark mode, false for light mode)
isProductionBooleanIndicates environment (true for live, false for testing)
isDisplayCurrencySymbolBooleanDiplay Khmer currency symbol (៛)

Example code:

B24PaymentSdk.instantPaymentSdkTopUp(
        from: self,
        paymentMethodId: "8d036742-b2f7-447c-8fad-ef2e6ef2a6dc",// Id of wallet 
        refererKey: "3804",
        language: "en",
        isDarkMode: false,
        isProduction: false,
        isDisplayCurrencySymbol: false // true for enable khmer currency)

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 :

  • 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 userSyncCode that you get from endpoint Create Customer.

Modified at 2025-10-21 08:52:11
Previous
Response Code
Next
Android SDK