Przejdź do głównej zawartości


To use installments please add new library to gradle file: payment-add-card-module.

UI can be customized using Global class that extends DefaultStyleConfiguration (please check global UI guideline).

Before implementation

You should also have implemented (on your backend):

  • Transaction API Call (this card should be takend after OCR, and after merchant backend received completed as transaction status with information about proposalId)
  • Retrieve Proposal API Call (this call have an information regarding possible installments - needed for Mobile SDK)
  • Send Proposal API Call (send selected proposal - this should be called after Mobile Installment flow finishes)

Installments can be taken (and displayed) only after OCR was processed and works for card Payment.

Implementation flow

In your implementation of PaymentMethodActions please override method: override fun provideInstallments(callback: InstallmentCallback)

This method is responsible for retrieving installments from merchant API.

val disposable = installmentRepository.getInstallmentOption(persistenceRepository.proposalId)
if (it.installmentDecision != null) {
//merchant could display an information regarding this flow
println("Installment previously taken: $it")

val installmentList: ArrayList<InstallmentOption> = ArrayList()
it.installmentOptions.forEach { item ->
.withFirstInstallments(item.firstInstallmentAmount ?: 0)
.withNumberOfInstallments(item.numberOfInstallments ?: 0)
.withInstallmentAmount(item.installmentAmount ?: 0)


val installment: Installment = Installment.Builder()
.withMaxNumberOfInstallments(it.maxNumberOfInstallments ?: 0)
.withMinNumberOfInstallments(it.minNumberOfInstallments ?: 0)

}, {
println("Error during fetching installments: $it")

For creating a model we are providing:

To trigger installment flow please call:

** Activity)

Data will be returned in override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {...}

Returned object:

SelectedInstallment(val id: String, val installmentType: String, val proposalId: String?)
Sample Snippet
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
when (requestCode) {
OfferInstallmentsActivity.INSTALLMENT_REQUEST_CODE -> {
val selectedInstallment: SelectedInstallment = data.getParcelableExtra(OfferInstallmentsActivity.INSTALLMENT_KEY)
val installmentSelected: InstallmentSelected =
if (selectedInstallment.installmentType == InstallmentType.OPTIONS.toString())
else InstallmentSelected(numberOfInstallments =
//Make a call to request an installment from backend
viewModel.requestInstallment(installmentSelected, selectedInstallment.proposalId!!)
Toast.makeText(this, "Installment finished", Toast.LENGTH_SHORT).show()

In case when user would like to cancel an installment we will send RESULT_CANCELED and close an installment flow.

Default Style of Installments Screen