commerce

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

Capture a PayPal order the buyer completed.

Todos os endpoints de commerce

Autenticação

Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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> }'

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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.

Parâmetros

NomeTipoObrigatórioO que é
orderId (path)UuidSimThe order's id.

Corpo da requisição

NomeTipoObrigatórioO que é
paypal_order_idstringSimThe id returned by `openPayPalOrder` and completed in the browser.

Resposta

NomeTipoObrigatórioO que é
idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringSimHuman-friendly order reference.
statusOrderStatusSimAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeSimISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerSim
tax_minorintegerSim
discount_minorintegerSim
total_minorintegerSim
billing_countryobjectNão
placed_atobjectNão
created_atstringSim
updated_atstringNão
linesOrderLine[]Sim
paymentsPayment[]Sim

Erros que este endpoint pode retornar

401 · 403 · 404 · 422 · 429 · 503