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:3.0.4'
}

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.instance?.init(this)

Launching the Checkout

Understanding Checkout Options

Nimbbl lets you enforce a payment mode on the Checkout. This can be done by setting up the setPaymentModeCode property. There are other related properties in to each different payment mode, you can read it in the table below. If you don't set setPaymentModeCode the consumer is shown the full Checkout with all available payment modes.

Option PropertiesTypeMandatory?Description
setOrderTokenstringtrueThis would have been generated from your server during order creation using V3 create-order API.
setPaymentModeCodestringfalseIn case of specific payment mode, this property is mandatory. Possible values net_banking, card, upi, wallet. If you don't pass payment_mode_code the consumer is shown the full Checkout with all available payment modes.
setBankCodestringfalseOnly to be passed in case of net_banking. Example: hdfc. To get the full list of banks supported for you, please use this API. If it isn't passed, Checkout will open with a page for the user to choose their bank from enabled banks
setWalletCodestringfalseOnly to be passed in case of wallet. Example: jio_money. To get the full list of wallets supported for you, please use this API. If it isn't passed, Checkout will open with a page for the user to choose their wallet from enabled wallets
setPaymentFlowstringfalseOnly to be passed in case of upi to determine the flow. Possible values collect, intent. If it isn't passed, Checkout will open with page for the user to enter their UPI ID or pay using a QR or choose a UPI app

Setting the Checkout Options

val options = builder.setOrderToken(<orderToken | mandatory>)
// only if you want to enforce a specific payment method
.setPaymentModeCode(<string | optional>)
.setBankCode(<string | optional>)
.setPaymentFlow(<string | optional>)
.setWalletCode(<string | optional>)
.build()

Invoking the Checkout

    val builder = NimbblCheckoutOptions.Builder()
NimbblCheckoutSDK.instance?.checkout(options)
INFO
  • You will 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 response to the Checkout Form, for details related to processing response check Completing the Integration.

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