Créer un client
Cet endpoint permet de créer un client avec ses informations personnelles et son adresse.
POST
https://api.digitalpaye.com/v1/customers/create
Headers
Name
Value
X-Environment
Production
Content-Type
application/json
Authorization
Bearer <
AccessToken>
Body Json
Name
Required
Description
Type
firstName
true
Prénom du client
String
lastName
true
Nom du client
String
true
Email du client
String
phoneNumber
true
Téléphone du client
String
Address
true
Adresse du client
Object
Response
{
"statusCode": 200,
"message": "Successful",
"data": {
"id": "8db1ad33-50d6-4e6f-9ec3-5f9169c621a6",
"lastName": "GUEI",
"firstName": "HELIE",
"email": "[email protected]",
"phoneNumber": "0151737309",
"address": {
"countryCode": "CI",
"city": "Abidjan",
"streetAddress": "Yopougon, Niangon"
},
"createdAt": "2025-03-28T06:54:41.000Z"
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.digitalpaye.com/v1/customers/create',
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 =>'{
"lastName": "GUEI",
"firstName": "HELIE",
"email": "[email protected]",
"phoneNumber": "0151737309",
"address": {
"countryCode": "CI",
"city": "Abidjan",
"streetAddress": "Yopougon, Niangon"
}
}',
CURLOPT_HTTPHEADER => array(
'X-Environment: Production',
'Content-Type: application/json',
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDQ4NjYsImV4cCI6MTc0MzE0NTQ2Nn0.wc9Na6-dRS2xVWekiysNCthn45gUkQAn5PK3AY03UR4'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Dernière mise à jour
Cet article vous a-t-il été utile ?