AgentaOS Invoices API
Every checkout issues an invoice. List, retrieve, void, export, and download PDFs/receipts.
Every checkout issues an invoice. List, retrieve, void, export, and download PDFs/receipts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentaos-ai:agentaos-ai-invoices-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Agentaos Ai Invoices API
version: 1.0.0
contact:
name: AgentaOS
url: https://agentaos.ai
license:
name: Proprietary
url: https://agentaos.ai
description: 'Operations tagged Invoices across 2 of this provider''s published API definitions: agentaos-ai-openapi.json, openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Invoices
description: Every checkout issues an invoice. List, retrieve, void, export, and download PDFs/receipts.
paths:
/gateway/invoices:
get:
tags:
- Invoices
operationId: listInvoices
summary: List invoices
description: 'Paginated. Every checkout issues an invoice: `issued` the moment the checkout is created, `paid` once the payment settles, or `voided` if cancelled. The seller of record is our Estonian entity, AgentaOS''s Merchant of Record entity, unless the payment settled to your own on-chain wallet (`seller_mode: "crypto"`), in which case you''re the seller.'
parameters:
- $ref: '#/components/parameters/Limit5000'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/From'
- $ref: '#/components/parameters/To'
- $ref: '#/components/parameters/InvoiceStatus'
- $ref: '#/components/parameters/FiatCurrency'
- $ref: '#/components/parameters/NetworksFilter'
responses:
'200':
description: A page of invoices.
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/statement:
get:
tags:
- Invoices
operationId: downloadStatement
summary: Download a statement PDF
description: 'A statement-style PDF covering a date range: opening/closing balance, every transaction in the ledger, and a VAT summary grouped by rate. `from` and `to` are both required, unlike the other date filters in this API.'
parameters:
- $ref: '#/components/parameters/FromRequired'
- $ref: '#/components/parameters/ToRequired'
- $ref: '#/components/parameters/FiatCurrency'
- $ref: '#/components/parameters/NetworksFilter'
responses:
'200':
description: The statement PDF.
content:
application/pdf:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/export:
get:
tags:
- Invoices
operationId: exportInvoices
summary: Export invoices as CSV
description: 'Up to 5000 rows for the matching filter, built for accounting software: date, invoice number, description, amount and currency, exchange rate and source, tax name/rate/amount, buyer name/company/country/VAT, and status.'
parameters:
- $ref: '#/components/parameters/From'
- $ref: '#/components/parameters/To'
- $ref: '#/components/parameters/InvoiceStatus'
- $ref: '#/components/parameters/FiatCurrency'
- $ref: '#/components/parameters/NetworksFilter'
responses:
'200':
description: The invoices CSV.
content:
text/csv:
schema:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/{invoiceId}:
get:
tags:
- Invoices
operationId: getInvoice
summary: Retrieve an invoice
description: '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).'
parameters:
- $ref: '#/components/parameters/InvoiceId'
responses:
'200':
description: The invoice, with its earnings breakdown.
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceDetail'
examples:
default:
$ref: '#/components/examples/InvoiceDetailExample'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/{invoiceId}/void:
post:
tags:
- Invoices
operationId: voidInvoice
summary: Void an invoice
description: 'Marks the accounting record void. It never touches the payment itself: if the buyer already paid, nothing is refunded. Use it to correct a bookkeeping mistake, not to reverse a charge. Irreversible: there is no "un-void"; an already-voided invoice returns `400` on a repeat call.'
parameters:
- $ref: '#/components/parameters/InvoiceId'
responses:
'200':
description: The invoice was voided.
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
example:
success: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/{invoiceId}/pdf:
get:
tags:
- Invoices
operationId: downloadInvoicePdf
summary: Download the invoice PDF
description: Response is `application/pdf` (binary), not JSON. Includes seller and buyer details, the amount (plus fiat equivalent and exchange rate for stablecoin payments), and a tax breakdown.
parameters:
- $ref: '#/components/parameters/InvoiceId'
responses:
'200':
description: The invoice PDF.
content:
application/pdf:
schema:
type: string
format: binary
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/{invoiceId}/receipt:
get:
tags:
- Invoices
operationId: downloadReceiptPdf
summary: Download the receipt PDF
description: Same document family as the invoice PDF, but titled as a receipt with its own receipt number, for a **paid** invoice. Falls back to the plain invoice PDF (still valid proof of payment) for invoices issued before receipts existed on your account, rather than `404`ing.
parameters:
- $ref: '#/components/parameters/InvoiceId'
responses:
'200':
description: The receipt PDF (or the invoice PDF, on fallback).
content:
application/pdf:
schema:
type: string
format: binary
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
/gateway/invoices/{invoiceId}/send-receipt:
post:
tags:
- Invoices
operationId: resendReceipt
summary: Re-send the receipt email
description: 'Sends the paid receipt to the buyer email on file. Only works for a `paid` invoice with a `buyer_email`: returns `400` otherwise.'
parameters:
- $ref: '#/components/parameters/InvoiceId'
responses:
'200':
description: The receipt email was sent.
content:
application/json:
schema:
$ref: '#/components/schemas/SendReceiptResponse'
example:
ok: true
sentTo: john@example.com
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.agentaos.ai/api/v1
description: Production
components:
parameters:
Limit5000:
name: limit
in: query
required: false
description: Items per page. Capped server-side at 5000.
schema:
type: integer
default: 20
minimum: 1
maximum: 5000
NetworksFilter:
name: networks
in: query
required: false
description: Comma-separated CAIP-2 network IDs to filter by, e.g. `eip155:8453,eip155:84532`. Ignored if your API key is network-scoped.
schema:
type: string
InvoiceStatus:
name: status
in: query
required: false
schema:
type: string
enum:
- all
- issued
- paid
- voided
To:
name: to
in: query
required: false
description: ISO 8601 date or datetime, inclusive upper bound.
schema:
type: string
InvoiceId:
name: invoiceId
in: path
required: true
description: Invoice UUID.
schema:
type: string
format: uuid
FiatCurrency:
name: fiatCurrency
in: query
required: false
description: Filter to rows settled/presented in this fiat currency.
schema:
type: string
enum:
- EUR
- USD
Offset:
name: offset
in: query
required: false
description: Number of items to skip, for the next page.
schema:
type: integer
default: 0
minimum: 0
FromRequired:
name: from
in: query
required: true
description: ISO 8601 date.
schema:
type: string
From:
name: from
in: query
required: false
description: ISO 8601 date or datetime, inclusive lower bound.
schema:
type: string
ToRequired:
name: to
in: query
required: true
description: ISO 8601 date.
schema:
type: string
schemas:
InvoiceListResponse:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Invoice'
total:
type: integer
hasMore:
type: boolean
required:
- items
- total
- hasMore
Earnings:
type: object
description: 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.
properties:
currency:
type: string
grossMinor:
type: integer
agentaosFeeMinor:
type: integer
vatMinor:
type: integer
netMinor:
type: integer
required:
- currency
- grossMinor
- agentaosFeeMinor
- vatMinor
- netMinor
InvoiceDetail:
allOf:
- $ref: '#/components/schemas/Invoice'
- type: object
properties:
earnings:
anyOf:
- $ref: '#/components/schemas/Earnings'
- type: 'null'
description: Present only for a card/bank Merchant-of-Record sale with a linked, settled transaction. null otherwise.
required:
- earnings
SendReceiptResponse:
type: object
properties:
ok:
type: boolean
const: true
sentTo:
type: string
format: email
required:
- ok
- sentTo
Error:
type: object
description: Every non-2xx response is JSON in this shape. Every response (success or error) also carries an `x-request-id` response header; send that header on your request to have your own id echoed back, otherwise the server mints one. On errors the same id is repeated in the `requestId` body field.
properties:
statusCode:
type: integer
description: Same as the HTTP status code.
code:
type: string
description: 'Present on some refusals: a stable machine-readable reason, e.g. `live_key_required`.'
message:
description: Human-readable. A validation failure (400) returns an array of per-field messages instead of one string.
anyOf:
- type: string
- type: array
items:
type: string
errors:
type: array
description: 'Present on 400 validation failures: one entry per invalid field. The flat human-readable strings stay in `message` for back-compat; this is the machine-readable, per-field view.'
items:
type: object
properties:
field:
type: string
description: Name of the invalid field, dot-notated for nested properties (e.g. `checkoutFields.0.type`).
message:
type: string
description: Validation messages for that field, joined with `, `.
required:
- field
- message
requestId:
type: string
description: Correlation id, identical to the `x-request-id` response header. Include it when contacting support. On success it is available on the header only, not the body.
timestamp:
type: string
format: date-time
required:
- statusCode
- message
- timestamp
SuccessResponse:
type: object
properties:
success:
type: boolean
const: true
required:
- success
Invoice:
type: object
additionalProperties: true
properties:
id:
type: string
format: uuid
invoice_number:
type: string
description: Human-readable, e.g. INV-2026-0142.
transaction_id:
type:
- string
- 'null'
format: uuid
description: Linked settled transaction, once paid.
session_id:
type:
- string
- 'null'
description: Linked checkout.
amount:
type: number
description: Currency units.
currency:
type: string
payment_token:
type: string
description: What the buyer paid (or will pay) with.
status:
type: string
enum:
- issued
- paid
- voided
description: issued (created, not yet paid), paid (payment settled), or voided.
fiat_amount:
type:
- number
- 'null'
description: EUR/USD equivalent, for stablecoin payments.
fiat_currency:
type:
- string
- 'null'
enum:
- EUR
- USD
- null
exchange_rate:
type:
- number
- 'null'
description: Rate applied at settlement.
exchange_rate_source:
type:
- string
- 'null'
tax_rate:
type:
- number
- 'null'
description: Applied rate, e.g. 19 for 19%.
tax_amount:
type:
- number
- 'null'
description: Currency units.
tax_name:
type:
- string
- 'null'
description: e.g. DE VAT.
tax_inclusive:
type:
- boolean
- 'null'
description: Whether amount already includes tax.
merchant_name:
type:
- string
- 'null'
description: Seller name on the document.
buyer_email:
type:
- string
- 'null'
buyer_name:
type:
- string
- 'null'
buyer_company:
type:
- string
- 'null'
buyer_country:
type:
- string
- 'null'
description: ISO 3166-1 alpha-2.
buyer_vat:
type:
- string
- 'null'
tx_hash:
type:
- string
- 'null'
description: On-chain hash, for crypto payments.
issued_at:
type: string
format: date-time
voided_at:
type:
- string
- 'null'
format: date-time
created_at:
type: string
format: date-time
required:
- id
- invoice_number
- transaction_id
- session_id
- amount
- currency
- payment_token
- status
- fiat_amount
- fiat_currency
- exchange_rate
- exchange_rate_source
- tax_rate
- tax_amount
- tax_name
- tax_inclusive
- merchant_name
- buyer_email
- buyer_name
- buyer_company
- buyer_country
- buyer_vat
- tx_hash
- issued_at
- voided_at
- created_at
responses:
NotFound:
description: Resource not found (or not visible to your key; the two are not distinguished).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 404
message: Payment link not found
timestamp: '2026-08-06T12:00:00.000Z'
Forbidden:
description: The key is valid but the resource belongs to a different organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 403
message: Payment link belongs to another organization
timestamp: '2026-08-06T12:00:00.000Z'
BadRequest:
description: A required field is missing, out of range, or the wrong type. `ValidationPipe` also rejects any field not in the documented schema.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 400
message: amount is required when creating a session without a link
timestamp: '2026-08-06T12:00:00.000Z'
Unauthorized:
description: Missing or invalid `x-api-key`.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 401
message: Invalid API key
timestamp: '2026-08-06T12:00:00.000Z'
examples:
InvoiceDetailExample:
value:
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: card
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
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: '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.'
x-refined-from:
- agentaos-ai-openapi.json
- openapi.json