Ajouter une IP autorisée
curl --request POST \
--url https://apidjonanko.tech/web-merchant/allowed-ips \
--header 'Content-Type: application/json' \
--header 'authenticationtoken: <api-key>' \
--data '
{
"merchant_reference": "beautyshop",
"ipAddress": "41.207.12.34"
}
'const options = {
method: 'POST',
headers: {authenticationtoken: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchant_reference: 'beautyshop', ipAddress: '41.207.12.34'})
};
fetch('https://apidjonanko.tech/web-merchant/allowed-ips', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apidjonanko.tech/web-merchant/allowed-ips"
payload = {
"merchant_reference": "beautyshop",
"ipAddress": "41.207.12.34"
}
headers = {
"authenticationtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apidjonanko.tech/web-merchant/allowed-ips",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_reference' => 'beautyshop',
'ipAddress' => '41.207.12.34'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authenticationtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ipAddress": "41.207.12.34",
"label": "Serveur de production",
"createdAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 400,
"message": "Cette adresse IP est déjà enregistrée",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid API credentials",
"error": "Unauthorized"
}Sécurité — IPs autorisées
Ajouter une IP autorisée
Accepte une IPv4, une IPv6 ou une plage CIDR (ex. 41.207.12.0/24). Maximum 20 entrées par marchand.
POST
/
web-merchant
/
allowed-ips
Ajouter une IP autorisée
curl --request POST \
--url https://apidjonanko.tech/web-merchant/allowed-ips \
--header 'Content-Type: application/json' \
--header 'authenticationtoken: <api-key>' \
--data '
{
"merchant_reference": "beautyshop",
"ipAddress": "41.207.12.34"
}
'const options = {
method: 'POST',
headers: {authenticationtoken: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchant_reference: 'beautyshop', ipAddress: '41.207.12.34'})
};
fetch('https://apidjonanko.tech/web-merchant/allowed-ips', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apidjonanko.tech/web-merchant/allowed-ips"
payload = {
"merchant_reference": "beautyshop",
"ipAddress": "41.207.12.34"
}
headers = {
"authenticationtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apidjonanko.tech/web-merchant/allowed-ips",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_reference' => 'beautyshop',
'ipAddress' => '41.207.12.34'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authenticationtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ipAddress": "41.207.12.34",
"label": "Serveur de production",
"createdAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 400,
"message": "Cette adresse IP est déjà enregistrée",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid API credentials",
"error": "Unauthorized"
}Whitelisting obligatoire à partir du 25 septembre 2026. Guide : Whitelisting IP.
Authorizations
JWT obtenu via POST /user/login-merchant. À passer tel quel, sans préfixe Bearer.
Body
application/json
