This flow is a suggested interpretation of the Dataprev manuals for Crédito do Trabalhador. The manuals prevail over this page. Your institution validates the flow and implements it on the Lerian APIs. See how to read the diagrams.
Participants
- Your institution. The financial institution that holds the loans and makes the new one.
- Lerian. Lerian Consignado. It exchanges the requests with Dataprev, and exposes the API your institution uses.
- Dataprev. Runs the Crédito do Trabalhador system: the loan auctions and the registry of payroll loans.
Diagram
Steps
Each contract to settle must be a contract that Lerian holds for your institution: registered through Lerian, or imported with
POST /v1/consignado/contracts/{numero_contrato}/import. Any other contract answers 404, and Lerian does not call Dataprev. With FGTS collateral, a refinancing settles one contract.
Lerian reports the outstanding balance of the new contract to Dataprev. For each settled contract, it sends a final balance of 0.00.
You can reverse only a refinancing that Lerian registered.
If the answer does not arrive, do not send the command again under a new key. The code RAIL_COMMAND_OUTCOME_UNRESOLVED means that Lerian does not know the outcome yet. Read the command with GET /v1/consignado/rail-commands. The code RAIL_COMMAND_ALREADY_REFUSED means that Dataprev refused the command under this key. Send a corrected request under a new key.
How you know it finished
Row 4 returns the new contract number and the settled contracts.

