CryptoExchange API :: Returning items in a transaction
Returning items in a transaction
If a transaction's items have been rejected by the buyer, we will instruct the buyer to return the goods. Shipment can be both physical delivery and non physical delivery.
Physical delivery refers to items that are shipped via courier and can be tracked via a tracking number. Non physical delivery is for electronic items such as domain names. While these don't require a tracking number, we do accept other ways of determining that the seller has received the rejected goods. For example, with domain names we track the changes to the WHOIS information.
Marking all items as returned
Similarly to marking all items as shipped, marking a transaction and all of its items as returned is a simple patch request to the transaction endpoint with the action attribute set to seller_waiting_product_back. As with the ship action, tracking_information may also be set.
If the API call is successful, it will return the updated transaction object.
curl "https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86" \
-X PATCH \
-H "Authorization:Bearer your-api-key" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '
{
"action": "seller_waiting_product_back",
"carrier": "UPS",
"tracking_id": "1Z999AA10123456784"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '
{
"action": "seller_waiting_product_back",
"carrier": "UPS",
"tracking_id": "1Z999AA10123456784"
}'
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);
Marking domain name items as returned
The ship return endpoint is also used to mark a domain name as transferred in return. For domains, you must indicate the authorization type you used to transfer the domain. The allowed values for authorization_type are push, authorization_code or username_password.
curl "https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86" \
-X PATCH \
-H "Authorization:Bearer your-api-key" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '
{
"action": "seller_waiting_product_back"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '
{
"action": "seller_waiting_product_back"
}
'
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);