commerce

POST /v1/orders/{orderId}/refund-request

Request a refund for an order.

Wszystkie punkty końcowe commerce

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

NazwaTypWymaganeCo to jest
orderId (path)UuidTakThe order's id.

Treść żądania

NazwaTypWymaganeCo to jest
org_idUuidNieUUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringNie
to_walletbooleanNieWhere 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ź

NazwaTypWymaganeCo to jest
idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusTakA refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassTakHow the refund policy classified a request (captured at request time).
amountMoneyAmountTakA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanTakRefund 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…
reasonstringTak
decided_bystringTak
decision_notestringTak
decided_atobjectTak
refund_referencestringTakSet once the refund has been issued (its idempotency key).
created_atstringTak
updated_atstringTak

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 409 · 422 · 429