Skip to main content

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

SAMPLE EXPERIENCE

Compatibilities and Dependencies

  1. The minsdk for your app should target Android version 22+

Install the Nimbbl Android SDK

To add the SDK to your app, add following change in app/build.gradle file:

dependencies {
implementation 'tech.nimbbl.sdk:nimbbl-checkout-sdk:2.0.3'
}

Changes in project build.gradle

repositories {
maven { url "https://gitlab.com/api/v4/projects/25847308/packages/maven" }
}

Initialise the Nimbbl Android SDK

You can choose to do this on app launch or any other point before you will be invoking the checkout

NimbblCheckoutSDK.getInstance().init(this)

Invoke the Checkout

IMPORTANT

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

val builder = NimbblCheckoutOptions.Builder()
val options = builder.setPackageName(appPackageName).setOrderId(orderId).setToken(token)

NimbblCheckoutSDK.getInstance().checkout(options)
INFO
  • You will need to provide your app package name to the SDK.
  • You will also need to get your app package name whitelisted by our team.
  • Please drop an email to help@nimbbl.biz to get this whitelisting done.

Capture Transaction Response

You have to implement NimbblCheckoutPaymentListener to receive callbacks for the payment result.

class CatalogPage : AppCompatActivity(), NimbblCheckoutPaymentListener  {

override fun onPaymentFailed(data: String) {
}

override fun onPaymentSuccess(data: MutableMap<String, Any>?) {
}
}

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