Create Contact
POSThttps://api.cleverhub.co/api/v2/contacts
When processing a Payin
or Payout
transaction, if the require_contact
parameter is true
, you need to create a new contact before proceeding with the transaction. Each contact will have a unique email associated with it, ensuring that the user’s information is complete before continuing with the payment process. This email will be used during the process of calling the API to create a Payin
or Payout
transaction.
After successfully creating the contact, you need to perform KYC (Know Your Customer)
verification for this contact if the Payin
or Payout
methods require KYC(require_kyc == true
). This will be done through the Submit KYC API
provided below. If KYC is not required, you can proceed with the transaction process without further verification. Ensure that these steps are completed thoroughly and accurately to maintain security and compliance. Wishing you success in carrying out this process!
Request
- application/json
Body
Contact's email. This email will be used during the process of calling the API to create a Payin
or Payout
transaction. A new contact must be created to continue the payment process.
Contact's first name
Contact's last name
The type of contact (e.g., individual or organization)
Possible values: [individual
, organization
]
individual
Contact's date of birth, format 'yyyy-mm-dd'
Contact registration number, required if type
is organization
Contact's phone number
+1234567890
Contact's gender
Possible values: [male
, female
]
male
The primary name of an address's street for the contact.
Name of an address's city or town for the contact.
The contact's address's postcode
The contact's address's state / province / county.
ISO 3166-1 alpha-2 country code of the contact's country.
Responses
- 200
- 400
- 401
- 422
Created
- application/json
- Schema
- Example (auto)
- Example
Schema
{
"email": "string"
}
{
"email": "test@helloclever.co"
}
Bad Request
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object
{
"errors": {
"code": "string",
"message": "string"
}
}
{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}
Unprocessable Entity
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object
{
"errors": {
"message": "string"
}
}
{
"errors": {
"message": "Email can't be blank"
}
}
Authorization: app-id
name: app-idtype: apiKeydescription: The app-id is registered and secured inside Hello Clever system and only required when client has initiated or in the middle of the transaction.in: header
name: secret-keytype: apiKeydescription: The secret-key is our client's secret of the source. Required if a publishable key is used to retrieve the source.in: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v2/contacts");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"email\": \"test@helloclever.co\",\n \"first_name\": \"Luxy\",\n \"last_name\": \"Tran\",\n \"type\": \"individual\",\n \"dob\": \"1991-12-24\",\n \"reg_no\": \"123456789\",\n \"phone\": \"+6123224242\",\n \"gender\": \"male\",\n \"street\": \"338 George Street\",\n \"city\": \"Sydney\",\n \"postal_code\": \"2000\",\n \"state\": \"New South Wales\",\n \"country\": \"AU\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());