List Terminal Payment Sessions
curl --request GET \
--url https://terminal-dev.xendit.co/v1/terminal/sessions \
--header 'Authorization: Basic <encoded-value>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://terminal-dev.xendit.co/v1/terminal/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://terminal-dev.xendit.co/v1/terminal/sessions")
.header("Authorization", "Basic <encoded-value>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://terminal-dev.xendit.co/v1/terminal/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import requests
url = "https://terminal-dev.xendit.co/v1/terminal/sessions"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://terminal-dev.xendit.co/v1/terminal/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://terminal-dev.xendit.co/v1/terminal/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"has_more": false,
"data": [
{
"payment_session_id": "<string>",
"latest_payment_id": "<string>",
"business_id": "<string>",
"reference_id": "ref_123456789",
"session_type": "PAY",
"amount": 2,
"mode": "TERMINAL",
"channel_properties": {
"terminal_id": "abcd-3254fsd-3242",
"order_id": "order-12345",
"payment_methods": []
},
"created": "2024-11-06T15:32:42Z",
"updated": "2024-11-06T15:32:42Z",
"customer_id": "cus_123456789",
"description": "Payment for order #123",
"metadata": {},
"canceled_at": "2023-11-07T05:31:56Z"
}
],
"links": [
{
"rel": "next",
"href": "/v1/terminal/sessions?reference_id=ref_123456789&after_id=00000000-0000-0000-0000-000000000000",
"method": "GET"
}
]
}{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}Terminal API (H2H)
List Terminal Payment Sessions
GET
/
v1
/
terminal
/
sessions
List Terminal Payment Sessions
curl --request GET \
--url https://terminal-dev.xendit.co/v1/terminal/sessions \
--header 'Authorization: Basic <encoded-value>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://terminal-dev.xendit.co/v1/terminal/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://terminal-dev.xendit.co/v1/terminal/sessions")
.header("Authorization", "Basic <encoded-value>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://terminal-dev.xendit.co/v1/terminal/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import requests
url = "https://terminal-dev.xendit.co/v1/terminal/sessions"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://terminal-dev.xendit.co/v1/terminal/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://terminal-dev.xendit.co/v1/terminal/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"has_more": false,
"data": [
{
"payment_session_id": "<string>",
"latest_payment_id": "<string>",
"business_id": "<string>",
"reference_id": "ref_123456789",
"session_type": "PAY",
"amount": 2,
"mode": "TERMINAL",
"channel_properties": {
"terminal_id": "abcd-3254fsd-3242",
"order_id": "order-12345",
"payment_methods": []
},
"created": "2024-11-06T15:32:42Z",
"updated": "2024-11-06T15:32:42Z",
"customer_id": "cus_123456789",
"description": "Payment for order #123",
"metadata": {},
"canceled_at": "2023-11-07T05:31:56Z"
}
],
"links": [
{
"rel": "next",
"href": "/v1/terminal/sessions?reference_id=ref_123456789&after_id=00000000-0000-0000-0000-000000000000",
"method": "GET"
}
]
}{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
Filter sessions by reference ID
Maximum number of sessions to return
Required range:
1 <= x <= 100Cursor for forward pagination
Pattern:
^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$Cursor for backward pagination
Pattern:
^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$⌘I