commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس billing.payment.manage اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
جہاں آپ کی تنظیم کی آئی ڈی آتی ہے
یہ اینڈ پوائنٹ JSON باڈی میں ایک فیلڈ کے طور پر org_id لیتا ہے۔
آپ کی تنظیم کی آئی ڈی آپ کے ڈیش بورڈ پر 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