Perform Proof of Address Check
You can run this check immediately via our Demo Postman collection. It's publicly available and doesn't require an account.

Overview of flow

Proof of Address check API flow

1. Create a client

The first step in creating any check is to create a client from your backend server. For this type of check, a client of type person must be created.

Example request for creating a client

cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/clients \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"type": "person",
6
"email": "[email protected]",
7
"personDetails":{
8
"firstName": "John",
9
"lastName" :"Doe"
10
}
11
}'
Copied!
1
const { ComplyCube } = require("@complycube/api");
2
3
const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });
4
5
const client = await complycube.client.create({
6
type: "person",
7
8
personDetails: {
9
firstName: "John",
10
lastName: "Doe"
11
}
12
});
Copied!
1
from complycube import ComplyCubeClient
2
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')
3
4
new_client = {
5
'type':'person',
6
'email':'[email protected]',
7
'personDetails': {
8
'firstName':'John',
9
'lastName':'Doe'
10
}
11
}
12
13
client = cc_api.clients.create(**new_client)
Copied!
1
use ComplyCube\ComplyCubeClient;
2
3
$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
4
5
$result = $ccapi->clients()->create(['type' => 'person',
6
'email' => '[email protected]',
7
'personDetails' => ['firstName' => 'John',
8
'lastName' => 'Doe']]);
Copied!
1
using ComplyCube.Net;
2
using ComplyCube.Net.Resources.Clients;
3
4
var clientApi = new ClientApi(new ComplyCubeClient("<YOUR_API_KEY>"));
5
6
var newClient = new ClientRequest {
7
type = "person",
8
email = "[email protected]",
9
personDetails = new PersonDetails {
10
firstName = "John",
11
lastName = "Doe"
12
}
13
}
14
15
var client = await clientApi.CreateAsync(newClient);
Copied!

Example response

The response will contain an id (the Client ID). It is required for the next step.
1
{
2
"id": "5eb04fcd0f3e360008035eb1",
3
"type": "person",
4
"email": "[email protected]",
5
"personDetails": {
6
"firstName": "John",
7
"lastName": "Doe"
8
},
9
"createdAt": "2021-01-04T17:24:29.146Z",
10
"updatedAt": "2021-01-04T17:24:29.146Z"
11
}
Copied!

2. Create an address

Create an address by providing the Client ID and address details.

Example request for creating an address

cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/addresses \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"clientId":"5eb04fcd0f3e360008035eb1",
6
"line": "Flat 323",
7
"city": "Aldgate",
8
"state": "London",
9
"country": "GB"
10
}'
Copied!
1
const address = await complycube.address.create("5eb04fcd0f3e360008035eb1", {
2
line: "Flat 323",
3
city: "Aldgate",
4
state: "London",
5
country: "GB"
6
});
Copied!
1
new_address = {
2
'line': 'Flat 323',
3
'city': 'Aldgate',
4
'state': 'London',
5
'country': 'GB'
6
}
7
8
address = cc_api.addresses.create('5eb04fcd0f3e360008035eb1',**new_address)
Copied!
1
$address = $ccapi->address()->create('5eb04fcd0f3e360008035eb1',
2
['line'=>'Flat 323',
3
'city'=>'ManhAldgateattan',
4
'state'=>'London',
5
'country'=>'GB']);
Copied!
1
var addressRequest = new AddressRequest
2
{
3
clientId = "5eb04fcd0f3e360008035eb1",
4
line = "Flat 323",
5
city = "Aldgate",
6
state = "London",
7
country = "GB"
8
};
9
10
11
var address = await addressApi.CreateAsync(addressRequest);
Copied!

Example response

The response will contain an id (the Address ID). It is required for the next step.
1
{
2
"id": "5ebd40714f23960008c81528",
3
"clientId":"5eb04fcd0f3e360008035eb1",
4
"line": "Flat 323",
5
"city": "Aldgate",
6
"state": "London",
7
"country": "GB",
8
"createdAt": "2021-01-04T17:25:21.116Z",
9
"updatedAt": "2021-01-04T17:25:21.116Z"
10
}
Copied!

