commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
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
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
orderId (path) | Uuid | Evet | The order's id. |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
paypal_order_id | string | Evet | The id returned by `openPayPalOrder` and completed in the browser. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Evet | Human-friendly order reference. |
status | OrderStatus | Evet | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Evet | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Evet | — |
tax_minor | integer | Evet | — |
discount_minor | integer | Evet | — |
total_minor | integer | Evet | — |
billing_country | object | Hayır | — |
placed_at | object | Hayır | — |
created_at | string | Evet | — |
updated_at | string | Hayır | — |
lines | OrderLine[] | Evet | — |
payments | Payment[] | Evet | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 422 · 429 · 503