commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya billing.payment.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Sehemu hii ya mwisho inachukua org_id kama uwanja katika mwili wa JSON.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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`.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
orderId (path) | Uuid | Ndiyo | The order's id. |
Mwili wa ombi
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
org_id | Uuid | Hapana | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Hapana | — |
to_wallet | boolean | Hapana | 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… |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Ndiyo | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Ndiyo | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Ndiyo | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Ndiyo | 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 | Ndiyo | — |
decided_by | string | Ndiyo | — |
decision_note | string | Ndiyo | — |
decided_at | object | Ndiyo | — |
refund_reference | string | Ndiyo | Set once the refund has been issued (its idempotency key). |
created_at | string | Ndiyo | — |
updated_at | string | Ndiyo | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 404 · 409 · 422 · 429