Simulation

This totally optional endpoint returns the simulation of an installment payment. It allows you to get a preview of the installment payment; for example, to show how much it would cost to pay for it in installments on the product page. Here is an example of using this feature:

Simulation of a loan

Soisy defines the customer's interest rate by calculating it based on their creditworthiness. The API Simulation allows, in fact, to show different examples of installment costs. For simplicity, there are 3 examples: minimum cost, average cost and maximum cost. You will then be able to show your customer an installment example.
We suggest using the average cost and informing them that the simulated cost may be different from the real one, which we can only calculate after the checkout once some actual customer data has been recovered.

The simulation requests made are not saved on our servers.


Request

Endpoint

Sandbox: https://api.sandbox.soisy.it/api/shops/{shopId}/loan-quotes
Production: https://api.soisy.it/api/shops/{shopId}/loan-quotes

Accepted methods

GET

Authentication

This API requests authentication via shopId and header X-Auth-Token

Parameters

Parameter Mandatory Type Format Description
amount Yes Total Total of the order or product, in € cents
installments Yes Total Number of installments, from 3 to 60 (*)
zeroInterestRate No Boolean Enable the zero rate. It is false by default

(*) The maximum number of installments may vary depending on the agreements made during the contract.


Response

The API returns a JSON object.

HTTP Error codes

Code Description
200 Request completed successfully
400 Syntax or domain error
403 Impossible to authenticate the request
404 Resource not found
500 System error

Valid response

The answer contains the minimum, maximum, and average simulation. The parameters returned are:

{
    "min": {
        "fee": 1000,
        "interest": 2000,
        "interestRate": 5.5,
        "totalRepaid": 103000,
        "apr": 6.00,
        "instalmentAmount": 5000
    },
    "median": {
        "fee": 1000,
        "interest": 2500,
        "interestRate": 6.0,
        "totalRepaid": 103500,
        "apr": 7.00,
        "instalmentAmount": 5500
    },
    "max": {
        "fee": 1000,
        "interest": 3000,
        "interestRate": 8.0,
        "totalRepaid": 104000,
        "apr": 7.50,
        "instalmentAmount": 6000
    }
}

Where:

Parameter Type Description
fee Total Soisy commission, in € cents
interest Total Interest (TAN), in € cents
interestRate Float Interest (TAN), in percentage
totalRepaid Total Total to be paid, in € cents
apr Float TAEG
instalmentAmount Total Installment to be paid, in € cents

Error response

{
 "errors": {
     "domain": [
         0: "Invalid data."
         ]
     }
}