Orders > Orders > ordersCalculateRefund
Commerce APIOrdersOrdersordersCalculateRefund
ordersCalculateRefund
POST:orders/calculate_refund.json

Description

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

Permission bit: "orders.refund"

Topic: Orders

Arguments

data: OrderRefund

Main argument for mutations.


order_id: String!

Unique order identifier. See also: Unique Identifiers

Example: "or_EQzGqWoY"


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

customer_balance: Int

Amount of money to refund to customer's balance

Example: 52600


full_refund: Boolean

Whether to perform full refund or not

Example: false


full_restock: Boolean

Whether to perform full restock or not

Example: false


line_items: [OrderRefundLineItem!]


notify: Boolean

Whether to notify customer about refund via email or not

Example: false


reason: OrderRefundReason

Reason why order is refunded

Example: "adjustment"


shipping: OrderRefundShipping


undo_coupon_usage: Boolean

Undo coupon and promotion usage, does nothing but decrements "times used" property on the coupon and promotion

Example: false


Result

CalculatedRefund

Preview (typescript)

Loading module