commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.payment.manage; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
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}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'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
Opens a refund request per the policy: within the 30-day money-back window the refund is issued immediately (status `auto_approved`); otherwise a pro-rata request is recorded `pending` for staff approval (docs/05 §4.13). The amount and approval path come from the server, never the client. Requires `billing.payment.manage`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
orderId (path) | Uuid | Sim | The order's id. |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | Uuid | Não | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Não | — |
to_wallet | boolean | Não | Where the refund goes. Omit it and the money is returned to the original payment method — the money-back guarantee is money back, and store credit is an opt-in the customer has… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Sim | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Sim | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Sim | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Sim | Refund destination, frozen at request time — `false` (the default) reverses the original payment, `true` credits the account wallet. Any part of the order that was settled from… |
reason | string | Sim | — |
decided_by | string | Sim | — |
decision_note | string | Sim | — |
decided_at | object | Sim | — |
refund_reference | string | Sim | Set once the refund has been issued (its idempotency key). |
created_at | string | Sim | — |
updated_at | string | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 404 · 409 · 422 · 429