commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Аутентификация
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_id | string | Иә | The id returned by `openPayPalOrder` and completed in the browser. |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
id | Uuid | Иә | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Иә | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Иә | Human-friendly order reference. |
status | OrderStatus | Иә | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Иә | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Иә | — |
tax_minor | integer | Иә | — |
discount_minor | integer | Иә | — |
total_minor | integer | Иә | — |
billing_country | object | Жоқ | — |
placed_at | object | Жоқ | — |
created_at | string | Иә | — |
updated_at | string | Жоқ | — |
lines | OrderLine[] | Иә | — |
payments | Payment[] | Иә | — |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 422 · 429 · 503