commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Xaqiijinta aqoonsiga
U dir fure API ahaan calaamad muujisa (bearer token). Barta dhammaadka ee kani ma caysino luqad ahaan oggolaansho gaar ah oo ku dhex jirta qeexidda, markaa sii furahaaga inta ugu yar ee uu u baahan yahay oo fiiri jawaabta halka aad wax ka qaadan lahayd.
Boggan ma qaato aqoonsiga ururka. Furahaagu wuxuu horay u aqoonsanayaa ururka uu ka tirsan yahay, jawaabtuna waxay ku kooban tahay halkaas.
Isku day
Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.
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> }'Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API
Faahfaahin
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.
Cabiraha
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
orderId (path) | Uuid | Haa | The order's id. |
Codsiga jidhkiisa
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
paypal_order_id | string | Haa | The id returned by `openPayPalOrder` and completed in the browser. |
Jawaab
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
id | Uuid | Haa | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Haa | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Haa | Human-friendly order reference. |
status | OrderStatus | Haa | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Haa | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Haa | — |
tax_minor | integer | Haa | — |
discount_minor | integer | Haa | — |
total_minor | integer | Haa | — |
billing_country | object | Maya | — |
placed_at | object | Maya | — |
created_at | string | Haa | — |
updated_at | string | Maya | — |
lines | OrderLine[] | Haa | — |
payments | Payment[] | Haa | — |
Cilladaha ay bartaani soo celin karto
401 · 403 · 404 · 422 · 429 · 503