Installments

Velocity Android Software Development Kit Integration Guide

Customers can use the installments feature to make payment in installments, which is payable in set intervals over a defined period. To add support for card payment with installments, implement the mPointGetInstallmentPlansDelegate interface.

After customers enter the 11-digit card number, call the getInstallmentPlans API to fetch the available installment plans for that card shown as follows:

var cardNumber : Long
var cardInfo : mPointCardInfo
cardInfo = _mPoint.getCardFromPrefix(cardNumber)

val installmentPlansSearchCriteria = mPointInstallmentPlansSearchCriteria()
installmentPlansSearchCriteria.binNumber = cardNumber 
installmentPlansSearchCriteria.cardInfo = cardInfo
_mPoint.getInstallmentPlans(installmentPlansSearchCriteria)

To receive result for the getInstallmentPlans API, call in the previous code sample and implement the mPointGetInstallmentPlansDelegate method. The result is returned in the following method:

override fun displayInstallmentPlans(arrListInstallments:
java.util.ArrayList<String>?, p1: mPoint?) {
}

📘

Note: The arrListInstallments parameter contains the list of all the installment plans that are available. Populate this data in a drop-down widget so that a customer can select an installment plan.

To pass the value of the selected installment, send it in the authorize API in the setInstallmentValue(installmentValue) parameter as shown in the following code sample:

var installmentValue : String  // The Selected Installment Plan

_mPoint.authorize(mPointAuthorizeInfo(cardInfo)
.setCardNo(java.lang.Long.valueOf(cardNumer))
.setCardExpMonth(Integer.parseInt(expiryMonth))
.setCardExpYear(Integer.parseInt(expiryYear))
.setCvc(tempCvv.toString())
.setNameOnCard(cardName)
.setStoreCard(isSaveCard)
.setCardValidFromMonth(validMonth.toInt())
.setCardValidFromYear(validYear.toInt())
.setClientInfo(clientInfo)
.setForeignExchangeOffer(foreignExchangeInfo)
.setViaAuthToken(true)
.setPassword(authToken)
.setAddressInfo(addressInfo)
.addAdditionalData(additionalData)
.setInstallmentValue(installmentValue))