انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Refund order

POST/admin/v1/stores/{store_id}/orders/{order_id}/refunds
  • orders:refund
  • يدعم Idempotency-Key

Return money through the order's payments and/or take items back (optionally restocking them).

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

  • order_idstringمطلوب

    معرّف من نوع ord، مثل ord_01k8qs5s….

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • linesarray of objects
  • shippinginteger · أو null

    Delivery money to return, in minor units.

  • amountinteger · أو null

    Money to return in minor units; omit for the items' value plus shipping.

  • reasonstring · أو null

    Shown to staff only.

  • notify_customerboolean

    Tell the customer about the refund (on the channels the store chose for it).

ما يُرجعه

201 Refunded; the updated order.

الأخطاء

  • 403forbiddenMissing permission.
  • 404not_foundNo such order.
  • 409Nothing to refund, or the provider refused.
  • 422validation_failedInvalid quantities or amounts.
  • 503unavailableThe provider did not answer.