Get Transaction
curl --request GET \
--url https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}', 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.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}",
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-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"
"net/http"
"io"
)
func main() {
url := "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"transactionId": "TXN-20240115-001",
"status": "Completed",
"request": {
"transactionId": "TXN-20240115-001",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD"
},
"response": {
"transactionId": "TXN-20240115-001",
"status": "SUCCESS",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD",
"authorizationCode": "AUTH123456",
"timestamp": "2024-01-15T10:37:30.000Z"
},
"createdAt": "2024-01-15T10:37:00.000Z",
"updatedAt": "2024-01-15T10:37:30.000Z",
"completedAt": "2024-01-15T10:37:30.000Z",
"timestamp": "2024-01-15T10:40:00.000Z"
}Terminal Gateway API
Retrieve Transaction
Retrieve transaction status for reconciliation or post-timeout verification
GET
/
v1
/
transactions
/
{transactionId}
Get Transaction
curl --request GET \
--url https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}', 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.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}",
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-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"
"net/http"
"io"
)
func main() {
url := "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/transactions/{transactionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"transactionId": "TXN-20240115-001",
"status": "Completed",
"request": {
"transactionId": "TXN-20240115-001",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD"
},
"response": {
"transactionId": "TXN-20240115-001",
"status": "SUCCESS",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD",
"authorizationCode": "AUTH123456",
"timestamp": "2024-01-15T10:37:30.000Z"
},
"createdAt": "2024-01-15T10:37:00.000Z",
"updatedAt": "2024-01-15T10:37:30.000Z",
"completedAt": "2024-01-15T10:37:30.000Z",
"timestamp": "2024-01-15T10:40:00.000Z"
}This endpoint requires HMAC-SHA256 authentication. See Authentication for signature computation details.
When to Use This Endpoint
- After payment timeout - Check if the payment completed after a 504 response
- Reconciliation - Verify transaction status for accounting purposes
- Status polling - Check on pending transactions
Transaction Status Values
| Status | Description |
|---|---|
Pending | Transaction created, awaiting terminal response |
Completed | Transaction completed successfully |
Failed | Transaction failed (check error details in response) |
Cancelled | Transaction was cancelled |
AwaitingReconnect | Terminal disconnected mid-payment, waiting for reconnection |
Voided | Payment was voided (terminal reconnected after grace period) |
Voided Transactions
A transaction may be voided if:- Terminal disconnected during payment processing
- 60-second grace period expired
- Terminal reconnected with a successful payment result
- Payment was automatically voided to prevent orphaned charges
Voided transaction was auto-reversed after the terminal reconnected past the grace window; the void is signalled in real time by the paymentVoided WebSocket notification.Authorizations
HMAC-SHA256 authentication. Requires three headers: x-api-key (your API key), x-timestamp (ISO 8601 timestamp), and x-signature (Base64-encoded HMAC-SHA256 signature). See Authentication documentation for signature computation.
Path Parameters
The transaction ID to query
Response
Transaction details
Unique transaction identifier
Transaction lifecycle status. The GET transaction endpoint serializes this in PascalCase (Rust Debug of the status), so branch on these exact values.
Available options:
Pending, Completed, Failed, Cancelled, AwaitingReconnect, Voided Show child attributes
Show child attributes
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
ISO 8601 timestamp of this response
Show child attributes
Show child attributes
ISO 8601 timestamp of completion
Was this page helpful?