Auth
curl --request POST \
--url https://api.staging.paycodefintech.net/terminals/auth \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"current_versions": {
"acquirer_param_version": "v3.2.0",
"aid_version": "v1.3.0",
"biometric_key_version": "v1.2.0",
"capk_version": "v2.6.0",
"cvm_version": "v1.0.9",
"emv_key_version": "v2.7.0",
"file_key_version": "v3.4.0",
"firmware_version": "v2.4.2",
"fx_rates_version": "v1.3.0",
"hot_cards_version": "v1.1.0",
"pure_tags_version": "v3.2.0",
"tac_version": "v1.1.2",
"tms_param_version": "v4.0.5"
},
"device_health": {
"batterylevel": 85,
"signalstrength": "strong",
"tamperdetected": false,
"temperature": 36.5
},
"geolocation": {
"latitude": -1.2921,
"longitude": 36.8219
},
"terminal_id": "term_tPYmyt3FEfKl83JiHpb2"
}
'import requests
url = "https://api.staging.paycodefintech.net/terminals/auth"
payload = {
"current_versions": {
"acquirer_param_version": "v3.2.0",
"aid_version": "v1.3.0",
"biometric_key_version": "v1.2.0",
"capk_version": "v2.6.0",
"cvm_version": "v1.0.9",
"emv_key_version": "v2.7.0",
"file_key_version": "v3.4.0",
"firmware_version": "v2.4.2",
"fx_rates_version": "v1.3.0",
"hot_cards_version": "v1.1.0",
"pure_tags_version": "v3.2.0",
"tac_version": "v1.1.2",
"tms_param_version": "v4.0.5"
},
"device_health": {
"batterylevel": 85,
"signalstrength": "strong",
"tamperdetected": False,
"temperature": 36.5
},
"geolocation": {
"latitude": -1.2921,
"longitude": 36.8219
},
"terminal_id": "term_tPYmyt3FEfKl83JiHpb2"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
current_versions: {
acquirer_param_version: 'v3.2.0',
aid_version: 'v1.3.0',
biometric_key_version: 'v1.2.0',
capk_version: 'v2.6.0',
cvm_version: 'v1.0.9',
emv_key_version: 'v2.7.0',
file_key_version: 'v3.4.0',
firmware_version: 'v2.4.2',
fx_rates_version: 'v1.3.0',
hot_cards_version: 'v1.1.0',
pure_tags_version: 'v3.2.0',
tac_version: 'v1.1.2',
tms_param_version: 'v4.0.5'
},
device_health: {
batterylevel: 85,
signalstrength: 'strong',
tamperdetected: false,
temperature: 36.5
},
geolocation: {latitude: -1.2921, longitude: 36.8219},
terminal_id: 'term_tPYmyt3FEfKl83JiHpb2'
})
};
fetch('https://api.staging.paycodefintech.net/terminals/auth', 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.staging.paycodefintech.net/terminals/auth",
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([
'current_versions' => [
'acquirer_param_version' => 'v3.2.0',
'aid_version' => 'v1.3.0',
'biometric_key_version' => 'v1.2.0',
'capk_version' => 'v2.6.0',
'cvm_version' => 'v1.0.9',
'emv_key_version' => 'v2.7.0',
'file_key_version' => 'v3.4.0',
'firmware_version' => 'v2.4.2',
'fx_rates_version' => 'v1.3.0',
'hot_cards_version' => 'v1.1.0',
'pure_tags_version' => 'v3.2.0',
'tac_version' => 'v1.1.2',
'tms_param_version' => 'v4.0.5'
],
'device_health' => [
'batterylevel' => 85,
'signalstrength' => 'strong',
'tamperdetected' => false,
'temperature' => 36.5
],
'geolocation' => [
'latitude' => -1.2921,
'longitude' => 36.8219
],
'terminal_id' => 'term_tPYmyt3FEfKl83JiHpb2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.staging.paycodefintech.net/terminals/auth"
payload := strings.NewReader("{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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.staging.paycodefintech.net/terminals/auth")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.paycodefintech.net/terminals/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}"
response = http.request(request)
puts response.read_body{
"expires_in_seconds": 3600,
"network_token": "TI5vXQgbZZPHXP7TOCo0",
"sync_required": true,
"update_hints": {
"AID_version": "v2.1.6",
"CAPK_version": "v3.0.1"
}
}Terminal
Auth
Authorise a terminal to perform different action.
POST
/
terminals
/
auth
Auth
curl --request POST \
--url https://api.staging.paycodefintech.net/terminals/auth \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"current_versions": {
"acquirer_param_version": "v3.2.0",
"aid_version": "v1.3.0",
"biometric_key_version": "v1.2.0",
"capk_version": "v2.6.0",
"cvm_version": "v1.0.9",
"emv_key_version": "v2.7.0",
"file_key_version": "v3.4.0",
"firmware_version": "v2.4.2",
"fx_rates_version": "v1.3.0",
"hot_cards_version": "v1.1.0",
"pure_tags_version": "v3.2.0",
"tac_version": "v1.1.2",
"tms_param_version": "v4.0.5"
},
"device_health": {
"batterylevel": 85,
"signalstrength": "strong",
"tamperdetected": false,
"temperature": 36.5
},
"geolocation": {
"latitude": -1.2921,
"longitude": 36.8219
},
"terminal_id": "term_tPYmyt3FEfKl83JiHpb2"
}
'import requests
url = "https://api.staging.paycodefintech.net/terminals/auth"
payload = {
"current_versions": {
"acquirer_param_version": "v3.2.0",
"aid_version": "v1.3.0",
"biometric_key_version": "v1.2.0",
"capk_version": "v2.6.0",
"cvm_version": "v1.0.9",
"emv_key_version": "v2.7.0",
"file_key_version": "v3.4.0",
"firmware_version": "v2.4.2",
"fx_rates_version": "v1.3.0",
"hot_cards_version": "v1.1.0",
"pure_tags_version": "v3.2.0",
"tac_version": "v1.1.2",
"tms_param_version": "v4.0.5"
},
"device_health": {
"batterylevel": 85,
"signalstrength": "strong",
"tamperdetected": False,
"temperature": 36.5
},
"geolocation": {
"latitude": -1.2921,
"longitude": 36.8219
},
"terminal_id": "term_tPYmyt3FEfKl83JiHpb2"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
current_versions: {
acquirer_param_version: 'v3.2.0',
aid_version: 'v1.3.0',
biometric_key_version: 'v1.2.0',
capk_version: 'v2.6.0',
cvm_version: 'v1.0.9',
emv_key_version: 'v2.7.0',
file_key_version: 'v3.4.0',
firmware_version: 'v2.4.2',
fx_rates_version: 'v1.3.0',
hot_cards_version: 'v1.1.0',
pure_tags_version: 'v3.2.0',
tac_version: 'v1.1.2',
tms_param_version: 'v4.0.5'
},
device_health: {
batterylevel: 85,
signalstrength: 'strong',
tamperdetected: false,
temperature: 36.5
},
geolocation: {latitude: -1.2921, longitude: 36.8219},
terminal_id: 'term_tPYmyt3FEfKl83JiHpb2'
})
};
fetch('https://api.staging.paycodefintech.net/terminals/auth', 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.staging.paycodefintech.net/terminals/auth",
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([
'current_versions' => [
'acquirer_param_version' => 'v3.2.0',
'aid_version' => 'v1.3.0',
'biometric_key_version' => 'v1.2.0',
'capk_version' => 'v2.6.0',
'cvm_version' => 'v1.0.9',
'emv_key_version' => 'v2.7.0',
'file_key_version' => 'v3.4.0',
'firmware_version' => 'v2.4.2',
'fx_rates_version' => 'v1.3.0',
'hot_cards_version' => 'v1.1.0',
'pure_tags_version' => 'v3.2.0',
'tac_version' => 'v1.1.2',
'tms_param_version' => 'v4.0.5'
],
'device_health' => [
'batterylevel' => 85,
'signalstrength' => 'strong',
'tamperdetected' => false,
'temperature' => 36.5
],
'geolocation' => [
'latitude' => -1.2921,
'longitude' => 36.8219
],
'terminal_id' => 'term_tPYmyt3FEfKl83JiHpb2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.staging.paycodefintech.net/terminals/auth"
payload := strings.NewReader("{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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.staging.paycodefintech.net/terminals/auth")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.paycodefintech.net/terminals/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"current_versions\": {\n \"acquirer_param_version\": \"v3.2.0\",\n \"aid_version\": \"v1.3.0\",\n \"biometric_key_version\": \"v1.2.0\",\n \"capk_version\": \"v2.6.0\",\n \"cvm_version\": \"v1.0.9\",\n \"emv_key_version\": \"v2.7.0\",\n \"file_key_version\": \"v3.4.0\",\n \"firmware_version\": \"v2.4.2\",\n \"fx_rates_version\": \"v1.3.0\",\n \"hot_cards_version\": \"v1.1.0\",\n \"pure_tags_version\": \"v3.2.0\",\n \"tac_version\": \"v1.1.2\",\n \"tms_param_version\": \"v4.0.5\"\n },\n \"device_health\": {\n \"batterylevel\": 85,\n \"signalstrength\": \"strong\",\n \"tamperdetected\": false,\n \"temperature\": 36.5\n },\n \"geolocation\": {\n \"latitude\": -1.2921,\n \"longitude\": 36.8219\n },\n \"terminal_id\": \"term_tPYmyt3FEfKl83JiHpb2\"\n}"
response = http.request(request)
puts response.read_body{
"expires_in_seconds": 3600,
"network_token": "TI5vXQgbZZPHXP7TOCo0",
"sync_required": true,
"update_hints": {
"AID_version": "v2.1.6",
"CAPK_version": "v3.0.1"
}
}Authorizations
Use the API key created under your merchant account from the Paycode dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Body
application/json
Request body for terminal auth handshake
Request payload for POS login handshake
Terminal ID (required)
Terminal parameter versions (MOSOLO specification)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
token for session if available
Response
Terminal authorized
Response for parameter download request
Network token for authentication
Token expiration time in seconds
Required range:
x >= 0Whether synchronization is required
Update hints for newer versions available
Show child attributes
Show child attributes
⌘I