Enroll a new borrower on Defacto.


This API will create a borrower and a credit line for this borrower. More information in the behavior section below.


    <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 ff 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>

Currently, we don't support multiple repayment methods for one partner. To verify the repayment method configured for the borrower, you can request /credit_lines.

Language
Authentication
Header
Click Try It! to start a request and see the response here!