commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor 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 masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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 | Wajib | Tentang apa ini |
|---|---|---|---|
orderId (path) | Uuid | Ya | The order's id. |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
paypal_order_id | string | Ya | The id returned by `openPayPalOrder` and completed in the browser. |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
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 | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429 · 503