Skip to main content
GET
/
v1
/
terminal
/
payments
/
{id}
Get Terminal Payment Detail
curl --request GET \
  --url https://terminal-dev.xendit.co/v1/terminal/payments/{id} \
  --header 'Authorization: Basic <encoded-value>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://terminal-dev.xendit.co/v1/terminal/payments/{id}",
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/payments/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://terminal-dev.xendit.co/v1/terminal/payments/{id}"

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/payments/{id}"

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/payments/{id}', 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/payments/{id}")

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
{
  "payment_id": "abcd-3254fsd-3242",
  "country": "ID",
  "currency": "IDR",
  "request_amount": 100000,
  "status": "SUCCEEDED",
  "payment_details": {
    "terminal_id": "abcd-3254fsd-3242"
  },
  "updated": "2024-11-06T15:32:42Z",
  "business_id": "abcd-3254fsd-3242",
  "reference_id": "ref-12345",
  "customer_id": "cus-12345",
  "failure_code": "VOID_FAILED",
  "metadata": {},
  "created": "2024-11-06T15:32:42Z"
}
{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}
{
"error_code": "INVALID_REQUEST",
"message": "Missing required parameter: terminal_id"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

Terminal Payment ID

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}$

Response

Terminal Payment fetched successfully

payment_id
string
required
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}$
Example:

"abcd-3254fsd-3242"

type
enum<string>
required
Available options:
PAY,
PRE_AUTH
country
enum<string>
required
Available options:
ID,
VN,
TH,
MY
Example:

"ID"

currency
enum<string>
required
Available options:
IDR,
VND,
THB,
MYR
Example:

"IDR"

request_amount
number
required
Required range: x >= 1
Example:

100000

status
enum<string>
required
Available options:
SUCCEEDED,
VOIDED,
AUTHORIZED,
REVERSED
Example:

"SUCCEEDED"

payment_details
object
required
updated
string<date-time>
required
Example:

"2024-11-06T15:32:42Z"

business_id
string
Example:

"abcd-3254fsd-3242"

reference_id
string
Example:

"ref-12345"

customer_id
string
Example:

"cus-12345"

failure_code
string | null
Example:

"VOID_FAILED"

metadata
object
created
string<date-time>
Example:

"2024-11-06T15:32:42Z"