The Nimbbl Core API SDK provides the core functionality for payment processing, order management, and transaction handling in iOS applications.
- Order Management: Create and update orders
- Transaction Enquiry: Query transaction status
- Payment Processing: Handle payment flows
- UPI App Detection: Detect available UPI apps
- Event Logging: Comprehensive event tracking
- Error Handling: Robust error management
- iOS 13.0+
- Swift 5.0+
- Xcode 12.0+
Add the following to your Podfile
:
# Use dynamic frameworks
use_frameworks!
pod 'nimbbl_mobile_kit_ios_core_api_sdk', '~> 1.0.0'
Then run:
pod install
Note: For production apps, you should handle code signing according to your app's requirements.
Add the following dependency to your Package.swift
:
dependencies: [
.package(url: "https://github.com/nimbbl/nimbbl-ios-sdk.git", from: "1.0.0")
]
import nimbbl_mobile_kit_ios_core_api_sdk
let sdk = NimbblCoreApiSDK.shared
sdk.updateOrderDetails(
token: "your_order_token",
orderId: "order_123",
callbackMode: "webhook",
referrerPlatform: "ios",
referrerPlatformVersion: "1.0.0"
) { result in
switch result {
case .success(let response):
print("Order updated successfully: \(response)")
case .failure(let error):
print("Error updating order: \(error)")
}
}
sdk.getTransactionEnquiry(
token: "your_order_token",
orderId: "order_123",
invoiceId: "invoice_456",
transactionId: "txn_789"
) { result in
switch result {
case .success(let response):
print("Transaction status: \(response)")
case .failure(let error):
print("Error getting transaction: \(error)")
}
}
sdk.updateCheckOutCancelReason(
token: "your_order_token",
orderId: "order_123",
cancelReason: "User cancelled"
) { result in
switch result {
case .success(let data):
print("Cancel reason updated successfully")
case .failure(let error):
print("Error updating cancel reason: \(error)")
}
}
The main SDK class that provides all core API functionality.
updateOrderDetails(token:orderId:callbackMode:referrerPlatform:referrerPlatformVersion:completion:)
- Update order detailsgetTransactionEnquiry(token:orderId:invoiceId:transactionId:completion:)
- Get transaction enquiryupdateCheckOutCancelReason(token:orderId:cancelReason:completion:)
- Update checkout cancel reason
OrderResponse
- Response model for order operationsTransactionEnquiryResponse
- Response model for transaction enquiriesCheckoutDetailResponse
- Response model for checkout details
The SDK uses Swift's Result
type for error handling. All completion handlers return either a success value or an error.
switch result {
case .success(let response):
// Handle success
case .failure(let error):
// Handle error
print("Error: \(error.localizedDescription)")
}
The SDK includes comprehensive logging capabilities. Log levels can be controlled through the LogUtil
class.
This SDK is licensed under the MIT License. See the LICENSE file for details.
For support and questions, please contact:
- Email: [email protected]
- Website: https://nimbbl.com
- Initial release
- Core API functionality
- Order management
- Transaction enquiry
- UPI app detection
- Event logging