# Create deposit

Do you have a Signicat account?

This guide assumes that you have a Signicat account and are familiar with REST APIs. If not, please visit our Overview page and make sure you know how to create and use API tokens as described in Connecting to the API.

This guide will show you how to set up a deposit with one tenant:

# Step 1: Create deposit

The example below is a json document that contains all the information you need to set up a deposit with a tenant named Kari Nordmann. Update the paymentDeadline and the dataToSign on the contract object to match your needs.

POST https://api.idfy.no/deposit/personal

Request sample

{
  "tenants": [
    {
      "externalId": "24DE0123-6989-4FC0-9139-8577CF8D994F",
      "info": {
        "firstName": "Kari",
        "lastName": "Nordmann",
        "mobile": {
          "countryCode": "+47",
          "number": "12345678"
        },
        "email": "kari.nordmann@idfy.io",
        "nationality": "NO",
        "address": {
          "street": "Kanalveien 109",
          "postalCode": "5068",
          "city": "Bergen",
          "country": "NO"
        }
      },
      "flow": "redirect",
      "redirectSettings": {
        "error": "https://idfy.io#error",
        "cancel": "https://idfy.io#cancel",
        "success": "https://idfy.io#success"
      }
    }
  ],
  "landlord": {
    "name": "Ola Nordmann",
    "organizationNumber": "998303168",
    "address": {
      "street": "Kanalveien 109",
      "postalCode": "5068",
      "city": "Bergen",
      "country": "NO"
    },
    "nationality": "NO"
  },
  "externalId": "B35D3A5F-0701-414C-84F0-37ECCA83A0D5",
  "contract": {
    "dataToSign": {
      "rentContractPDF": "base64 encoded pdf"
    },
    "depositAmount": 27000,
    "paymentDeadline": "2019-08-31T14:03:09.7810583+02:00"
  },
  "rentObject": {
    "address": "Kanalveien 109",
    "postalCode": "5068",
    "city": "Bergen",
    "country": "NO"
  },
  "contactDetails": {
    "email": "test@test.com"
  }
}

# Step 2: Read the response

Below is an example response returned from the post request in the example above.

{
  "id": "ab794494-5c58-4c60-9643-a024ffaf4091",
  "documentId": "4aa58939-04d7-4a21-ac5f-255c4590770d",
  "tenants": [
    {
      "id": "c9619e0b-18b0-40ab-aaa8-9d7d915c2ed9",
      "url": "https://deposit.idfy.no/start",
      "externalId": "24DE0123-6989-4FC0-9139-8577CF8D994F",
      "aml": false,
      "info": {
        "firstName": "Kari",
        "lastName": "Nordmann",
        "mobile": {
          "countryCode": "+47",
          "number": "12345678"
        },
        "email": "kari.nordmann@idfy.io",
        "nationality": "NO",
        "address": {
          "street": "Kanalveien 109",
          "postalCode": "5068",
          "city": "Bergen",
          "country": "NO"
        }
      },
      "flow": "redirect",
      "redirectSettings": {
        "error": "https://idfy.io#error",
        "cancel": "https://idfy.io#cancel",
        "success": "https://idfy.io#success"
      }
    }
  ],
  "landlord": {
    "name": "Ola Nordmann",
    "organizationNumber": "998303168",
    "address": {
      "street": "Kanalveien 109",
      "postalCode": "5068",
      "city": "Bergen",
      "country": "NO"
    },
    "nationality": "NO"
  },
  "created": "2019-08-21T12:03:09.7823851Z",
  "contract": {
    "depositAmount": 27000,
    "paymentDeadline": "2019-08-31T14:03:09.7823858+02:00"
  },
  "status": {
    "depositStatus": "CREATED",
    "funds": 0,
  "lastPaymentCheck": null
  },
  "externalId": "B35D3A5F-0701-414C-84F0-37ECCA83A0D5",
  "rentObject": {
    "address": "Kanalveien 109",
    "postalCode": "5068",
    "city": "Bergen",
    "country": "NO"
  },
  "contactDetails": {
    "email": "test@test.com"
  }
}

The response you'll receive contains an ID and a documentId field. It's important that you keep these IDs, as they will be your reference to the deposit and the signed contract. The tenant object contains a URL which must be used by the tenant to create a deposit account.

# Step 3: Download the rent agreement

  • Listen for changes using our Deposit events
  • Make a GET request to https://api.idfy.no/deposit/personal/{id} to get the latest state of the deposit. When the tenant has completed the wizard from the URL, it's time to retrieve the signed file. Two files are created: the contract that you sent and an account agreement which is generated. The account agreement will be stored by us, but you will have to download the contract, which will be the main document on the signature document. The tenantId of the deposit will match that of the signerId on the signature document.

# Step 4: Wait for funds

Until the payment deadline, we will periodically check for funds on the deposit account. When funds are deposited into the deposit account, the status of the deposit changes and Deposit events are triggered. A few days after the paymentDeadline, we will no longer check the account for funds, but you can still trigger a check by making a request to the GET deposit endpoint with the query parameter "queryFormPayment=true". Check the status of the deposit to see when it was last checked for funds.

GET https://api.idfy.io/deposit/personal/{id}?queryPayment=true
Last updated: 9/8/2020, 11:20:04 AM