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

Completes (captures) a previously created order that the buyer has approved in the PayPal checkout. The amount is set by the server alone.

Send the order ID returned by `paypal/create-order` in the `order_id` field after the buyer has approved the payment at PayPal. On success, the payment is complete and the access request is processed further. Error cases: 400 `ORDER_ID_REQUIRED` (field missing), 404 `UNKNOWN_ORDER` (not a known order), 409 `CAPTURE_NOT_COMPLETED` (payment not yet approved – the buyer must complete the PayPal checkout) and 502 `PAYPAL_CAPTURE_FAILED` (communication error with PayPal). Call the endpoint only once per order.

Overview

Call: POST /api/public/access-request/paypal/capture-order. This endpoint belongs to the “Public Forms” group of the Zentor App API. It is publicly accessible and requires no authentication. The call is not idempotent: every successful call triggers the action again. Required parameters: order_id (body). Documented error cases: 400 ORDER_ID_REQUIRED, 404 UNKNOWN_ORDER, 409 CAPTURE_NOT_COMPLETED, 502 PAYPAL_CAPTURE_FAILED. The example response below shows the structure of a successful JSON response.

Auth & Security

No authentication required

At most 10 requests per 15 minutes per IP address.

Idempotent: No

Parameters

order_id(body, string, required)— 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_REQUIRED — The `order_id` field is missing.
404 UNKNOWN_ORDER — `order_id` is not a known, previously created order.
409 CAPTURE_NOT_COMPLETED — The buyer has not yet approved the payment.
502 PAYPAL_CAPTURE_FAILED — An error occurred while communicating with PayPal.

Verified behaviour

Without `order_id` the call returns 400 `ORDER_ID_REQUIRED`, with an unknown order 404 `UNKNOWN_ORDER`. The success case requires a real PayPal payment approved by the buyer.

Public Forms

POST /api/public/contactAccepts a request from the contact form on the Zentor App website and forwards it to the Zentor team.POST /api/public/consultationAccepts a consultation request from the form on the Zentor App website.POST /api/public/access-requestSubmits an access request for a package (Starter, Individuell or 14-day demo). A previously confirmed email address is required.POST /api/public/access-request/email/start-verificationSends a six-digit confirmation code, valid for 10 minutes, to the given email address – the first step of an access request.POST /api/public/access-request/email/verifyChecks the code delivered by email and issues a confirmation token for the subsequent access request.GET /api/public/access-request/payment-statusIndicates which payment methods (PayPal, Stripe) are currently available for the access request.GET /api/public/access-request/paypal/configReturns the public PayPal configuration (enabled, mode, currency) for the payment step.POST /api/public/access-request/paypal/create-orderCreates a PayPal order for the selected package.POST /api/public/access-request/stripe/create-checkoutCreates a Stripe checkout session for the selected package.POST /api/public/activate-accountActivates a newly created user account and sets the first password – triggered via the link in the invitation email.

Related articles

← Public Forms