commerce

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

Request a refund for an order.

Všechny koncové body commerce

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ázevTypPožadovánoCo to je
orderId (path)UuidAnoThe order's id.

Tělo požadavku

NázevTypPožadovánoCo to je
org_idUuidNeUUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringNe
to_walletbooleanNeWhere 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ázevTypPožadovánoCo to je
idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusAnoA refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassAnoHow the refund policy classified a request (captured at request time).
amountMoneyAmountAnoA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanAnoRefund 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…
reasonstringAno
decided_bystringAno
decision_notestringAno
decided_atobjectAno
refund_referencestringAnoSet once the refund has been issued (its idempotency key).
created_atstringAno
updated_atstringAno

Chyby, které může tento koncový bod vrátit

401 · 403 · 404 · 409 · 422 · 429