commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Ushbu yakuniy nuqta spetsifikatsiyada ma'lum bir ruxsatni ko'rsatmaydi, shuning uchun kalitingizga eng kam kerakli huquqni bering va taxmin qilish o'rniga javobni tekshiring.
Bu yakuniy nuqta hech qanday tashkilot identifikatorini qabul qilmaydi. Sizning kalitingiz unga tegishli tashkilotni allaqachon aniqlaydi va javob shunga qarab cheklanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
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> }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
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.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
orderId (path) | Uuid | Ha | The order's id. |
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
paypal_order_id | string | Ha | The id returned by `openPayPalOrder` and completed in the browser. |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
id | Uuid | Ha | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ha | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Ha | Human-friendly order reference. |
status | OrderStatus | Ha | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Ha | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Ha | — |
tax_minor | integer | Ha | — |
discount_minor | integer | Ha | — |
total_minor | integer | Ha | — |
billing_country | object | Yo'q | — |
placed_at | object | Yo'q | — |
created_at | string | Ha | — |
updated_at | string | Yo'q | — |
lines | OrderLine[] | Ha | — |
payments | Payment[] | Ha | — |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 404 · 422 · 429 · 503