commerce

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

Request a refund for an order.

Lahat ng commerce endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na billing.payment.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Ang endpoint na ito ay kumukuha ng org_id bilang isang field sa JSON body.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

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`.

Mga Parameter

PangalanUriKailanganAno ito
orderId (path)UuidOoThe order's id.

Katawan ng kahilingan

PangalanUriKailanganAno ito
org_idUuidHindiUUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringHindi
to_walletbooleanHindiWhere 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…

Tugon

PangalanUriKailanganAno ito
idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusOoA refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassOoHow the refund policy classified a request (captured at request time).
amountMoneyAmountOoA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanOoRefund 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…
reasonstringOo
decided_bystringOo
decision_notestringOo
decided_atobjectOo
refund_referencestringOoSet once the refund has been issued (its idempotency key).
created_atstringOo
updated_atstringOo

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 409 · 422 · 429