POST /v1/orders/{order_id}/refund-preview
CheckoutService_PreviewRefund
The server validates credentials, tenant, environment and permissions. This page does not send requests. Replace example values; deployed server validation remains authoritative.
Parameters
order_idpath · string · required
Request body
amountstringOptional for RETURN_ITEMS: the server calculates the original net amount.
itemsarrayExpand fields
order_line_idstringquantitystring
modestringLEGACY_CASH (compatibility), COMPENSATION (keep benefits), RETURN_ITEMS.
order_idstring
cURL
curl --request POST 'https://nexus-api.rainlib.com/v1/orders/{order_id}/refund-preview' \
--header 'Authorization: Bearer <NEXUS_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"mode": "RETURN_ITEMS",
"items": [
{
"order_line_id": "<order-line-id>",
"quantity": "1"
}
]
}'Response contract
200 · OK
available_amountstringcoupon_actionstringcurrencystringcustomer_account_idstringdiscount_amountstringentitlement_actionstringenvironment_idstringfull_refundbooleanitem_allocationobjectExpand fields
amountsobjectMonetary allocation fields use currency minor units encoded as strings. These are purchase-time facts, never recalculated using current catalogue prices.
Expand fields
amount_minorstringline_discount_minorstringshared_discount_minorstringsubtotal_minorstring
currencystringlinesarrayExpand fields
amountsobjectMonetary allocation fields use currency minor units encoded as strings. These are purchase-time facts, never recalculated using current catalogue prices.
Expand fields
amount_minorstringline_discount_minorstringshared_discount_minorstringsubtotal_minorstring
order_line_idstringquantitystring
versionstring
items_unavailable_reasonstringmodestringorder_idstringorder_versionstringpaid_amountstringpending_amountstringpolicy_versionstringpreview_tokenstringrefunded_amountstringrequested_amountstringselected_itemsobjectExpand fields
amountsobjectMonetary allocation fields use currency minor units encoded as strings. These are purchase-time facts, never recalculated using current catalogue prices.
Expand fields
amount_minorstringline_discount_minorstringshared_discount_minorstringsubtotal_minorstring
currencystringlinesarrayExpand fields
amountsobjectMonetary allocation fields use currency minor units encoded as strings. These are purchase-time facts, never recalculated using current catalogue prices.
Expand fields
amount_minorstringline_discount_minorstringshared_discount_minorstringsubtotal_minorstring
order_line_idstringquantitystringremaining_quantitystring
transaction_idstring
Generated responses do not enumerate every runtime error. See the integration guide for authentication, conflicts and retries.