commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա billing.payment.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այս վերջնակետը JSON մարմնում որպես դաշտ վերցնում է org_id-ը։
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում
Մանրամասներ
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`.
Պարամետրեր
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
orderId (path) | Uuid | Այո | The order's id. |
Հարցման մարմին
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
org_id | Uuid | Ոչ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Ոչ | — |
to_wallet | boolean | Ոչ | 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… |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
id | Uuid | Այո | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Այո | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Այո | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Այո | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Այո | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Այո | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Այո | 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 | Այո | — |
decided_by | string | Այո | — |
decision_note | string | Այո | — |
decided_at | object | Այո | — |
refund_reference | string | Այո | Set once the refund has been issued (its idempotency key). |
created_at | string | Այո | — |
updated_at | string | Այո | — |
Այս վերջնակետի կողմից վերադարձվող սխալները
401 · 403 · 404 · 409 · 422 · 429