AgentaOS Checkouts API

One attempt to collect one payment, standalone or built from a payment link. Wire path is `/gateway/sessions`; the SDK and CLI call this resource "checkout".

Operations 4

POST /gateway/sessions Create a checkout #
GET /gateway/sessions List checkouts #
GET /gateway/sessions/{sessionId} Retrieve a checkout #
POST /gateway/sessions/{sessionId}/cancel Cancel a checkout #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentaos-ai:agentaos-ai-checkouts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

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 Specification

agentaos-ai-checkouts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agentaos Ai Checkouts API
  version: 1.0.0
  contact:
    name: AgentaOS
    url: https://agentaos.ai
  license:
    name: Proprietary
    url: https://agentaos.ai
  description: 'Operations tagged Checkouts 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: Checkouts
  description: One attempt to collect one payment, standalone or built from a payment link. Wire path is `/gateway/sessions`; the SDK and CLI call this resource "checkout".
paths:
  /gateway/sessions:
    post:
      tags:
      - Checkouts
      operationId: createCheckout
      summary: Create a checkout
      description: Creates a checkout session, standalone or built from a payment link with `linkId`. The create and list responses do **not** include a plain `amount`, only `amount_override` (`null` unless you passed one). Call "Retrieve a checkout" for a computed, ready-to-display `amount`. Accepts an `Idempotency-Key` header (wins over a body `idempotencyKey` if both are sent); a repeat call with the same key returns the same checkout instead of creating a second one.
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Alternative to the body's `idempotencyKey` field. The header wins if both are sent.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutCreateRequest'
            example:
              amount: 49.99
              currency: EUR
              description: 'Order #123'
              successUrl: https://myshop.com/success
              cancelUrl: https://myshop.com/cart
              webhookUrl: https://myshop.com/webhooks
              buyerEmail: john@example.com
      responses:
        '201':
          description: Checkout created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Checkout'
              examples:
                default:
                  $ref: '#/components/examples/CheckoutExample'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    get:
      tags:
      - Checkouts
      operationId: listCheckouts
      summary: List checkouts
      description: Paginated. Same fields as create, per item.
      parameters:
      - $ref: '#/components/parameters/Limit100'
      - $ref: '#/components/parameters/Offset'
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - open
          - completed
          - expired
          - cancelled
      - $ref: '#/components/parameters/NetworksFilter'
      responses:
        '200':
          description: A page of checkouts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://api.agentaos.ai/api/v1
      description: Production
  /gateway/sessions/{sessionId}:
    get:
      tags:
      - Checkouts
      operationId: getCheckout
      summary: Retrieve a checkout
      description: '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.'
      parameters:
      - $ref: '#/components/parameters/SessionId'
      responses:
        '200':
          description: The checkout, with computed amount and related rows.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutDetail'
        '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/sessions/{sessionId}/cancel:
    post:
      tags:
      - Checkouts
      operationId: cancelCheckout
      summary: Cancel a checkout
      description: 'Stops the buyer from paying. If a payment already cleared before the cancel call lands, it still completes: cancelling doesn''t reach into the card processor or on-chain state after the fact. Only works while the checkout is `open` (`400` otherwise).'
      parameters:
      - $ref: '#/components/parameters/SessionId'
      responses:
        '200':
          description: The checkout was cancelled.
          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'
        '409':
          description: '`session_already_paid`: the buyer already paid; the payment is booked. `payment_in_progress`: a payment is still processing, try again. No code: modified concurrently.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 409
                code: session_already_paid
                message: This checkout is already paid. The payment is booked to you.
                timestamp: '2026-10-24T12:00:00.000Z'
    servers:
    - url: https://api.agentaos.ai/api/v1
      description: Production
