commerce

POST /v1/orders/{orderId}/refund-request

Request a refund for an order.

جميع نقاط نهاية commerce

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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

التفاصيل

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_idUuidلاUUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringلا
to_walletbooleanلا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…

الاستجابة

الاسمالنوعمطلوبما هو هذا
idUuidنعمUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidنعمUUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidنعمUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusنعمA refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassنعمHow the refund policy classified a request (captured at request time).
amountMoneyAmountنعمA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanنعم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…
reasonstringنعم
decided_bystringنعم
decision_notestringنعم
decided_atobjectنعم
refund_referencestringنعمSet once the refund has been issued (its idempotency key).
created_atstringنعم
updated_atstringنعم

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 404 · 409 · 422 · 429