Payment Status
curl --request GET \
--url https://api.example.com/payment/statusimport requests
url = "https://api.example.com/payment/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/payment/status', 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.example.com/payment/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/payment/status"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/payment/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": false,
"error": {
"status": 404,
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found"
},
"data": null
}
Payments
Payment Status
Get payment status and details
GET
/
payment
/
status
Payment Status
curl --request GET \
--url https://api.example.com/payment/statusimport requests
url = "https://api.example.com/payment/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/payment/status', 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.example.com/payment/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/payment/status"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/payment/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": false,
"error": {
"status": 404,
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found"
},
"data": null
}
Get the current status and details of a payment.
string
required
Payment ID to check status for
boolean
Indicates if the request was successful
string
Payment ID
string
Payment status (pending, completed, expired)
string
Amount in cryptocurrency
string
Selected cryptocurrency
string
Cryptocurrency address
string
Transaction hash (if completed)
string
Completion timestamp (if completed)
Example Request
curl -X GET "https://api.transaction.gg/payment/status?paymentId=pay_abc123def456"
Example Response
{
"success": true,
"data": {
"id": "pay_abc123def456",
"status": "completed",
"amountCrypto": "0.00012345",
"crypto": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"incomingTxHash": "abc123...",
"completedAt": "2024-01-01T00:30:00Z",
"customerId": "cus_V6n6SN2KnsIFCuQU",
"orderId": "order_123",
"metadata": {
"description": "Premium subscription"
}
}
}
Error Responses
{
"success": false,
"error": {
"status": 404,
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found"
},
"data": null
}
⌘I