BNPL | EMI conversions Documentation
Step 1 - Table configuration :
Table | Configurations |
---|---|
| INSERT INTO `f_credit_line_emi_conversion_config` (`config_json`)
VALUES
('{\"billToEmi\": {\"loanProductId\": 199, \"billFirstRepayment\": \"NEXT_BILLING_DATE\", \"defaultInterestRate\": 15, \"loanProductShortName\": \"pp\", \"billEmiConversionAmount\": \"EXCLUDE_MAD\", \"interestChargedFromDate\": \"EMI_CONVERSION_DATE\"}, \"transactionToEmi\": {\"loanProductId\": 21, \"defaultInterestRate\": 15, \"loanProductShortName\": \"pp\", \"firstRepaymentStrategy\": \"CURRENT_BILLING_DATE\", \"interestChargedFromDate\": \"EMI_CONVERSION_DATE\", \"emiConversionAmountStrategy\": \"TRANSACTION_AMOUNT\"}}');
or Set the config_json as {
"billToEmi": {
"loanProductId": 199,
"billFirstRepayment": "NEXT_BILLING_DATE",
"defaultInterestRate": 15,
"loanProductShortName": "pp",
"billEmiConversionAmount": "EXCLUDE_MAD",
"interestChargedFromDate": "EMI_CONVERSION_DATE"
},
"transactionToEmi": {
"loanProductId": 21,
"defaultInterestRate": 15,
"loanProductShortName": "pp",
"firstRepaymentStrategy": "CURRENT_BILLING_DATE",
"interestChargedFromDate": "EMI_CONVERSION_DATE",
"emiConversionAmountStrategy": "TRANSACTION_AMOUNT"
}
} |
2. f_product_config_mapping | Set the id of f_credit_line_emi_conversion_config table to credit_line_emi_conversion_config_id column of f_product_config_mapping table where product short name is ‘cl' Sample Query: update f_product_config_mapping set credit_line_emi_conversion_config_id = '1' where product_shortname =‘cl’; If this table is empty run the below insert script: |
3. m_product_loan | Set category_id as NULL for the given productId Sample Query: |
4. f_account_config_mapping | If all the above configuration are done correctly then when you create credit line account the value of credit_line_emi_conversion_config will be set to 1 in this table |
5. f_account_payment_strategy | set line_and_loan_payment_strategy as EMI_BNPL |
6. f_credit_line_product_billing_config | Set the mad_config as |
Step 2 - Create a new credit line and test emi conversion
Postman curl:
Action | curl |
---|---|
2. spend & EMI convert | |
3. EMIconvert later |
Note: If you face any exception for overdue fee then deactivate the overdue fee and test the EMI conversion
Tables affected after EMI conversion :
Table | Description |
f_credit_line_emi_conversion_details (affected) | Every time an emi conversion is made it is logged in this table with the below details - (Emi conversion transaction id, Amount, Account number, loan id, Loan status) |
f_credit_line_transaction_emi_conversion_details (affected) | Transaction to emi conversion mapping will store in this table i.e (transactionIdentifier, emiConversionTransactionId) |
f_credit_account_summary (affected) | Decrease Principal o/s |
f_credit_line_emi_summary (affected) | Increase Principal o/s |
f_credit_account_transaction (affected) | Will update Principal, Outstanding, AvailableLimit |
Tables affected after Due Posting:
Table | Description |
---|---|
f_credit_line_emi_summary (affected) | will set emi_interest_due and emi_principal_due |
f_credit_line_emi_obligations (affected) | will set emi_principal_charged, emi_interest_charged |
f_credit_account_emi_due_posting_details (affected) | will emiPrincipalDue, emiInterestDue |