---
title: "Retrieve an invoice"
method: GET
path: "/gateway/invoices/{invoiceId}"
tags: ["Invoices"]
---

# Retrieve an invoice

`GET /gateway/invoices/{invoiceId}`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}`
- Auth: API key in header `x-api-key`

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).

## Path parameters

- `invoiceId` string, uuid, required

## Response `200`

The invoice, with its earnings breakdown.

- InvoiceDetail
  - `id` string, uuid, required
  - `invoice_number` string, required: Human-readable, e.g. INV-2026-0142.
  - `transaction_id` string, uuid, nullable, required: Linked settled transaction, once paid.
  - `session_id` string, nullable, required: Linked checkout.
  - `amount` number, required: Currency units.
  - `currency` string, required
  - `payment_token` string, required: What the buyer paid (or will pay) with.
  - `status` 'issued' | 'paid' | 'voided', required: issued (created, not yet paid), paid (payment settled), or voided.
  - `fiat_amount` number, nullable, required: EUR/USD equivalent, for stablecoin payments.
  - `fiat_currency` 'EUR' | 'USD' | 'null', nullable, required
  - `exchange_rate` number, nullable, required: Rate applied at settlement.
  - `exchange_rate_source` string, nullable, required
  - `tax_rate` number, nullable, required: Applied rate, e.g. 19 for 19%.
  - `tax_amount` number, nullable, required: Currency units.
  - `tax_name` string, nullable, required: e.g. DE VAT.
  - `tax_inclusive` boolean, nullable, required: Whether amount already includes tax.
  - `merchant_name` string, nullable, required: Seller name on the document.
  - `buyer_email` string, nullable, required
  - `buyer_name` string, nullable, required
  - `buyer_company` string, nullable, required
  - `buyer_country` string, nullable, required: ISO 3166-1 alpha-2.
  - `buyer_vat` string, nullable, required
  - `tx_hash` string, nullable, required: On-chain hash, for crypto payments.
  - `issued_at` string, date-time, required
  - `voided_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `earnings` Earnings, required: Merchant-only fee/VAT/net breakdown, integer minor units in `currency`. grossMinor is your ex-VAT sale base (agentaosFeeMinor + netMinor); the buyer paid grossMinor + vatMinor.
    - `currency` string, required
    - `grossMinor` integer, required
    - `agentaosFeeMinor` integer, required
    - `vatMinor` integer, required
    - `netMinor` integer, required

## Other responses

- `401`: Missing or invalid `x-api-key`.
- `403`: The key is valid but the resource belongs to a different organization.
- `404`: Resource not found (or not visible to your key; the two are not distinguished).

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
