Authentication - POST Eligibility Check
curl --request POST \
--url https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"eligibility_check_data": {
"click_to_pay": {
"visa": {
"consumerPresent": true,
"consumerStatus": "<string>",
"customData": {
"color_depth": 1,
"java_enabled": true,
"java_script_enabled": true,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
},
"mastercard": {
"consumerPresent": true,
"idLookupSessionId": "<string>",
"lastUsedCardTimestamp": "<string>"
}
}
},
"client_secret": "<string>"
}
'import requests
url = "https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check"
payload = {
"eligibility_check_data": { "click_to_pay": {
"visa": {
"consumerPresent": True,
"consumerStatus": "<string>",
"customData": {
"color_depth": 1,
"java_enabled": True,
"java_script_enabled": True,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
},
"mastercard": {
"consumerPresent": True,
"idLookupSessionId": "<string>",
"lastUsedCardTimestamp": "<string>"
}
} },
"client_secret": "<string>"
}
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({
eligibility_check_data: {
click_to_pay: {
visa: {
consumerPresent: true,
consumerStatus: '<string>',
customData: {
color_depth: 1,
java_enabled: true,
java_script_enabled: true,
language: '<string>',
screen_height: 1,
screen_width: 1,
time_zone: 123,
ip_address: '<string>',
accept_header: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
user_agent: '<string>',
os_type: '<string>',
os_version: '<string>',
device_model: '<string>',
accept_language: '<string>',
referer: '<string>'
}
},
mastercard: {
consumerPresent: true,
idLookupSessionId: '<string>',
lastUsedCardTimestamp: '<string>'
}
}
},
client_secret: '<string>'
})
};
fetch('https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check', 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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check",
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([
'eligibility_check_data' => [
'click_to_pay' => [
'visa' => [
'consumerPresent' => true,
'consumerStatus' => '<string>',
'customData' => [
'color_depth' => 1,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => '<string>',
'screen_height' => 1,
'screen_width' => 1,
'time_zone' => 123,
'ip_address' => '<string>',
'accept_header' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'user_agent' => '<string>',
'os_type' => '<string>',
'os_version' => '<string>',
'device_model' => '<string>',
'accept_language' => '<string>',
'referer' => '<string>'
]
],
'mastercard' => [
'consumerPresent' => true,
'idLookupSessionId' => '<string>',
'lastUsedCardTimestamp' => '<string>'
]
]
],
'client_secret' => '<string>'
]),
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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check"
payload := strings.NewReader("{\n \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check")
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 \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"authentication_id": "auth_mbabizu24mvu3mela5njyhpit4",
"sdk_next_action": "await_merchant_callback"
}Authentication
Authentication - POST Eligibility Check
POST
/
authentication
/
{authentication_id}
/
eligibility-check
Authentication - POST Eligibility Check
curl --request POST \
--url https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"eligibility_check_data": {
"click_to_pay": {
"visa": {
"consumerPresent": true,
"consumerStatus": "<string>",
"customData": {
"color_depth": 1,
"java_enabled": true,
"java_script_enabled": true,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
},
"mastercard": {
"consumerPresent": true,
"idLookupSessionId": "<string>",
"lastUsedCardTimestamp": "<string>"
}
}
},
"client_secret": "<string>"
}
'import requests
url = "https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check"
payload = {
"eligibility_check_data": { "click_to_pay": {
"visa": {
"consumerPresent": True,
"consumerStatus": "<string>",
"customData": {
"color_depth": 1,
"java_enabled": True,
"java_script_enabled": True,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
},
"mastercard": {
"consumerPresent": True,
"idLookupSessionId": "<string>",
"lastUsedCardTimestamp": "<string>"
}
} },
"client_secret": "<string>"
}
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({
eligibility_check_data: {
click_to_pay: {
visa: {
consumerPresent: true,
consumerStatus: '<string>',
customData: {
color_depth: 1,
java_enabled: true,
java_script_enabled: true,
language: '<string>',
screen_height: 1,
screen_width: 1,
time_zone: 123,
ip_address: '<string>',
accept_header: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
user_agent: '<string>',
os_type: '<string>',
os_version: '<string>',
device_model: '<string>',
accept_language: '<string>',
referer: '<string>'
}
},
mastercard: {
consumerPresent: true,
idLookupSessionId: '<string>',
lastUsedCardTimestamp: '<string>'
}
}
},
client_secret: '<string>'
})
};
fetch('https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check', 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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check",
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([
'eligibility_check_data' => [
'click_to_pay' => [
'visa' => [
'consumerPresent' => true,
'consumerStatus' => '<string>',
'customData' => [
'color_depth' => 1,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => '<string>',
'screen_height' => 1,
'screen_width' => 1,
'time_zone' => 123,
'ip_address' => '<string>',
'accept_header' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'user_agent' => '<string>',
'os_type' => '<string>',
'os_version' => '<string>',
'device_model' => '<string>',
'accept_language' => '<string>',
'referer' => '<string>'
]
],
'mastercard' => [
'consumerPresent' => true,
'idLookupSessionId' => '<string>',
'lastUsedCardTimestamp' => '<string>'
]
]
],
'client_secret' => '<string>'
]),
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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check"
payload := strings.NewReader("{\n \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\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://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/authentication/{authentication_id}/eligibility-check")
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 \"eligibility_check_data\": {\n \"click_to_pay\": {\n \"visa\": {\n \"consumerPresent\": true,\n \"consumerStatus\": \"<string>\",\n \"customData\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n },\n \"mastercard\": {\n \"consumerPresent\": true,\n \"idLookupSessionId\": \"<string>\",\n \"lastUsedCardTimestamp\": \"<string>\"\n }\n }\n },\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"authentication_id": "auth_mbabizu24mvu3mela5njyhpit4",
"sdk_next_action": "await_merchant_callback"
}Authorizations
Publishable keys are a type of keys that can be public and have limited scope of usage.
Body
application/json
Response
Eligibility Performed for the Authentication
Was this page helpful?
⌘I