curl --request POST \
--url https://api.nayax.com/sdk/validate-merchant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokenId": 116383,
"actorId": "someActorId",
"machineId": "0434334921100366",
"random": "123456789qwertyui",
"cipher": "X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw="
}
'import requests
url = "https://api.nayax.com/sdk/validate-merchant"
payload = {
"tokenId": 116383,
"actorId": "someActorId",
"machineId": "0434334921100366",
"random": "123456789qwertyui",
"cipher": "X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw="
}
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({
tokenId: 116383,
actorId: 'someActorId',
machineId: '0434334921100366',
random: '123456789qwertyui',
cipher: 'X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw='
})
};
fetch('https://api.nayax.com/sdk/validate-merchant', 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.nayax.com/sdk/validate-merchant",
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([
'tokenId' => 116383,
'actorId' => 'someActorId',
'machineId' => '0434334921100366',
'random' => '123456789qwertyui',
'cipher' => 'X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw='
]),
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.nayax.com/sdk/validate-merchant"
payload := strings.NewReader("{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}")
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.nayax.com/sdk/validate-merchant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nayax.com/sdk/validate-merchant")
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 = "{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}"
response = http.request(request)
puts response.read_body{
"verdict": "Approved",
"code": 0,
"statusMessage": "Merchant authenticated successfully.",
"customDeclineCode": "9515af0d6b5c328b6383ff241fa7b03e489d6285a8db6a4f0d8369e3f044e8d7"
}Validate Merchant (Start Authentication)
curl --request POST \
--url https://api.nayax.com/sdk/validate-merchant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokenId": 116383,
"actorId": "someActorId",
"machineId": "0434334921100366",
"random": "123456789qwertyui",
"cipher": "X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw="
}
'import requests
url = "https://api.nayax.com/sdk/validate-merchant"
payload = {
"tokenId": 116383,
"actorId": "someActorId",
"machineId": "0434334921100366",
"random": "123456789qwertyui",
"cipher": "X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw="
}
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({
tokenId: 116383,
actorId: 'someActorId',
machineId: '0434334921100366',
random: '123456789qwertyui',
cipher: 'X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw='
})
};
fetch('https://api.nayax.com/sdk/validate-merchant', 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.nayax.com/sdk/validate-merchant",
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([
'tokenId' => 116383,
'actorId' => 'someActorId',
'machineId' => '0434334921100366',
'random' => '123456789qwertyui',
'cipher' => 'X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw='
]),
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.nayax.com/sdk/validate-merchant"
payload := strings.NewReader("{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}")
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.nayax.com/sdk/validate-merchant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nayax.com/sdk/validate-merchant")
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 = "{\n \"tokenId\": 116383,\n \"actorId\": \"someActorId\",\n \"machineId\": \"0434334921100366\",\n \"random\": \"123456789qwertyui\",\n \"cipher\": \"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw=\"\n}"
response = http.request(request)
puts response.read_body{
"verdict": "Approved",
"code": 0,
"statusMessage": "Merchant authenticated successfully.",
"customDeclineCode": "9515af0d6b5c328b6383ff241fa7b03e489d6285a8db6a4f0d8369e3f044e8d7"
}Authorizations
JWT RSA token required for authentication. The token should be included in the Authorization header as Bearer <token>.
Nayax will issue tokens to the VAS, signed by a private key, and decrypt them using a public key.
Body
Request to validate the merchant and initiate authentication.
Request body for validating a merchant and initiating authentication.
Token ID provided by Nayax to the VAS.
116383
The unique identifier for the actor/integrator.
"someActorId"
Machine ID allocated in the Nayax Backoffice.
"0434334921100366"
A 27-character random string generated by Nayax and sent to the Integrator.
"123456789qwertyui"
A 64-character long ciphertext generated by the Integrator by encrypting the Ecom Transaction ID||=||Random String using AES in ECB mode with an encryption key derived from the Secret Token.
"X305dITNTAw2vHsxE+taVcn6UvgBC3fdI6QbqeABgHbo8CKsoZhqISJfslehCiA+L7XYrqvKFci7C6BNj/trBuNJwBEjgBzKhhgpJ5ggnw="
Response
Success
General status object for API responses.
Const string values 'Approved' or 'Declined'.
"Approved"
Response code. 0 for Approved, relevant decline code for Declined.
0
Optional. Session status message free text field or additional varying data.
255"Transaction processed successfully."
Custom decline code, can also be used to return the HashedEcomTransactionId for validate-merchant success.
"9515af0d6b5c328b6383ff241fa7b03e489d6285a8db6a4f0d8369e3f044e8d7"
Was this page helpful?