components:
  schemas:
    Checkout:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          format: uuid
          description: Internal checkout UUID.
        payment_link_id:
          type:
          - string
          - 'null'
          format: uuid
        org_id:
          type: string
          format: uuid
        session_id:
          type: string
          description: Public ID, used in the checkout URL and as the path parameter for every other call on this resource.
        idempotency_key:
          type:
          - string
          - 'null'
        amount_override:
          type:
          - number
          - 'null'
          description: Set only if you passed amount or amountOverride at create.
        currency:
          type: string
        metadata:
          type: object
        webhook_url:
          type:
          - string
          - 'null'
        success_url:
          type:
          - string
          - 'null'
        cancel_url:
          type:
          - string
          - 'null'
        tax_rate_id:
          type:
          - string
          - 'null'
          format: uuid
        supported_networks:
          type: array
          items:
            type: string
        expires_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - open
          - completed
          - expired
          - cancelled
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        seller_mode:
          type: string
          enum:
          - mor
          - crypto
        environment:
          type: string
          enum:
          - test
          - live
        checkoutUrl:
          type: string
          description: Send your buyer here. Computed, camelCase.
        invoiceId:
          type:
          - string
          - 'null'
          format: uuid
          description: Set once an invoice has been issued for this session; null until then.
        invoiceNumber:
          type:
          - string
          - 'null'
      required:
      - id
      - payment_link_id
      - org_id
      - session_id
      - idempotency_key
      - amount_override
      - currency
      - metadata
      - webhook_url
      - success_url
      - cancel_url
      - tax_rate_id
      - supported_networks
      - expires_at
      - status
      - created_at
      - updated_at
      - seller_mode
      - environment
      - checkoutUrl
    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
    CheckoutListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Checkout'
        total:
          type: integer
        hasMore:
          type: boolean
      required:
      - items
      - total
      - hasMore
    LinkTransactionRow:
      type: object
      description: 'A raw transaction row as nested under a Payment Link or Checkout detail response: same shape as a Transaction, but without the computed `money` breakdown.'
      additionalProperties: true
      properties:
        id:
          type: string
          format: uuid
        direction:
          type: string
          enum:
          - inbound
          - outbound
        status:
          type: string
        amount:
          type: number
        payment_method:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
      required:
      - id
      - direction
      - status
      - amount
      - created_at
    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
    CheckoutDetail:
      allOf:
      - $ref: '#/components/schemas/Checkout'
      - type: object
        properties:
          amount:
            type:
            - number
            - 'null'
            description: 'Computed effective price: amount_override, else the linked payment link''s amount.'
          link_amount:
            type:
            - number
            - 'null'
          link_currency:
            type:
            - string
            - 'null'
          link_description:
            type:
            - string
            - 'null'
          transactions:
            type: array
            items:
              $ref: '#/components/schemas/LinkTransactionRow'
          invoices:
            type: array
            items:
              $ref: '#/components/schemas/Invoice'
        required:
        - amount
        - link_amount
        - link_currency
        - link_description
        - transactions
        - invoices
    CheckoutCreateRequest:
      type: object
      description: Either `linkId` or `amount` is required (amount is required when creating a standalone checkout with no link).
      properties:
        linkId:
          type: string
          format: uuid
          description: Payment link UUID to create from. Inherits amount, currency, description, taxRateId, and the seller mode. Omit for a standalone checkout.
        amount:
          type: number
          minimum: 0.01
          maximum: 1000000
          description: Required if no linkId.
        amountOverride:
          type: number
          minimum: 0.01
          maximum: 1000000
          description: With linkId, overrides the link's amount for this checkout only.
        currency:
          type: string
          enum:
          - EUR
          - USD
          - EURC
          - EURe
          - USDC
          description: Ignored (inherited from the link) when linkId is set.
        description:
          type: string
          maxLength: 1000
        taxRateId:
          type: string
          format: uuid
        dueDate:
          type: string
          format: date
          description: YYYY-MM-DD. Presentation only, stamped onto the invoice issued for this checkout.
        buyerEmail:
          type: string
          format: email
          maxLength: 320
        buyerName:
          type: string
          maxLength: 200
        buyerCompany:
          type: string
          maxLength: 200
        buyerCountry:
          type: string
          maxLength: 2
          description: ISO 3166-1 alpha-2, e.g. DE. Drives destination-VAT calculation.
        buyerAddress:
          type: string
          maxLength: 500
        buyerVat:
          type: string
          maxLength: 20
        webhookUrl:
          type: string
          format: uri
          maxLength: 2048
        successUrl:
          type: string
          format: uri
          maxLength: 2048
        cancelUrl:
          type: string
          format: uri
          maxLength: 2048
        expiresIn:
          type: integer
          minimum: 300
          maximum: 86400
          default: 86400
          description: 'Seconds until the checkout expires. Without it: 24 hours for a card checkout, 48 hours for an EUR checkout that offers bank transfer, 30 minutes for a stablecoin checkout. At the deadline a card payment not yet completed is stopped; a bank transfer the buyer chose before it stays valid up to 30 days.'
        paymentMethods:
          type: array
          items:
            type: string
            enum:
            - card
            - bank_transfer
          description: 'What the checkout offers. `["card"]` makes it card-only. Without it: card, plus bank transfer on EUR. Card must be included; bank transfer is EUR only. An impossible list answers 400 `payment_methods_unavailable`.'
        metadata:
          type: object
          description: Up to 8KB serialized.
        supportedNetworks:
          type: array
          items:
            type: string
          description: CAIP-2 network IDs. Defaults to Base mainnet for crypto-settlement checkouts.
        idempotencyKey:
          type: string
          description: Also settable via the Idempotency-Key request header (the header wins if both are sent).
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
      required:
      - success
  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'
    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'
    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'
  parameters:
    SessionId:
      name: sessionId
      in: path
      required: true
      description: The public `session_id` (not the internal `id` UUID).
      schema:
        type: string
    Limit100:
      name: limit
      in: query
      required: false
      description: Items per page. Capped server-side at 100.
      schema:
        type: integer
        default: 20
        minimum: 1
        maximum: 100
    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
    Offset:
      name: offset
      in: query
      required: false
      description: Number of items to skip, for the next page.
      schema:
        type: integer
        default: 0
        minimum: 0
  examples:
    CheckoutExample:
      value:
        id: a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d
        payment_link_id: null
        org_id: 9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
        session_id: mZrESFyR7RC9RPsJfZCVkg
        idempotency_key: order-48213
        amount_override: 49.99
        currency: EUR
        metadata:
          payer:
            email: john@example.com
        webhook_url: https://myshop.com/webhooks
        success_url: https://myshop.com/success
        cancel_url: https://myshop.com/cart
        tax_rate_id: null
        supported_networks:
        - eip155:8453
        expires_at: '2026-08-06T12:30:00.000Z'
        status: open
        created_at: '2026-08-06T12:00:00.000Z'
        updated_at: '2026-08-06T12:00:00.000Z'
        seller_mode: mor
        environment: live
        checkoutUrl: https://app.agentaos.ai/checkout/mZrESFyR7RC9RPsJfZCVkg
        invoiceId: b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e
        invoiceNumber: INV-2026-0142
  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