Payment Checkout
curl --request GET \
--url https://api.example.com/payment/checkoutimport requests
url = "https://api.example.com/payment/checkout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/payment/checkout', 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/checkout",
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/checkout"
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/checkout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment/checkout")
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 Checkout
Get payment checkout information
GET
/
payment
/
checkout
Payment Checkout
curl --request GET \
--url https://api.example.com/payment/checkoutimport requests
url = "https://api.example.com/payment/checkout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/payment/checkout', 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/checkout",
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/checkout"
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/checkout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment/checkout")
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 checkout information for a payment.
string
required
Payment ID to get checkout info for
boolean
Indicates if the request was successful
string
Payment ID
string
Payment status
string
Amount in cryptocurrency
string
Selected cryptocurrency
string
Cryptocurrency address
string
Checkout URL for customer
string
Payment expiration timestamp
Example Request
curl -X GET "https://api.transaction.gg/payment/checkout?paymentId=pay_abc123def456"
Example Response
{
"success": true,
"data": {
"id": "pay_abc123def456",
"status": "pending",
"amountCrypto": "0.00012345",
"crypto": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"checkoutUrl": "https://checkout.transaction.gg/pay_abc123def456",
"expiresAt": "2024-01-01T01:00:00Z"
}
}
Error Responses
{
"success": false,
"error": {
"status": 404,
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found"
},
"data": null
}
⌘I