Skip to main content

Integrate the Nimbbl iOS SDK with your iOS app and start accepting payments from your customers.

SAMPLE EXPERIENCE

Compatibilities and Dependencies

  1. Your app should target iOS version 13+

Pod Installation

Add the following code to your project pod file:

target ‘Target name’ do
Pod ‘Nimbbl-SDK’
end

Using the terminal, navigate to your project and run the below command:

pod install

Add URL Schemes

Open Info.plist as a source code. Add the following URL schemes to Info.plist.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>gpay</string>
<string>phonepe</string>
<string>paytmmp</string>
</array>

Import Nimbbl framework

import NimbblCheckoutSDK
class ViewController: UIViewController {
}

Implement the Checkout Delegate

import NimbblCheckoutSDK

class ViewController: UIViewController, NimbblCheckoutDelegate {
func onPaymentResponse(_response: [AnyHashable : Any]?) {

}
func onError(_error:String){
}
}

Initialise Nimbbl Checkout SDK

IMPORTANT

In order to initialise the SDK, your server should provide you the following information:

import NimbblCheckoutSDK

class ViewController: UIViewController, NimbblCheckoutDelegate {

var nimbblChekout: NimbblCheckout!

override func viewDidLoad() {
nimbblChekout = NimbblCheckout(accessKey: "<`access_key`>", serviceURL: "https://api.nimbbl.tech/api/v2/", paymentURL: "https://checkout.nimbbl.tech/", delegate: self)
}

func onPaymentResponse(_response: [AnyHashable : Any]?) {

}
func onError(_error:String){

}

}

Invoke the Checkout

IMPORTANT

In order to invoke the checkout, your server should provide you the following information:

let options: [String:Any] = ["orderID": “your order id”]
nimbblChekout.show(options: options, displayController: self)

Note : displayController is the ViewController on which you want to present the checkout screen

Capture Transaction Response

A successful payment returns the following fields to the Checkout Form.

{
"nimbbl_order_id": "order_RoQ7Zl92G2qqB3rg",
"nimbbl_transaction_id": "order_RoQ7Zl92G2qqB3rg-20210217071936",
"nimbbl_signature": "hmac_sha256"
}
IMPORTANT
  • Share the response parameters received to your server
  • This will need to be validated on your server before you decide to provide goods or services
  • More details available on processing the response in Completing the Integration