curl --request GET \
--url https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}"
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/invoices/{invoiceId}', 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/invoices/{invoiceId}",
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/invoices/{invoiceId}"
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/invoices/{invoiceId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}")
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": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
"transaction_id": "8c7d6e5f-4a3b-2c1d-0e9f-8a7b6c5d4e3f",
"org_id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"session_id": "mZrESFyR7RC9RPsJfZCVkg",
"invoice_number": "INV-2026-0142",
"amount": 49.99,
"currency": "EUR",
"payment_token": "EURC",
"description": "Order #123",
"tx_hash": null,
"network": "stripe",
"fiat_amount": 49.99,
"fiat_currency": "EUR",
"exchange_rate": 1,
"exchange_rate_source": "1:1 peg",
"status": "paid",
"issued_at": "2026-08-06T12:00:00.000Z",
"voided_at": null,
"created_at": "2026-08-06T12:00:00.000Z",
"merchant_name": "Acme Inc",
"buyer_email": "john@example.com",
"buyer_country": "DE",
"buyer_name": "John Doe",
"buyer_company": null,
"buyer_vat": null,
"tax_rate": null,
"tax_amount": null,
"tax_name": null,
"tax_inclusive": null,
"earnings": {
"currency": "EUR",
"grossMinor": 4999,
"agentaosFeeMinor": 215,
"vatMinor": 0,
"netMinor": 4784
}
}{
"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 an invoice
Same fields as the list, plus earnings: a fee/VAT/net breakdown, present only for a card/bank Merchant-of-Record sale with a linked, settled transaction. null otherwise (crypto sales, or a not-yet-paid issued invoice).
curl --request GET \
--url https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}"
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/invoices/{invoiceId}', 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/invoices/{invoiceId}",
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/invoices/{invoiceId}"
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/invoices/{invoiceId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}")
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": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
"transaction_id": "8c7d6e5f-4a3b-2c1d-0e9f-8a7b6c5d4e3f",
"org_id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"session_id": "mZrESFyR7RC9RPsJfZCVkg",
"invoice_number": "INV-2026-0142",
"amount": 49.99,
"currency": "EUR",
"payment_token": "EURC",
"description": "Order #123",
"tx_hash": null,
"network": "stripe",
"fiat_amount": 49.99,
"fiat_currency": "EUR",
"exchange_rate": 1,
"exchange_rate_source": "1:1 peg",
"status": "paid",
"issued_at": "2026-08-06T12:00:00.000Z",
"voided_at": null,
"created_at": "2026-08-06T12:00:00.000Z",
"merchant_name": "Acme Inc",
"buyer_email": "john@example.com",
"buyer_country": "DE",
"buyer_name": "John Doe",
"buyer_company": null,
"buyer_vat": null,
"tax_rate": null,
"tax_amount": null,
"tax_name": null,
"tax_inclusive": null,
"earnings": {
"currency": "EUR",
"grossMinor": 4999,
"agentaosFeeMinor": 215,
"vatMinor": 0,
"netMinor": 4784
}
}{
"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
Invoice UUID.
Response
The invoice, with its earnings breakdown.
Human-readable, e.g. INV-2026-0142.
Linked settled transaction, once paid.
Linked checkout.
Currency units.
What the buyer paid (or will pay) with.
issued (created, not yet paid), paid (payment settled), or voided.
issued, paid, voided EUR/USD equivalent, for stablecoin payments.
EUR, USD, null Rate applied at settlement.
Applied rate, e.g. 19 for 19%.
Currency units.
e.g. DE VAT.
Whether amount already includes tax.
Seller name on the document.
ISO 3166-1 alpha-2.
On-chain hash, for crypto payments.
Present only for a card/bank Merchant-of-Record sale with a linked, settled transaction. null otherwise.
Show child attributes
Show child attributes