POST:orders/calculate_refund.json
Commerce APIPOST:orders/calculate_refund.json

POST:orders/calculate_refund.json

Description

Calculate refund tax details for the order based on refund input parameters.

Permission bit: "orders.refund"

Topic: Orders

Query Parameters

order_id: String, required

Unique order identifier. See also: Unique Identifiers

Example: ?order_id=or_EQzGqWoY


shop_id: String, required

Unique shop identifier. See also: Unique Identifiers

Example: ?shop_id=sh_EQzGqWoY

Request Body

OrderRefund

{
  "customer_balance": 52600,
  "full_refund": false,
  "full_restock": false,
  "line_items": [
    {
      "dest_inventory_location_id": "il_EQzGqWoY",
      "fulfillment_id": "fu_EQzGqWoY",
      "inventory_location_id": "il_EQzGqWoY",
      "line_item_id": "li_EQzGqWoY",
      "refund_amount": 768,
      "refund_fee": 234,
      "restock_quantity": 4,
      "variant_id": "va_EQzGqWoY"
    }
  ],
  "notify": false,
  "reason": "adjustment",
  "shipping": {
    "refund_amount": 657,
    "refund_fee": 234
  },
  "undo_coupon_usage": false
}

Response Body

CalculatedRefund

Response Body Type

Loading module