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
Field | Description | Type |
---|---|---|
id | Unique identifier (UUID) | String |
allowed_down_payment_methods | Payment methods allowed for the down payment (first installment) | Array |
availability | The availability of the configuration, enabled or disabled | String |
down_payment_type | Type of the down payment, percentage or absolute | String |
down_payment_value | Value of the down payment, if type is absolute this field it is in cents, if type is percentage this field is a percentage | Float |
expires_in | Number in hours for the down payment expires | Integer |
financed_type | Type of the financing, it can be bolepix or card | String |
interest_rate | Interest rate by month | String |
max_down_payment_installments | Max installment your customer will be able to choose for the down payment | Integer |
max_installment | Max installment your customer will be able to choose for the purchase | Integer |
min_installment_amount_cents | Min amount cents of each installment | Integer |
payment_methods | Available payment methods for your customer for recurring bills | Array |
payment_type | Type of the payment option, it can be upfront or financed | String |
registration_fee | Registration fee charged by Lia on the down_payment (percentage) | Float |
take_rate_type | Type of Lia’s take rate, absolute or percentage | String |
take_rate_value | Value of Lia’s take rate | Float |