commerce

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

Capture a PayPal order the buyer completed.

Alle commerce-eindpunten

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

NaamTypeVerplichtWat dit is
orderId (path)UuidJaThe order's id.

Aanvraaglichaam

NaamTypeVerplichtWat dit is
paypal_order_idstringJaThe id returned by `openPayPalOrder` and completed in the browser.

Reactie

NaamTypeVerplichtWat dit is
idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringJaHuman-friendly order reference.
statusOrderStatusJaAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeJaISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerJa
tax_minorintegerJa
discount_minorintegerJa
total_minorintegerJa
billing_countryobjectNee
placed_atobjectNee
created_atstringJa
updated_atstringNee
linesOrderLine[]Ja
paymentsPayment[]Ja

Fouten die dit eindpunt kan retourneren

401 · 403 · 404 · 422 · 429 · 503