Accounting scripts examples
This guide currently provides one detailed example how the Pismo platform handles accounting in the case of refinancing. The guide will be enhanced to include other use case examples.
Refinancing example
Refinancing is the process of creating a new credit contract agreement for an existing credit card debt. The new agreement has new terms, such as the interest rate and applicable taxes. Refinancing on the Pismo platform utilizes the installment agreement functionality.
In this example, assume the card holder has R$3526.64 in debt and receives a credit from the issuer to settle the debt under a refinancing agreement. The card holder has agreed to repay the debt in three installments on specified dates in July, August, and September.
The total amount of the refinancing contract (principal + interest + tax) is R$4591.68 and is to be paid over three installments. The total IOF (financial tax in Brazil) is R$32.31, also split over three installments.
Amount (R$) | Principal (R$) | Interest (R$) | IOF (R$) | |
---|---|---|---|---|
Installment 1 | 1530.56 | 1025.87 | 497.55 | 7.14 |
Installment 2 | 1530.56 | 1166.93 | 353.13 | 10.50 |
Installment 3 | 1530.56 | 1333.84 | 182.05 | 14.67 |
Contract totals | 4591.68 | 3526.64 | 1032.73 | 32.31 |
Transactions and accounting events
In this refinancing example, the platform generates transactions and the corresponding transaction events and accounting events on the following dates.
Date | Platform action |
---|---|
1 July | Platform creates refinancing contract |
20 July | Cycle close for the 1st refinancing installment |
30 July | Due date of the 1st refinancing installment |
20 August | Cycle close of the 2nd refinancing installment |
30 August | Due date of the 2nd refinancing installment |
20 September | Cycle close for the 3rd refinancing installment |
30 September | Due date of the 3rd refinancing installment |
The Pismo platform creates transactions and accounting events as follows (details provided in the sections below).
- Refinancing credit and refinancing contract and first installment transactions and events on the same day
- Transactions and events for subsequent installments at later dates
- Additional accounting events on the due date of each installment
- Additional daily interest accounting events
Refinancing credit and refinancing contract
At the time of the new refinancing contract, the Pismo platform creates two transactions: refinancing credit transaction (701) and refinancing contract transaction (703).
Transaction type | Transaction type description | Transaction description |
---|---|---|
701 | Refinancing credit | Refinancing credit transaction represents the credit that the cardholder receives to cover their past debt and to pay it to the issuer bank in installments. This transaction amount includes the principal amount only, as specified in the Create payment agreement endpoint. |
703 | Refinancing contract | Refinancing contract transaction is not available on the cardholder's statement as it is created for accounting purposes only. This transaction amount includes the principal amount (the same amount as in the refinancing credit 701 transaction) + interest + any taxes (in Brazil, this is usually the total IOF). The platform places total interest in the Interest amount field on the transaction. |
At the same time, if the accounting scripts are configured, the Pismo platform creates corresponding accounting events for the refinancing credit and for the refinancing contract.
Accounting event type | Entry type | Accounting event type description |
---|---|---|
701 | 701 | Refinancing credit |
703 | 2121 | Refinancing contract |
703 | 2122 | Refinancing contract interest |
703 | 2123 | Refinancing contract IOF (if the IOF is not 0) |
First installment
When the platform creates transactions and accounting events for the refinancing credit and the refinancing contract, it also creates the following transactions for the first installment.
Transaction type | Transaction type description | Transaction description |
---|---|---|
702 | Refinancing installment | This transaction amount is [(principal + interest + total IOF) / number of installments]. The platform places interest for this installment in the Interest amount field on the transaction. |
417 | Installment IOF | If split_iof is false (which is the default), this transaction amount is the total IOF.If split_iof is true , this transaction amount is (total IOF / number of installments) |
At the same time, the platform generates the following accounting events for the first installment.
Accounting event type | Entry type | Accounting event type description |
---|---|---|
702 | 702 | Refinancing installment |
702 | 2125 | Refinancing installment interest |
Subsequent installments
For each subsequent installment, the platform creates refinancing installment transactions (702 and 417), places them in the appropriate statements, and generates corresponding accounting events (702).
The platform creates as many refinancing installment transactions (702) as the number of installments specified in the Create payment agreement endpoint. It also generates separate transactions for each installment IOF transaction (417).
- If
split_iof
isfalse
, the platform creates one installment IOF transaction (417) with the full IOF tax amount. - If
split_iof
istrue
, the platform splits the IOF tax into installments and creates as many installment IOF transactions (417) as the number of installments.
For the second and remaining installments, the platform generates installments accounting events (702 and 2125) at the closing of the previous cycle.
- For the second installment, the platform generates events at the closing of the first installment's cycle.
- For the third installment, the platform generates events at the closing of the second installment's cycle.
Due date of each installment
On the due date of each installment's statement, the platform creates the following accounting events (2126 and 2127).
Accounting event type | Entry type | Accounting event type description |
---|---|---|
702 | 2126 | Refinancing installment due date |
702 | 2127 | Refinancing installment interest due date |
Daily interest accounting events
The platform creates daily interest accounting events (2080) based on the platform amortization price model, starting on the following day of the refinancing contract creation and until the last installment's due date.
Accounting event type | Entry type | Accounting event type description |
---|---|---|
702 | 2080 | Refinancing daily interest |
The total amount of the refinancing interest in this example is $R1032.73. The platform calculates the daily refinancing interest and starts sending daily events the next day after creating the contract (in this case, on 2 July). The refinancing daily interest events end on the due date of the last installment (in this case, on 30 September).
Transactions and accounting events details
The following table provides an overview of the transactions and related accounting events that the platform creates over the term of this example refinancing agreement, with the corresponding dates.
Transactions details
The following table details the transactions that the platform creates over the course of the three installments specified in this refinancing example.
Accounting events details
The following table details the accounting events that the platform creates for the refinancing contract.
For installment 1, the platform creates the following accounting events.
For installment 2, the platform creates the following accounting events.
For installment 3, the platform creates the following accounting events.
The following table is the sample of the accounting events that the platform creates for daily refinancing interest.
Updated 7 months ago