Payment sessions
Get Payment Session
Poll for a payment session result using the challengeId obtained from creating a payment session.
GET
/
terminal
/
payment-session
/
{challengeId}
Get payment session
curl --request GET \
--url https://api.authsignal.com/v1/terminal/payment-session/{challengeId} \
--header 'x-authsignal-terminal: <api-key>'import requests
url = "https://api.authsignal.com/v1/terminal/payment-session/{challengeId}"
headers = {"x-authsignal-terminal": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-authsignal-terminal': '<api-key>'}};
fetch('https://api.authsignal.com/v1/terminal/payment-session/{challengeId}', 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.authsignal.com/v1/terminal/payment-session/{challengeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-authsignal-terminal: <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"
"net/http"
"io"
)
func main() {
url := "https://api.authsignal.com/v1/terminal/payment-session/{challengeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-authsignal-terminal", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.authsignal.com/v1/terminal/payment-session/{challengeId}")
.header("x-authsignal-terminal", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.authsignal.com/v1/terminal/payment-session/{challengeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-authsignal-terminal"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"challengeId": "ef6b3212-6121-4a9e-92ef-09d819e36e93",
"status": "PENDING",
"reference": "xxx-xxx-xxx"
}Authorizations
Use your terminal ID obtained from the on-boarded device. This unique identifier is required to authenticate requests to the payment session APIs from your point of sale terminal.
Path Parameters
The ID of the payment session.
Was this page helpful?
⌘I
Get payment session
curl --request GET \
--url https://api.authsignal.com/v1/terminal/payment-session/{challengeId} \
--header 'x-authsignal-terminal: <api-key>'import requests
url = "https://api.authsignal.com/v1/terminal/payment-session/{challengeId}"
headers = {"x-authsignal-terminal": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-authsignal-terminal': '<api-key>'}};
fetch('https://api.authsignal.com/v1/terminal/payment-session/{challengeId}', 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.authsignal.com/v1/terminal/payment-session/{challengeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-authsignal-terminal: <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"
"net/http"
"io"
)
func main() {
url := "https://api.authsignal.com/v1/terminal/payment-session/{challengeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-authsignal-terminal", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.authsignal.com/v1/terminal/payment-session/{challengeId}")
.header("x-authsignal-terminal", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.authsignal.com/v1/terminal/payment-session/{challengeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-authsignal-terminal"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"challengeId": "ef6b3212-6121-4a9e-92ef-09d819e36e93",
"status": "PENDING",
"reference": "xxx-xxx-xxx"
}
