---
title: "Pay an order by card over HTTP 402"
method: POST
path: "/api/agent/orders/{id}/payment"
---

# Pay an order by card over HTTP 402

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

## Request

- Base URL: `https://agentsindex.ai`
- URL: `https://agentsindex.ai/api/agent/orders/{id}/payment`
- Auth: none required

No credential: 402 with a card challenge in WWW-Authenticate (MPP, method stripe: a Stripe Shared Payment Token for this site). With Authorization: Payment and the credential: the payment, the delivery, and the receipt (Payment-Receipt header, receipt_url). The order id is the capability; no key needed. Optional JSON body {"buyer": {"vat_id", "country", "company", "address"}} on both requests: an EU VAT ID that VIES confirms gets an invoice. The price includes any VAT.

## Path parameters

- `id` string, uuid, required

## Response `200`

Paid and delivered: the order, the payment and its receipt.

- object

## Other responses

- `402`: Payment required: the card challenge in WWW-Authenticate, and in the body what it buys and how to pay.
- `409`: already_paid, payment_in_progress, expired, or the listing can no longer have the offer (nothing charged).
- `503`: payments_unavailable: nothing was charged.

---

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