post
https://api.talkdeskapp.com/erc/ecommerce/refund/suggested
Calculate the suggested refund for an order or return. Supports two workflows: (1) direct refund from an order with specified line items, or (2) refund after a return where line items and totals are pre-calculated from the return.
Required fields:
- order_id or return_id (one must be provided)
A successful request returns the suggested refund details for the specified order or return.
For Shopify:
- With a return_id, the amounts are Shopify's suggested outcome for the whole order (financial_outcome), with or without exchange items. As in
the Shopify admin, the items are first netted against what the order already owes. - With only an order_id, the amounts are the full value of the selected items. They are not netted against what the order owes.
Returns with exchange items (return_id only):
- Send the exchange items in exchange_line_items, together with the return line items in refund_line_items, to see what processing them together
would do. Their prices are netted, and financial_outcome tells whether money is refunded (REFUND), the customer owes money (INVOICE), or nothing
is owed either way (EVEN). - financial_outcome is for the whole order: the items are first netted against what the order already owes. The restocking fees and the return
shipping fees are already taken out of it. - Without exchange_line_items, only the return line items are calculated, and return_context.exchange_line_items still lists the exchange
items left to process. A return line item quantity above what is left to process makes the request fail with 400 while
the return still has exchange items to process; for a return without them, the quantity is lowered to what is left instead. - The display data of the exchange items (title, variant_title, sku, image_url, unit_price) comes from the synced product catalog.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…