curl --request GET \
--url https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId}"
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}', 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.agentaos.ai/api/v1/gateway/sessions/{sessionId}",
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}"
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "<string>",
"idempotency_key": "<string>",
"amount_override": 123,
"currency": "<string>",
"metadata": {},
"webhook_url": "<string>",
"success_url": "<string>",
"cancel_url": "<string>",
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supported_networks": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkoutUrl": "<string>",
"amount": 123,
"link_amount": 123,
"link_currency": "<string>",
"link_description": "<string>",
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_method": "<string>"
}
],
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "<string>",
"amount": 123,
"currency": "<string>",
"payment_token": "<string>",
"fiat_amount": 123,
"exchange_rate": 123,
"exchange_rate_source": "<string>",
"tax_rate": 123,
"tax_amount": 123,
"tax_name": "<string>",
"tax_inclusive": true,
"merchant_name": "<string>",
"buyer_email": "<string>",
"buyer_name": "<string>",
"buyer_company": "<string>",
"buyer_country": "<string>",
"buyer_vat": "<string>",
"tx_hash": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>"
}{
"statusCode": 401,
"message": "Invalid API key",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 403,
"message": "Payment link belongs to another organization",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 404,
"message": "Payment link not found",
"timestamp": "2026-08-06T12:00:00.000Z"
}Retrieve a checkout
Adds a computed amount (the effective price: amount_override, else the linked payment link’s amount), plus the link’s own link_amount/link_currency/link_description, and the checkout’s transactions and invoices arrays.
curl --request GET \
--url https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId}"
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}', 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.agentaos.ai/api/v1/gateway/sessions/{sessionId}",
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}"
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.agentaos.ai/api/v1/gateway/sessions/{sessionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "<string>",
"idempotency_key": "<string>",
"amount_override": 123,
"currency": "<string>",
"metadata": {},
"webhook_url": "<string>",
"success_url": "<string>",
"cancel_url": "<string>",
"tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supported_networks": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"checkoutUrl": "<string>",
"amount": 123,
"link_amount": 123,
"link_currency": "<string>",
"link_description": "<string>",
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_method": "<string>"
}
],
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "<string>",
"amount": 123,
"currency": "<string>",
"payment_token": "<string>",
"fiat_amount": 123,
"exchange_rate": 123,
"exchange_rate_source": "<string>",
"tax_rate": 123,
"tax_amount": 123,
"tax_name": "<string>",
"tax_inclusive": true,
"merchant_name": "<string>",
"buyer_email": "<string>",
"buyer_name": "<string>",
"buyer_company": "<string>",
"buyer_country": "<string>",
"buyer_vat": "<string>",
"tx_hash": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>"
}{
"statusCode": 401,
"message": "Invalid API key",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 403,
"message": "Payment link belongs to another organization",
"timestamp": "2026-08-06T12:00:00.000Z"
}{
"statusCode": 404,
"message": "Payment link not found",
"timestamp": "2026-08-06T12:00:00.000Z"
}Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Path Parameters
The public session_id (not the internal id UUID).
Response
The checkout, with computed amount and related rows.
Internal checkout UUID.
Public ID, used in the checkout URL and as the path parameter for every other call on this resource.
Set only if you passed amount or amountOverride at create.
open, completed, expired, cancelled mor, crypto test, live Send your buyer here. Computed, camelCase.
Computed effective price: amount_override, else the linked payment link's amount.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Set once an invoice has been issued for this session; null until then.