commerce

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

Capture a PayPal order the buyer completed.

Барлық commerce соңғы нүктелері

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.

Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.

Әрекет етіп көру

Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.

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.

Параметрлер

АтыTүріМіндеттіМазмұны
orderId (path)UuidИәThe order's id.

Сұрау денесі

АтыTүріМіндеттіМазмұны
paypal_order_idstringИәThe id returned by `openPayPalOrder` and completed in the browser.

Жауап

АтыTүріМіндеттіМазмұны
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