commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Autentifikimi
Drgoni një çelës API si një token mbajtës. Ky pikëndalim nuk specifikon një leje specifike në specifikim, prandaj jepini çelësit tuaj minimumin e nevojshëm dhe kontrolloni përgjigjen në vend që të supozoni.
Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
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> }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
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.
Parametrat
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
orderId (path) | Uuid | Po | The order's id. |
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
paypal_order_id | string | Po | The id returned by `openPayPalOrder` and completed in the browser. |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
id | Uuid | Po | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Po | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Po | Human-friendly order reference. |
status | OrderStatus | Po | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Po | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Po | — |
tax_minor | integer | Po | — |
discount_minor | integer | Po | — |
total_minor | integer | Po | — |
billing_country | object | Jo | — |
placed_at | object | Jo | — |
created_at | string | Po | — |
updated_at | string | Jo | — |
lines | OrderLine[] | Po | — |
payments | Payment[] | Po | — |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 404 · 422 · 429 · 503