commerce

POST /v1/orders/{orderId}/paypal/capture

Capture a PayPal order the buyer completed.

Усі кінцеві точки commerce

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.

Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/paypal/capture \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "paypal_order_id": <string> }'

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

Settles the order against a PayPal order the buyer has approved (wallet) or paid by card (including any 3-D Secure step). ⛔ **The browser is not believed.** It reports that the buyer finished; only PayPal's capture response says money moved, and only the engine writes a payment. Posting an invented `paypal_order_id` produces a gateway error, never a paid order. A **declined card answers 200** with the order `payment_failed`, for the same reason `payOrder` does — the attempt was processed exactly as asked.

Параметри

НазваТипОбов'язковеЩо це таке
orderId (path)UuidТакThe order's id.

Тіло запиту

НазваТипОбов'язковеЩо це таке
paypal_order_idstringТакThe id returned by `openPayPalOrder` and completed in the browser.

Відповідь

НазваТипОбов'язковеЩо це таке
idUuidТакUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidТакUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringТакHuman-friendly order reference.
statusOrderStatusТакAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeТакISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerТак
tax_minorintegerТак
discount_minorintegerТак
total_minorintegerТак
billing_countryobjectНі
placed_atobjectНі
created_atstringТак
updated_atstringНі
linesOrderLine[]Так
paymentsPayment[]Так

Помилки, які може повертати ця кінцева точка

401 · 403 · 404 · 422 · 429 · 503