commerce

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

Capture a PayPal order the buyer completed.

Tüm commerce uç noktaları

Kimlik Doğrulama

Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.

Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

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> }'

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

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.

Parametreler

AdTürZorunluNe olduğu
orderId (path)UuidEvetThe order's id.

İstek gövdesi

AdTürZorunluNe olduğu
paypal_order_idstringEvetThe id returned by `openPayPalOrder` and completed in the browser.

Yanıt

AdTürZorunluNe olduğu
idUuidEvetUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidEvetUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringEvetHuman-friendly order reference.
statusOrderStatusEvetAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeEvetISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerEvet
tax_minorintegerEvet
discount_minorintegerEvet
total_minorintegerEvet
billing_countryobjectHayır
placed_atobjectHayır
created_atstringEvet
updated_atstringHayır
linesOrderLine[]Evet
paymentsPayment[]Evet

Bu uç noktanın dönderebileceği hatalar

401 · 403 · 404 · 422 · 429 · 503