Testing Multiple Scenarios & Errors

Before reading this section please refer to the guide on how to Make your first loan in 5 minutes

Summary

Good testing test success and error cases.

So, we help you decide on the behavior of our sandbox: if it should work fine or produce errors.

Basically, it works this way:

  • The Sandbox refers to IBAN that you use as the target account to pay
  • We provide some testing scenarios: see Available testing scenarios below
  • If you use an IBAN that you generated, we will use the SUCCESS scenario (it is the default scenario)
  • To simulate other behaviors, we provide an IBAN generator at GET /sandbox/iban-generator ➜ select the scenario and we'll generate an IBAN for this scenario

🚧

An IBAN can be used with only one of your counterparties!

An IBAN can be used with only one of your counterparties. For example, you cannot use the same IBAN with two of your sellers. In such a case, you will have to generate two IBANs.

However, you can assign as many IBANs as you want to a single counterparty. So, you can test as many scenarios as you want against a single counterparty.

Obtaining an IBAN or more complex testing data

We provide three generators:

  1. An IBAN generator (GET /sandbox/iban-generator). By using the generated IBAN, you can generate new invoices by yourself.
  2. A business generator (GET /sandbox/business-generator). You can use the returned data to create a borrower.
  3. An invoice generator (POST /sandbox/invoice-generator) that generates both the IBAN and invoice for you. It enables you to test scenarios very quickly but gives you fewer control on the values of the invoice such as its amount, dates and so on.

Available testing scenarios

Scenario nameDescription
SUCCESSSuccessfully creates a loan that will be payed immediately after your approval. The credit transfer repayment will be triggered immediately after the payment.
SUCCESS_ONE_DAY_LATERSuccessfully creates a loan that will be paid immediately after your approval. The credit transfer repayment will be triggered the following day after the payment.
REJECT (coming soon)Creates a loan that will be declined by Defacto.
FAILCreates a loan which payment will fail after your approval.

Values for your very first tests

Before using the generators, you can use the test values below.

The effects on invoice/loan payments described in the table below are representative of the sandbox environment.

IBAN NumberDescriptionExample PDF InvoicePDF base64 value
FR8811111015593603018280926Successfully creates a loan that will be payed immediately after your approval. The credit transfer repayment will be triggered immediately after the payment.SuccessGet here
FR3711111025593244332331294Successfully creates a loan that will be paid immediately after your approval. The credit transfer repayment will be triggered the following day after the payment.Repay One Day LaterGet here
FR1311111045594746737398900Creates a loan which payment will fail after your approval.FailedGet here