Sign the contract

With this call, the user accepts the contract. To validate acceptance, you will need to send us the OTP, sent to the user via SMS at the end of the previous API call, and the user's explicit acceptance of the clauses that we have returned to you in the previous API.

Request

Endpoint

Sandbox: https://api.sandbox.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/sign-contracts
Production: https://api.soisy.it/api/shops/{shopId}/requests/{fiscalCode}/sign-contracts

Accepted methods

POST

Authentication

This API requires authentication via shopId and headerX-Auth-Token.

Prerequisites

To access this endpoint, you must have requested the certificate.

Parameters

Parameter Required Type Format Description
clauses Yes Purpose The clauses accepted by the user. See example.
otp Yes Total OTP code sent via SMS to the user in the previous API call.

You will need to forward all the clauses received in the previous call with all the conditions set to true.

{
    "otp": 12345,
    "clauses": {
        "termsAndConditions": true,
        "privacyPolicy": true,
        "sddStatement": true,
    }
}

Response

The API does not return any content if successful.

HTTP Error codes

Code Description
204 Request completed successfully
400 Syntax or domain error
403 The request could not be authenticated
500 System error

Error response

The JSON object returned in the event of an error varies depending on the HTTP response code.

Error 400

The description of the message error will change depending on the error generated by the Certification Authority.

 {
     "errors": {
         "domain": [
             {message}
         ]
      }
 }

Error 403

The request sent contains invalid credentials. Check the shopId and the X-Auth-Token header. Find more info on credentials in the paragraph about authentication.

 {
     "errors": {
         "domain": [
             "The user has no access to this resource"
         ]
      }
 }

Error 500

Replies with this HTTP code indicate that a system error has occurred.

{
    "errors": {
        "system": [
            {message}
        ]
    }
}

Redirect chance

In this phase you can decide whether to continue integration or redirect the user to our webapp. Redirect the requestor to Soisy using the redirectUrl field, which you will find in the response payload.

In this specific step, the redirect will show the applicant their dashboard with a summary of their payment and installments.