commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie billing.payment.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
orderId (path) | Uuid | Tak | The order's id. |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id | Uuid | Nie | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Nie | — |
to_wallet | boolean | Nie | 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… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Tak | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Tak | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Tak | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Tak | 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 | Tak | — |
decided_by | string | Tak | — |
decision_note | string | Tak | — |
decided_at | object | Tak | — |
refund_reference | string | Tak | Set once the refund has been issued (its idempotency key). |
created_at | string | Tak | — |
updated_at | string | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 409 · 422 · 429