commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ billing.payment.manage។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
កន្លែងដែលលេខសម្គាល់អង្គការរបស់អ្នកត្រូវដាក់
ចំនុចបញ្ចប់នេះទទួលយក org_id ជាវាលមួយនៅក្នុងតួ JSON។
លេខសម្គាល់អង្គការរបស់អ្នកស្ថិតនៅលើអេក្រង់គ្រាប់ចុច API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក នៅជាប់នឹងគ្រាប់ចុចផ្ទាល់តែម្ដង។ វាគឺជាលេខសម្គាល់ដូចគ្នានៅក្នុងការហៅទូរសព្ទនីមួយៗដែលអ្នកធ្វើ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង 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