CryptoExchange API :: Create a customer
Create a customer
Creating a new customer on Cryptoexchange.com is quite straight forward. The minimal amount of information required is the customers email address. Specifying the customers name, address, phone number and disbursement methods are optional. However within the address and disbursement methods, there are required fields that must be supplied in order for the request to be considered valid.
You are only able to create customers where their email address is not already in use. Creating an account for a user that already exists will result in an error, and an HTTP 403 will be returned. Once a customer has been created, either through the API or if they've signed up themselves, their information can no longer be provided by API integrations.
Once a customer has been created, they will then receive an email introducing them to Cryptoexchange.com and to log in and set their password.
curl 'https://cryptoexchange.com/api/v1/escrow/partner/customers' \
-X POST \
-H 'Authorization:Bearer your-api-key' \
-H 'Content-Type: application/json' \
-d '
{
"email": "[email protected]",
"first_name": "Johny",
"middle_name": "Kanez",
"last_name": "Smith",
"address": {
"line1": "East Lane",
"line2": "Apartment 2",
"city": "San Francisco",
"state": "CA",
"country": "US",
"post_code": 10203
},
"phone_number": 8885118600
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/customers',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS =>'{
"email": "[email protected]",
"first_name": "Johny",
"middle_name": "Kanez",
"last_name": "Smith",
"address": {
"line1": "East Lane",
"line2": "Apartment 2",
"city": "San Francisco",
"state": "CA",
"country": "US",
"post_code": 10203
},
"phone_number": 8885118600
}'
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);
Getting customer details
Retrieve your own customer details using the CustomerID resource.
curl 'https://cryptoexchange.com/api/v1/escrow/partner/customer/123' \
-H Authorization:Bearer your-api-key
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/customer/123',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);
Example Response
{
"id": 2548,
"username": "",
"first_name": "Johny",
"middle_name": null,
"last_name": "Smith",
"company_name": null,
"gender": null,
"date_of_birth": null,
"email": "[email protected]",
"status": 1,
"country": null,
"customer_group_id": 2,
"subscribed_to_news_letter": 0,
"created_at": "2022-08-01T21:38:51.000000Z",
"updated_at": "2022-08-01T21:38:51.000000Z",
"is_verified": 1,
"token": null,
"notes": null,
"phone": null,
"is_phone_verified": 0,
"is_company": 0,
"last_login_at": null,
"last_login_ip": null,
"last_login_host": null,
"partner_id": 636,
"reason_for_deletion": null,
"deleted_at": null
}