commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Pengesahan
Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
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> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
orderId (path) | Uuid | Ya | The order's id. |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
paypal_order_id | string | Ya | The id returned by `openPayPalOrder` and completed in the browser. |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Ya | Human-friendly order reference. |
status | OrderStatus | Ya | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Ya | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Ya | — |
tax_minor | integer | Ya | — |
discount_minor | integer | Ya | — |
total_minor | integer | Ya | — |
billing_country | object | Tidak | — |
placed_at | object | Tidak | — |
created_at | string | Ya | — |
updated_at | string | Tidak | — |
lines | OrderLine[] | Ya | — |
payments | Payment[] | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429 · 503