commerce

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

Capture a PayPal order the buyer completed.

Barcha commerce yakuniy nuqtalari

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

NomiTuriMajburiyNima bu
orderId (path)UuidHaThe order's id.

Soʻrov tanasi

NomiTuriMajburiyNima bu
paypal_order_idstringHaThe id returned by `openPayPalOrder` and completed in the browser.

Javob

NomiTuriMajburiyNima bu
idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringHaHuman-friendly order reference.
statusOrderStatusHaAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeHaISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerHa
tax_minorintegerHa
discount_minorintegerHa
total_minorintegerHa
billing_countryobjectYo'q
placed_atobjectYo'q
created_atstringHa
updated_atstringYo'q
linesOrderLine[]Ha
paymentsPayment[]Ha

Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar

401 · 403 · 404 · 422 · 429 · 503