POST/api/public/access-request/paypal/capture-order

Captures (finalizes) a previously created order that the buyer has approved in the PayPal checkout. Server-authoritative — the client cannot influence the amount.

Auth & Security

No authentication required

strictLimiter (10 Req/15min, IP-bound).

Idempotent: No

Parameters

order_id(body, string, required)The PayPal order ID returned by paypal/create-order

Example Request

{"order_id":"<PAYPAL_ORDER_ID>"}

Example Response

{"ok":false,"error":"UNKNOWN_ORDER","message":"Unbekannte Bestellung."}

Error Codes

400 ORDER_ID_REQUIREDorder_id is missing.
404 UNKNOWN_ORDERorder_id is not a known, previously created order.
409 CAPTURE_NOT_COMPLETEDThe payment has not yet been approved by the buyer.
502 PAYPAL_CAPTURE_FAILEDError in communication with PayPal.

Live Test Proof

Both negative cases without PayPal configuration verified live (400 ORDER_ID_REQUIRED, 404 UNKNOWN_ORDER). A real success case would require an actual PayPal sandbox payment transaction with buyer approval, which was excluded under the test specification (no real payment provider calls).

Public Forms