---
title: "Pay an order that waits for payment, as an agent, without a person: HTTP 402. An Audit Drive (audit, $499, plus its paid plan and its payment test at cost when it has them), and its renewal (renewal, $199), for a domain you verified (else 403 claim_not_verified). A Stack check (stack3, $490; stack, $1,490 for 5 tools and $250 for each extra tool) and a data plan (builder, $49 a month; team, $290 a month), with no domain to verify. The same prices as the card checkout. Paid over HTTP 402, a data plan runs one month and doesn't renew by itself: pay again before it ends and the next month follows on. We email you 3 days before it ends. A data plan's month is on your API key as soon as it's paid. Without a credential: 402 with the challenges. Pay one and send the same request again with the credential (Authorization: Payment for MPP, PAYMENT-SIGNATURE for x402): the paid order, its drive queued, and the receipt (Payment-Receipt or PAYMENT-RESPONSE). No key needed: the order's id is enough. An order waits 24 hours for its payment (409 expired); paid already: 409 already_paid; one payment at a time (409 payment_in_progress). On a person's account the card checkout works too (payment.url in the answer to POST /api/orders); an agent's own account has none until a person claims it. The 402's fix and payment.agent.how name only the rails that are on now."
method: POST
path: "/api/orders/{id}/payment"
tags: ["Pay over HTTP 402"]
---

# Pay an order that waits for payment, as an agent, without a person: HTTP 402. An Audit Drive (audit, $499, plus its paid plan and its payment test at cost when it has them), and its renewal (renewal, $199), for a domain you verified (else 403 claim_not_verified). A Stack check (stack3, $490; stack, $1,490 for 5 tools and $250 for each extra tool) and a data plan (builder, $49 a month; team, $290 a month), with no domain to verify. The same prices as the card checkout. Paid over HTTP 402, a data plan runs one month and doesn't renew by itself: pay again before it ends and the next month follows on. We email you 3 days before it ends. A data plan's month is on your API key as soon as it's paid. Without a credential: 402 with the challenges. Pay one and send the same request again with the credential (Authorization: Payment for MPP, PAYMENT-SIGNATURE for x402): the paid order, its drive queued, and the receipt (Payment-Receipt or PAYMENT-RESPONSE). No key needed: the order's id is enough. An order waits 24 hours for its payment (409 expired); paid already: 409 already_paid; one payment at a time (409 payment_in_progress). On a person's account the card checkout works too (payment.url in the answer to POST /api/orders); an agent's own account has none until a person claims it. The 402's fix and payment.agent.how name only the rails that are on now.

`POST /api/orders/{id}/payment`

## Request

- Base URL: `https://agentdrives.com`
- URL: `https://agentdrives.com/api/orders/{id}/payment`
- Auth: none required

## Path parameters

- `id` string, required

## Request body

- object
  - `buyer` object: Optional, an Audit paid over HTTP 402: for our invoice. The price includes any VAT. An EU VAT ID that VIES confirms gets our invoice at once, with no VAT outside the Netherlands. 400 invalid_vat_id, invalid_country or invalid_buyer
    - `vat_id` string: EU VAT ID with its country prefix
    - `country` string: Two-letter code of your business's country
    - `company` string: Business name for the invoice
    - `address` string: Postal address for the invoice, one line

## Response `200`

Paid: the order and the payment

- AgentPayment
  - `order` object
    - `id` string
    - `status` 'paid'
    - `url` string
    - `drives_queued` integer
  - `payment` object
    - `rail` 'mpp' | 'x402'
    - `method` 'stripe' | 'tempo' | 'evm'
    - `amount_cents` integer
    - `currency` string
    - `reference` string: A PaymentIntent id (a card) or a transaction hash
    - `payment_intent` string, nullable
    - `mode` 'test' | 'live'
    - `vat` object: The VAT inside the price
      - `category` 'NL' | 'EU_RC' | 'EU_B2C' | 'NON_EU' | 'UNKNOWN'
      - `rate` integer
      - `vat_cents` integer
      - `net_cents` integer
      - `buyer_country` string, nullable
      - `vat_id` string
      - `vies` 'valid' | 'invalid' | 'unavailable'
    - `receipt_url` string: The payment's receipt, a page to keep or print
    - `invoice` object, nullable: Our invoice, for a business whose VAT ID VIES confirmed: number, url, pdf (pending: true while it is made)
      - `number` string
      - `url` string
      - `pdf` string
      - `pending` boolean
  - `next` string
  - `test_mode` boolean

## Other responses

- `402`: Payment Required: the challenges in WWW-Authenticate (MPP: Payment, method stripe, tempo or evm) and PAYMENT-REQUIRED (x402 v2, exact, USDC on Base), and a body with error payment_required, what it buys, accepts (the rails on now), fix and, in Stripe's test mode, test_mode: true
- `404`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next
- `409`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next
- `502`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next
- `503`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next

---

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