checkout – Bestellen
Bestellt verbindlich (zahlungspflichtig). Bezahlt wird per Vorkasse: Die Antwort enthält payment_instructions (Bankverbindung bzw. Zahlungslink) – an den Menschen weitergeben. Versand nach Zahlungseingang. Braucht genau eine Autorisierung: user_confirmed=true, mandate_id oder require_approval=true. Unterstützt quote_id (Preisbindung), expected_total, max_total, dry_run und Idempotency-Key.
- HTTP
- POST /api/checkout
- Zugang
- Konto optional
- Bereich
- Bestellung
- Nur lesend
- nein
Formular
Eingabeschema (JSON Schema)
{
"type": "object",
"properties": {
"cart_id": {
"type": "string",
"description": "Warenkorb-ID aus create_cart"
},
"quote_id": {
"type": "string",
"description": "Aus quote_checkout; fixiert Preise"
},
"customer": {
"type": "object",
"description": "Lieferadresse und Kontakt",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"street": {
"type": "string"
},
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string",
"enum": [
"DE",
"AT"
],
"description": "ISO-3166-Alpha-2, Standard DE"
}
},
"required": [
"name",
"email",
"street",
"zip",
"city"
]
},
"address_id": {
"type": "string",
"description": "Statt customer: gespeicherte Adresse (Konto nötig)"
},
"payment_method": {
"type": "string",
"enum": [
"prepayment"
],
"description": "Standard: prepayment (Vorkasse)"
},
"user_confirmed": {
"type": "boolean",
"description": "true NUR, wenn der Mensch Artikel, Menge, Gesamtpreis und Adresse ausdrücklich bestätigt hat"
},
"mandate_id": {
"type": "string",
"description": "Freigegebenes Mandat (Konto nötig)"
},
"require_approval": {
"type": "boolean",
"description": "Bestellung wartet auf Freigabe per Link durch den Menschen"
},
"expected_total": {
"type": "number",
"description": "Erwarteter Endpreis EUR; Abweichung → price_changed"
},
"max_total": {
"type": "number",
"description": "Budgetgrenze EUR"
},
"dry_run": {
"type": "boolean"
},
"notes": {
"type": "string"
},
"idempotency_key": {
"type": "string",
"description": "Alternative zum Header Idempotency-Key"
}
},
"required": [
"cart_id"
]
}
REST
curl -X POST https://anltx.com/api/checkout \
-H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"cart_id":"<cart_id>"}'
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "checkout",
"arguments": {
"cart_id": "<cart_id>"
}
}
}