latestSwagger 2.02026-08-2181213270.0 KB

0a9c1f8784f2

Onboarding

<div> <h3>Enroll a new borrower on Defacto.</h3> <p> This API will create a borrower and a credit line for this borrower. More information in the <b>behavior</b> section below. </p> <p> <strong>Timeout:</strong> 30 seconds (status code will be 504 in such a case) </p> <br/> <h4>Required data</h4> <p> Borrower must be a commercial company -> eg. in France needs to be registered at an RCS. </p> <p> <b>If the borrower repays by direct debit, the following information are mandatory:</b> </p> <ul> <li> the director’s personal information: Name, birth date, nationality, email address and country of residence of the managing director</li> <li>The IBAN of the borrower (please make sure that the borrower is aware that direct debit is used as the repayment method).</li> </ul> <p> We strongly recommend that you fill up all the information when you can, even on the sandbox. For French borrowers, we manage to pull most of the director information automatically, however for other countries, this might not be the case. For the borrowers that Defacto is not able to fetch the mandatory data, you need to provide them to ensure borrower creation. Otherwise the API will return a 400 error and list the values that it could not obtain. </p> <h4>Behavior</h4> <p> This API endpoint creates a borrower in our system, configures our system to get the repayment of the loan, evaluates the maximum amount of money we can lend to this company and creates a credit line for this borrower. After the credit line is created for this borrower, you can get it with <code>GET /credit-lines?borrower=<THE_COMPANY_NUMBER_OF_THE_BORROWER></code>. <br/> <b>Synchronous and asynchronous behaviors are offered.</b> </br> </p> <p>Synchronous behavior:</br></p> <ul> <li>Set <code>'wait_for_ready': true</code> to activate it</li> <li> <b>You can <code>GET /credit-lines?borrower=<THE_COMPANY_NUMBER_OF_THE_BORROWER></code> and request a loan right after you received the answer from this API endpoint</b> </li> <li>Response takes from 4 to 8 seconds</li> <li> The API answers after the solvency of the company is evaluated and the credit line is created, or returns an error. </li> </ul> <br/> <p>Asynchronous behavior (default one):</p> <ul> <li>Set <code>'wait_for_ready': false</code> to activate it</li> </li> <li> Our system will evaluate the solvency of the company and create its credit line after answering the API call. <li> So, a loan cannot be requested right after this endpoint answers. You must wait for the creation of the credit line. To discover it, you can either subscribe to the CreditLine.CREATED webhook or regularly fetch <code>GET /credit-lines?borrower=<THE_COMPANY_NUMBER_OF_THE_BORROWER></code>. </li> <li>Response takes between 0.3 and 1.5 second.</li> </ul> <blockquote class="callout callout_warn" theme="🚧"> <h3 class="callout-heading"> <span class="callout-icon">🚧</span> <p>Careful if you subscribe to the CreditLine.CREATED webhook!</p> </h3> <p> If you subscribe to the webhook, please note that there is an inconsistency in the API at the moment. The webhook sends a <code>borrower_id</code> that does not correspond to the borrower id that you received with this endpoint (it's rather a business_id in our DB, that you cannot fetch). </p> <p> So at the moment we recommend you to <code>GET /credit-lines?borrower=<THE_COMPANY_NUMBER_OF_THE_BORROWER></code> for all borrowers waiting for a credit line when you receive the webhook event. </p> </blockquote> </div>
post/borrowers

Request body

account_numberstring nullable

The account identifier. Only IBANs are supported at the moment.

identifierstring required

Legal identifier of the business, such as its SIRET or SIREN in France. Must not contain spaces.

identifier_type'belgium_registration_number' | 'bsn' | 'cif' | 'hr_nummer' | 'kvk' | 'nif' | 'siren' | 'siret' | 'steuernummer' | 'vat_number' | 'null' nullable

Type of legal business identifier of the business, such as the SIRET in France.

legal_formstring nullable

Legal form of the business.

metadataobject nullable

This object is yours, it enables you to add custom data.

namestring nullable

Legal name of the business.

preferred_languagestring nullable

Preferred language of the borrower in format ISO 639-1 (examples: [fr, en, es, de, nl]).

signed_atstring date-time nullable

datetime of the borrower's signature. Usually time the borrower clicked on our T&Cs checkbox

vat_numberstring nullable

VatNumber

wait_for_readyboolean

Wait for the borrower to be ready to request a first loan.Many actions have to run in the background (KYC, scoring, contract generation and so on).We recommend you to subscribe to the CreditLine.CREATED webhook in order to be notified in real time when the credit line is available.

Response

Created