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.
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.
B24PaymentSdk.instantPaymentSdkParameter Request:
| Parameter | Type | Description |
|---|---|---|
form | String* | Controller |
userSyncCode | String* | Unique code created from the customer endpoint (Create Customer) |
refererKey | String* | Can be any key to identity the client side (Bill24 will provide) |
language | String | Language setting ("en" for English, "km" for Khmer) |
isDarkMode | Boolean | Enables dark mode (true for dark mode, false for light mode) |
isProduction | Boolean | Indicates environment (true for live, false for testing) |
isDisplayCurrencySymbol | Boolean | Diplay 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
);
B24PaymentSdk.instantPaymentSdkDetailParameter Request:
| Parameter | Type | Description |
|---|---|---|
form | String* | Controller |
customerSyncCode | String* | Unique code created from the customer endpoint (Create Customer) |
paymentMethodId | String* | Wallet id that get from endpoint (Get Wallet balance ) |
refererKey | String* | Can be any key to identity the client side (Bill24 will provide) |
language | String | Language setting ("en" for English, "km" for Khmer) |
isDarkMode | Boolean | Enables dark mode (true for dark mode, false for light mode) |
isProduction | Boolean | Indicates environment (true for live, false for testing) |
isDisplayCurrencySymbol | Boolean | Diplay 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
);
B24PaymentSdk.instantPaymentSdkTopUp| Parameter | Type | Description |
|---|---|---|
form | String* | Controller |
paymentMethodId | String* | Wallet id that get from endpoint (Get Wallet balance ) |
refererKey | String* | Can be any key to identity the client side (Bill24 will provide) |
language | String | Language setting ("en" for English, "km" for Khmer) |
isDarkMode | Boolean | Enables dark mode (true for dark mode, false for light mode) |
isProduction | Boolean | Indicates environment (true for live, false for testing) |
isDisplayCurrencySymbol | Boolean | Diplay 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 :
UIkit5.0.013.015.0
NOTE
To initiate SDK or load SDK you must provide userSyncCode that you get from endpoint Create Customer.