Payment configuration overview

The payment configuration represents an abstract entity containing information that characterizes payment options. Each offer can have multiple payment configurations associated with it.

Company global configuration

Additionally, the company, which represents our partner, also has a global payment configurations associated with it. These payment configurations serve as defaults, defining maximum or minimum values for certain fields.

When configuring offers, pay attention to the following restricted fields:

  • interest_rate: Must be lower than the default value.
  • max_installments: Must be lower than the default value.
  • down_payment_value: Must be higher than the default value when translated to an absolute value.

Calculating correct down payment for offer

We have a registration fee that is included in the down_payment, so for example if you want to create a first bill with a specific value, the calculation is as follows:

first_bill_amount = down_payment_value + (registration_fee * offer_amount)

Lets create an offer with a first bill of R$ 60,00. In this case the offer will have an amount_cents of 77400:

The registration fee is returned in the global config of your company, in this case lets use a value of 0.0197. So to create an offer with a total of R$ 60,00 in the first bill you will have to calculate the down_payment:

first_bill_amount = down_payment_value + (registration_fee * offer_amount)
down_payment_value = first_bill_amount - (registration_fee * offer_amount)
down_payment_value = 6000 - (0.0197 * 77400)
~4475

So if you create a payment_configuration with a down_payment_value: 4475 in this offer, the result will be a first bill of R$ 60,00

Payment configuration schema

FieldDescriptionType
idUnique identifier (UUID)String
allowed_down_payment_methodsPayment methods allowed for the down payment (first installment)Array
availabilityThe availability of the configuration, enabled or disabledString
down_payment_typeType of the down payment, percentage or absoluteString
down_payment_valueValue of the down payment, if type is absolute this field it is in cents, if type is percentage this field is a percentageFloat
expires_inNumber in hours for the down payment expiresInteger
financed_typeType of the financing, it can be bolepix or cardString
interest_rateInterest rate by monthString
max_down_payment_installmentsMax installment your customer will be able to choose for the down paymentInteger
max_installmentMax installment your customer will be able to choose for the purchaseInteger
min_installment_amount_centsMin amount cents of each installmentInteger
payment_methodsAvailable payment methods for your customer for recurring billsArray
payment_typeType of the payment option, it can be upfront or financedString
registration_feeRegistration fee charged by Lia on the down_payment (percentage)Float
take_rate_typeType of Lia’s take rate, absolute or percentageString
take_rate_valueValue of Lia’s take rateFloat