This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Calculates refund amounts for a given list of an order's line items, shipping, and additional fees.
You can only call this method when authenticated as a Wix app or Wix user identity.
Order ID.
List of line items, shipping and additional fees to be calculated for refund.
Aggregated summary of all items provided for refund.
This field is not returned when refund is not available for the given list of items.
Calculated summary of each item provided for refund.
Whether refund is available for the given list of items.
If the calculated refund is not available, this field contains error details and amounts for each item.
Calculate valid refund for 1 line item and 1 additional fee.
curl -X POST \
'https://www.wixapis.com/ecom/v1/order-billing/calculate-refund' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
--data-binary '{
"orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836",
"refundItems": {
"lineItems": [
{
"lineItemId": "00000000-0000-0000-0000-000000000001",
"quantity": 1
}
],
"additionalFees": [
{
"additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f",
"amount": {
"amount": "1"
}
}
]
}
}'
{
"summary": {
"total": {
"amount": "23.00",
"formattedAmount": "$23.00"
},
"tax": {
"amount": "2.00",
"formattedAmount": "$2.00"
},
"discount": {
"amount": "0.00",
"formattedAmount": "$0.00"
},
"subtotal": {
"amount": "21.00",
"formattedAmount": "$21.00"
},
"lineItemsSubtotal": {
"amount": "20.00",
"formattedAmount": "$20.00"
},
"additionalFeesTotal": {
"amount": "1",
"formattedAmount": "$1.00"
}
},
"calculatedRefundItems": {
"lineItems": [
{
"item": {
"lineItemId": "00000000-0000-0000-0000-000000000001",
"quantity": 1
},
"summary": {
"total": {
"amount": "22.00",
"formattedAmount": "$22.00"
},
"tax": {
"amount": "2.00",
"formattedAmount": "$2.00"
},
"discount": {
"amount": "0.00",
"formattedAmount": "$0.00"
},
"subtotal": {
"amount": "20.00",
"formattedAmount": "$20.00"
}
}
}
],
"additionalFees": [
{
"additionalFee": {
"additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f",
"amount": {
"amount": "1",
"formattedAmount": ""
}
},
"summary": {
"total": {
"amount": "1",
"formattedAmount": "$1.00"
},
"tax": {
"amount": "0.00",
"formattedAmount": "$0.00"
},
"discount": {
"amount": "0",
"formattedAmount": "$0.00"
},
"subtotal": {
"amount": "1.00",
"formattedAmount": "$1.00"
}
}
}
]
},
"available": true
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.