3. Create a document

Create a document by providing the Client ID and document type (e.g. bank statement, utility bill).

Example request for creating a document

cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/documents \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
clientId":"5eb04fcd0f3e360008035eb1",
6
"type": "bank_statement"
7
}'
Copied!
1
const document = await complycube.document.create("5eb04fcd0f3e360008035eb1", {
2
type: "bank_statement"
3
});
Copied!
1
document = cc_api.documents.create(
2
'5eb04fcd0f3e360008035eb1',
3
type='bank_statement')
Copied!
1
$doc = $ccapi->documents()->create('5eb04fcd0f3e360008035eb1',
2
['type'=>'bank_statement']);
Copied!
1
var docRequest = new DocumentRequest
2
{
3
clientId = "5eb04fcd0f3e360008035eb1",
4
type = "bank_statement"
5
};
6
7
var document = await docApi.CreateAsync(docRequest);
Copied!

Example response

The response will contain an id (the Document ID). It is required for the next step.
1
{
2
"id": "5ebd40714f23960008c81527",
3
"type": "bank_statement",
4
"createdAt": "2021-01-04T17:25:21.116Z",
5
"updatedAt": "2021-01-04T17:25:21.116Z"
6
}
Copied!

3. Upload front side image of an ID

Upload a BASE64 encoded image of the proof of address document.
Images should be JPG, PNG, or PDF.
Below is a sample BASE64encoded file. Download it, and copy its content. Then paste into the data attribute when making the request.
base64-encoded-bank-statement-sample.txt
203KB
Text
Sample - BASE64 encoded bank statement

Example request for uploading an image of a document

cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/documents/5ebd40714f23960008c81527/upload/front \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"fileName": "bank-statement-sample.pdf",
6
"data": "<BASE64_DATA_CONTENT>"
7
}'
Copied!
1
const frontImage = await complycube.document.upload("5ebd40714f23960008c81527", {
2
fileName: "bank-statement-sample.pdf",
3
data: "<BASE64_DATA_CONTENT>"
4
}, "front");
Copied!
1
front_image = cc_api.documents.upload(
2
'5ebd40714f23960008c81527',
3
'front',
4
fileName='bank-statement-sample.pdf',
5
data='<BASE64_DATA_CONTENT>')
Copied!
1
$up = $ccapi->documents()->upload('5ebd40714f23960008c81527',
2
'front',
3
['fileName' => 'bank-statement-sample.pdf',
4
'data' => '<BASE64_DATA_CONTENT>']);
Copied!
1
var docFront = new ImageRequest
2
{
3
fileName = "bank-statement-sample.pdf",
4
data= "<BASE64_DATA_CONTENT>"
5
};
6
7
var img = await docApi.UploadImageAsync("5ebd40714f23960008c81527",
8
"front",
9
docFront);
Copied!

Example response

The response will contain an id (the Check ID). It is required for the next step.
1
{
2
"id": "5eb169302d868c0008828591",
3
"fileName": "bank-statement-sample.pdf",
4
"documentSide": "front",
5
"downloadLink": "/documents/5ebd40714f23960008c81527/images/5eb169302d868c0008828591/download",
6
"contentType": "application/pdf",
7
"size": 182716,
8
"createdAt": "2021-01-04T17:25:21.116Z",
9
"updatedAt": "2021-01-04T17:25:21.116Z"
10
}
Copied!

4. Create a check

Create a check by providing the Client ID, Document ID and check type.

Example request for creating a check

