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