curl --request POST \
--url https://api.vellaro.io/api/v1/admin/iute/settings/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.vellaro.io/api/v1/admin/iute/settings/test"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.vellaro.io/api/v1/admin/iute/settings/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/iute/settings/test",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/iute/settings/test"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vellaro.io/api/v1/admin/iute/settings/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/iute/settings/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"environment": "test",
"ok": true,
"tested_at": "2023-11-07T05:31:56Z",
"checks": [
{
"name": "public_key",
"ok": true,
"code": "ok",
"http_status": 123,
"details": {}
}
],
"connection": {
"checked_at": "2023-11-07T05:31:56Z",
"ok_at": "2023-11-07T05:31:56Z",
"result": "ok",
"fresh": true,
"merchant_id": "<string>",
"status_path": "v2",
"status_path_verified": false,
"status_path_checked_at": "2023-11-07T05:31:56Z",
"pay_now_enabled": true,
"pay_in_parts_enabled": true,
"mapping_count": 123,
"probe_orders": [
{
"order_id": "<string>",
"created_at": "<string>",
"code": "ok",
"http_status": 123,
"variant": {
"currency": "ALL",
"lines": "raw",
"signed": true,
"repeat_of": "<string>",
"totals": "number",
"checkout_mode": "REDIRECT",
"signature": "valid",
"cart": "decimal",
"headers": "both",
"phone": "e164"
},
"has_checkout_url": true,
"rejected_fields": [
"<string>"
],
"reads": {},
"iute_code": "<string>",
"pay_now_enabled": true,
"pay_in_parts_enabled": true,
"session_id_shape": "<string>",
"body_keys": [
"<string>"
]
}
]
},
"recorded": true
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Test Connection (/iute/settings/test)
Le tre letture con le chiavi SALVATE dell’ambiente (environment del corpo, assente = quello salvato):
public_key (GET /client/eshop/settings), admin_key (GET /management/loan-product), limits
(range-set); da R1 anche status_path e product_mapping, informative. Esito per lettura: ok,
missing_key, key_rejected, unavailable, remote_error, keys_mismatch su public_key se le due chiavi
portano id del commerciante diversi, path_missing su status_path, e out_of_time per una lettura che il tetto
di tutta la prova (settings.TEST_BUDGET_S, sotto i 60 s di nginx) ha fermato; un errore di Iute NON è un errore
della rotta (200 con ok: false). Anche fermata dal tetto la prova si registra e si mette nell’audit prima della
risposta.
Registra l’esito nell’ambiente (connection.<env>: la riuscita vale 24 ore per accendere) e merchant_id_<env>
solo se la prova è riuscita e la risposta dell’admin key porta un solo id. Se le chiavi dell’ambiente cambiano
durante la prova l’esito si scarta (recorded: false). 409 iute.not_allowed (data = {environment}) senza
il permesso dell’hub: nessuna chiamata a Iute, nulla registrato, nessun audit. 429 oltre 5 prove al minuto per
negozio. Audit iute.connection_test con ambiente ed esiti, senza chiavi né risposte di Iute.
curl --request POST \
--url https://api.vellaro.io/api/v1/admin/iute/settings/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.vellaro.io/api/v1/admin/iute/settings/test"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.vellaro.io/api/v1/admin/iute/settings/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/iute/settings/test",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/iute/settings/test"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vellaro.io/api/v1/admin/iute/settings/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/iute/settings/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"environment": "test",
"ok": true,
"tested_at": "2023-11-07T05:31:56Z",
"checks": [
{
"name": "public_key",
"ok": true,
"code": "ok",
"http_status": 123,
"details": {}
}
],
"connection": {
"checked_at": "2023-11-07T05:31:56Z",
"ok_at": "2023-11-07T05:31:56Z",
"result": "ok",
"fresh": true,
"merchant_id": "<string>",
"status_path": "v2",
"status_path_verified": false,
"status_path_checked_at": "2023-11-07T05:31:56Z",
"pay_now_enabled": true,
"pay_in_parts_enabled": true,
"mapping_count": 123,
"probe_orders": [
{
"order_id": "<string>",
"created_at": "<string>",
"code": "ok",
"http_status": 123,
"variant": {
"currency": "ALL",
"lines": "raw",
"signed": true,
"repeat_of": "<string>",
"totals": "number",
"checkout_mode": "REDIRECT",
"signature": "valid",
"cart": "decimal",
"headers": "both",
"phone": "e164"
},
"has_checkout_url": true,
"rejected_fields": [
"<string>"
],
"reads": {},
"iute_code": "<string>",
"pay_now_enabled": true,
"pay_in_parts_enabled": true,
"session_id_shape": "<string>",
"body_keys": [
"<string>"
]
}
]
},
"recorded": true
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}