Create Customer(Tier 1)
This endpoint is used to create an account for a tier 1 customer account. A customer tracking ID is returned which can be used for basic integration on 1app/Boldd ecosystem.
POST {{base_url}}/business/create-tier1
Headers
Name
Type
Description
Authorization*
String
SECRET_KEY
Request Body
Name
Type
Description
first_name*
Sting
Customer first name e.g John
last_name*
String
Customer lastname e.g Doe
phone_number*
String
Customer mobile number e.g 07012345689
birth_date*
String
Customer Date of birth in format yyyy-mm-dd. Must be at least 18 years old. e.g 2000-03-23
nationality*
String
Nigeria
Your secret keys are to be kept secret and only stored on your servers. Do not pass your secret key to the front-end language where it can be exploited.
Take a look at how you might do this:
curl --location '{{base_url}}/business/create-tier1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
--data-raw '{
"first_name": "John",
"last_name": "Doe",
"phone_number": "07012345678",
"birth_date": "2000-03-23",
"natioanality": "Nigeria",
"email_address": "[email protected]"
}'const axios = require('axios');
let data = JSON.stringify({
"first_name": "John",
"last_name": "Doe",
"phone_number": "07012345678",
"birth_date": "2000-03-23",
"natioanality": "Nigeria",
"email_address": "[email protected]"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: '{{base_url}}/business/create-tier1',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer SECRET_KEY'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{base_url}}/business/create-tier1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"first_name": "John",
"last_name": "Doe",
"phone_number": "07012345678",
"birth_date": "2000-03-23",
"natioanality": "Nigeria",
"email_address": "[email protected]"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer SECRET_KEY',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer SECRET_KEY'
};
var request = http.Request('POST', Uri.parse('{{base_url}}/business/create-tier1'));
request.body = json.encode({
"first_name": "John",
"last_name": "Doe",
"phone_number": "07012345678",
"birth_date": "2000-03-23",
"natioanality": "Nigeria",
"email_address": "[email protected]"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Sample response
{
"status": true,
"responsecode": "01",
"message": "Tier 1 account successfully created for John Doe",
"trackid": "06211211"
}{
"status": false,
"responsecode": "00",
"message": "Unable to process request. Invalid authorization key",
"trackid": ""
}Last updated
Was this helpful?