Required headers
Chaque requête doit contenir trois en-têtes obligatoires :
X-Timestamp | Timestamp Unix en secondes |
X-Signature | Signature HMAC-SHA256 de la requête au format hex |
X-Client-Id | ID de votre marchand |
Signature generation
La signature est générée à partir du timestamp et du corps de la requête.
Format :
{timestamp}.{canonicalBody}
Format description
timestamp | Heure Unix actuelle en secondes |
canonicalBody | Corps JSON de la requête converti au format canonique |
Algorithme de signature :
Exigences importantes :
Exemples :
Authorization errors
401 Invalid X-Timestamp
{
"status": 401,
"message": "Invalid X-Timestamp"
}401 Expired X-Timestamp
{
"status": 401,
"message": "Expired X-Timestamp"
}401 Invalid X-Signature
{
"status": 401,
"message": "Invalid X-Signature"
}401 Invalid token
{
"status": 401,
"message": "Invalid token"
}401 Merchant secret not configured
{
"status": 401,
"message": "Merchant secret not configured"
}500 Internal Server Error
{
"status": 500,
"message": "Internal Server Error"
}