This page explains how to tell us that an order is an exchange.
Ravelin captures customer exchanges by recording an exchange order when a customer returns an item and exchanges it for another one.
The exchange order will be linked to the original order and any other related exchanges, all of which will be visible in the Ravelin dashboard.
Exchange orders will not be included in machine learning features, rule conditions, and dashboard insights.
To send an exchange order you should send an order.exchange object as part of the order details sent via the v2/checkout API with:
isExchange set to trueparentOrderId with the order ID of the original order.{
"order": {
"exchange": {
"isExchange": true,
"parentOrderId": "exch123"
}
}
}The exchange order must contain the exchange object; the parentOrderId field in this must be the ID of the original order. If the parentOrderId field is not sent then Ravelin will not be able to link the original order and display any related orders in the dashboard.
In case of multiple exchanges, each parentOrderId should reference the directly preceding order, not the original order where the exchange chain began. Ravelin will automatically process each parent order reference to determine the original order and link all related orders together.
How you handle transactions for an exchange depends on the value of the new items compared to the original purchase.
If the new item has the same value as the original, no transaction or payment method is required for the exchange order.
For the original order that generated the exchange, the status should remain fulfilled. That is, order.status.stage should have the value "fulfilled".
If the new item is more expensive, you can send a transaction with the payment method used to cover the price difference as part of the exchange order.
For the original order that generated the exchange, the status should remain fulfilled. That is, order.status.stage should have the value "fulfilled".
If the new item is cheaper, you must send a transaction where transaction.type is set to "refund".
This refund transaction should be associated with the original order that generated the exchange, not the new exchange order itself, using the v2/checkout endpoint.
As there is a refund transaction, the original order status should also be updated to refunded. That is, order.status.stage should be set to the value "refunded".
In addition to sending an exchange order, you should also send a separate refund request in the v2/refund API detailing the items the customer is returning.
This refund request must be sent with refundType=exchange.
You should only send the refund if you have integrated with our Refund Abuse product and the v2/refund endpoint.
Was this page helpful?