cURL
Node.js
Python
PHP
.NET
1
curl -X POST https://api.complycube.com/v1/checks \
2
-H 'Authorization: <YOUR_API_KEY>' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"clientId":"5eb04fcd0f3e360008035eb1",
6
"documentId":"5ebd40714f23960008c81527",
7
"type": "proof_of_address_check"
8
}'
Copied!
1
const check = await complycube.check.create("5eb1276d96be4a0008713af5", {
2
documentId: "5ebd40714f23960008c81527",
3
type: "proof_of_address_check"
4
});
Copied!
1
check = cc_api.checks.create( '5eb1276d96be4a0008713af5',
2
'proof_of_address_check',
3
documentId='5ebd40714f23960008c81527' )
Copied!
1
$result = $ccapi->checks()->create('5eb1276d96be4a0008713af5',
2
['type' => 'proof_of_address_check',
3
'documentId' => '5ebd40714f23960008c81527']);
Copied!
1
var checkRequest = new CheckRequest
2
{
3
clientId = "5eb04fcd0f3e360008035eb1",
4
documentId = "5ebd40714f23960008c81527",
5
type = "proof_of_address_check"
6
};
7
8
var check = await checkApi.CreateAsync(checkRequest);
Copied!

Example response

The response will contain an id (the Check ID). It is required for the next step.
1
{
2
"id": "5ebd40714f23960008c81527",
3
"entityName": "John Doe",
4
"type": "proof_of_address_check",
5
"clientId": "5eb04fcd0f3e360008035eb1",
6
"documentId": "5ebd40714f23960008c81527",
7
"status": "pending",
8
"createdAt": "2021-01-04T17:25:21.116Z",
9
"updatedAt": "2021-01-04T17:25:21.116Z"
10
}
Copied!

Perform check

ComplyCube will perform the check. You can retrieve a check's outcome and breakdown via the API.
If you have set up webhooks, a notification is sent upon completion of the check.

Example request for retrieving the check outcome

cURL
Node.js
Python
PHP
.NET
1
curl -X GET https://api.complycube.com/v1/checks/5ebd40714f23960008c81527 \
2
-H 'Authorization: <YOUR_API_KEY>'
Copied!
1
const check = await complycube.check.get("5ebd40714f23960008c81527");
Copied!
1
check = cc_api.checks.get('5ebd40714f23960008c81527')
Copied!
1
$check = $ccapi->checks()->get('5ebd40714f23960008c81527');
Copied!
1
var check = await checkApi.GetAsync("5ebd40714f23960008c81527");
Copied!

Example response

1
{
2
"id": "5ebd40714f23960008c81527",
3
"entityName": "John Doe",
4
"type": "document_check",
5
"clientId": "5eb04fcd0f3e360008035eb1",
6
"documentId": "5ebd40714f23960008c81527",
7
"status": "complete",
8
"result": {
9
"outcome": "clear",
10
"breakdown": {
11
"extractedData": {
12
"holderDetails": {
13
"entityName": "John Doe"
14
},
15
"documentDetails": {
16
"documentType": "bank_statement",
17
"issuer": "Barclays Bank",
18
"issuingDate": {
19
"day": 25,
20
"month": 1,
21
"year": 2021
22
}
23
},
24
"addressDetails": {
25
"address": {
26
"propertyNumber": "323",
27
"line": "Common street",
28
"city": "Aldgate",
29
"state": "London",
30
"postalCode": "W99 0RD",
31
"country": "GB",
32
"latLong": "51.5136,-0.077188"
33
},
34
"addressLine": "323 Common Street Aldgate London W99 0RD",
35
"addressCountry": "GB"
36
}
37
},
38
"clientValidation": {
39
"firstName": "clear",
40
"lastName": "clear",
41
"address": "clear"
42
},
43
"contentAnalysis": {
44
"documentAge": "clear"
45
},
46
"geoLocationAnalysis": {
47
"ipInAddressCountry": "clear",
48
"ipProximityToAddress": "clear"
49
}
50
}
51
},
52
"createdAt": "2020-01-04T17:25:21.116Z",
53
"updatedAt": "2020-01-04T17:25:21.116Z"
54
}
Copied!
Last modified 3mo ago