commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění billing.payment.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako pole v těle JSON.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
orderId (path) | Uuid | Ano | The order's id. |
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id | Uuid | Ne | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Ne | — |
to_wallet | boolean | Ne | 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… |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Ano | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Ano | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Ano | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Ano | 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 | Ano | — |
decided_by | string | Ano | — |
decision_note | string | Ano | — |
decided_at | object | Ano | — |
refund_reference | string | Ano | Set once the refund has been issued (its idempotency key). |
created_at | string | Ano | — |
updated_at | string | Ano | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 409 · 422 · 429