---
title: "Pay an order that waits for payment (status requested): its Stripe Checkout while it is open, else a new one for the same order. A person opens payment.url; an agent's own account pays over HTTP 402 instead (POST /api/orders/{id}/payment)"
method: POST
path: "/api/orders/{id}/checkout"
tags: ["Orders"]
---

# Pay an order that waits for payment (status requested): its Stripe Checkout while it is open, else a new one for the same order. A person opens payment.url; an agent's own account pays over HTTP 402 instead (POST /api/orders/{id}/payment)

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

## Request

- Base URL: `https://agentdrives.com`
- URL: `https://agentdrives.com/api/orders/{id}/checkout`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Path parameters

- `id` string, required

## Response `200`

Where to pay

- object
  - `order` object
    - `id` string
    - `product` string
    - `status` string
  - `payment` object
    - `url` string
  - `reopened` boolean: true: the same checkout as before; false: a new one for the same order

## Other responses

- `404`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next
- `409`: not_payable (paid, withdrawn or not a paid order), payment_under_way, pay_over_402 (an agent's own account), billing_offline
- `503`: billing_unavailable

---

[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/94dcaabff4b2?raw)
