commerce

POST /v1/orders/{orderId}/paypal/capture

Capture a PayPal order the buyer completed.

ټول commerce پای ټکي

تصدیق‌هویت

د بیارر ټوکن په توګه یو API کي وسپارئ. دا پای ټکی په مشخصاتو کې کوم ځانګړی اجازه لیک نه بیانوي، نو خپل کیلي ته لږترلږه هغه څه ورکړئ چې ورته اړتیا لري او د فرض کولو پر ځای ځواب وپلټئ.

دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.

هڅه وکړئ

د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.

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 کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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_idstringهوThe id returned by `openPayPalOrder` and completed in the browser.

ځواب

نومډولاړیندا څه شی دی
idUuidهوUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidهوUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringهوHuman-friendly order reference.
statusOrderStatusهوAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeهوISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerهو
tax_minorintegerهو
discount_minorintegerهو
total_minorintegerهو
billing_countryobjectنه
placed_atobjectنه
created_atstringهو
updated_atstringنه
linesOrderLine[]هو
paymentsPayment[]هو

تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي

401 · 403 · 404 · 422 · 429 · 503