commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
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
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
orderId (path) | Uuid | Oo | The order's id. |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
org_id | Uuid | Hindi | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Hindi | — |
to_wallet | boolean | Hindi | 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… |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Oo | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Oo | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Oo | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Oo | 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 | Oo | — |
decided_by | string | Oo | — |
decision_note | string | Oo | — |
decided_at | object | Oo | — |
refund_reference | string | Oo | Set once the refund has been issued (its idempotency key). |
created_at | string | Oo | — |
updated_at | string | Oo | — |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 409 · 422 · 429