commerce
POST /v1/orders/{orderId}/paypal/capture
Capture a PayPal order the buyer completed.
Authenticatie
Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
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> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
orderId (path) | Uuid | Ja | The order's id. |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
paypal_order_id | string | Ja | The id returned by `openPayPalOrder` and completed in the browser. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Ja | Human-friendly order reference. |
status | OrderStatus | Ja | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Ja | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Ja | — |
tax_minor | integer | Ja | — |
discount_minor | integer | Ja | — |
total_minor | integer | Ja | — |
billing_country | object | Nee | — |
placed_at | object | Nee | — |
created_at | string | Ja | — |
updated_at | string | Nee | — |
lines | OrderLine[] | Ja | — |
payments | Payment[] | Ja | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422 · 429 · 503