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.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
orderId (path) | Uuid | כן | The order's id. |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
paypal_order_id | string | כן | The id returned by `openPayPalOrder` and completed in the browser. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
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