flizpay/flizpay-ios
Welcome to the FLIZpay iOS SDK! Easily integrate secure, seamless, and user-friendly payments directly into your iOS app.
π Overview
The FLIZpay SDK simplifies accepting payments by managing the entire payment flow via an integrated webview, securely and intuitively within your app.
Get started with our π integration guide
π¦ Requirements
The FLIZpay iOS SDK requires Xcode 15 or later and is compatible with apps targeting iOS 13 or above.
π» Installation
Swift Package Manager
Add the following to your Package.swift dependencies:
dependencies: [
.package(url: "https://github.com/Flizpay/flizpay-ios.git", from: "0.2.2")
]Clone https://github.com/Flizpay/ios-demo
Then clone https://github.com/Flizpay/ios-demo and open it with XCode. Ask to be added to the Apple developer "FlizPay GmbH Team" (and set the team in XCode) Make sure to build the project for a simulator, not for MacOS or TVOs
Update URLs to point to your local environment (development only)
For local development, update the URLs in Sources/FlizpaySDK/Constants.swift to point to your Tailscale environment. Do not commit these changes to the repository.
Check that the buisness has needed fields in mongoDB
For the Webview to work, the business item in mongoDB must have this value: integrationType: "App SDK" Otherwise, you will see this error: 'Business is not an SDK integration'
CocoaPods
Add the following to your Podfile:
pod 'FlizpaySDK', '~> 0.2.2'Then run:
pod installβ‘οΈ Quick Start
After installing the SDK, register your app callback URL scheme and initiate payments by:
- authorizing your transaction with the
API_KEYin your backend to obtain a token - using it to load the FLIZPay environment in your application
import FlizpaySDK
FlizpaySDK.initiatePayment(
from: currentViewController,
token: token,
amount: userAmount,
metadata: metadataInfo,
urlScheme: "myapp://flizpay-return"
) { error in
// Handle any error returned from the SDK.
print("Payment failed: \(error)")
}Make sure the scheme part of urlScheme is declared in your app's Info.plist under CFBundleURLTypes.
Parameters
from(UIViewController, required): The Presenting View Controller where the webview is going to be attachedtoken(String, required): JWT authentication token obtained from your backend (Check our docs on how to authenticate).amount(String, required): The payment amount.metadata([String: JSONValue], optional): The metadata infourlScheme(String, required): The app callback URL used to return the user to your app after redirect-based bank authorization.@closure onFailure(Function, optional): Block that receives an error param to be called when the webview can't be opened
Redirect-based Bank Flows
For redirect-based banks such as Revolut or ING, the SDK forwards urlScheme to FLIZpay payer-web so the user can return to your app after authorization in the bank app.
π Detailed Integration Guide
For comprehensive integration details, API authentication steps, obtaining JWT tokens, and additional examples, see our Integration Documentation.
π License
FLIZpay SDK is available under the MIT license. See the LICENSE file for more details.
π Support
Need assistance?
π Talk to our devs
Happy coding! ππ
Package Metadata
Repository: flizpay/flizpay-ios
Default branch: main
README: README.md