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": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"status": "Completed",
"request": {
"transactionId": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD"
},
"response": {
"transactionId": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"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": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"status": "Completed",
"request": {
"transactionId": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"amount": "99.99",
"currency": "USD",
"paymentMethod": "CARD"
},
"response": {
"transactionId": "0191f6b2-7c4e-7a3b-9d52-3f8e1a6c4b07",
"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, within 5 minutes of server time), and x-signature (Base64-encoded HMAC-SHA256 signature). The string to sign is METHOD + "\n" + PATH + "\n" + TIMESTAMP + "\n" + SHA256(BODY). PATH is the endpoint path WITHOUT the /v1/terminal-gateway gateway prefix, for example /v1/terminals. SHA256(BODY) is the hex hash of the exact body you send. See the Authentication documentation.
Response
Transaction details
Was this page helpful?