Lite SDK
Integrate Hyperswitch Lite SDK to your iOS app
Last updated
Was this helpful?
Was this helpful?
pod 'hyperswitch-sdk-ios-lite'pod 'hyperswitch-sdk-ios-lite/scancard'import HyperswitchLite
paymentSession = PaymentSession(publishableKey: <YOUR_PUBLISHABLE_KEY>)
// Initialize with client secret
paymentSession.initPaymentSession(paymentIntentClientSecret: paymentIntentClientSecret)// Present the PaymentSheet Lite
paymentSession.presentPaymentSheetLite(
viewController: self,
configuration: configuration,
completion: {
result in
DispatchQueue.main.async {
switch result {
case .completed:
self.statusLabel.text = "Payment complete"
case .failed(let error):
self.statusLabel.text = "Payment failed: \(error)"
case .canceled:
self.statusLabel.text = "Payment canceled."
}
}
})