API Dashboard
Escrow API
Escrow Pay
CryptoExchange API :: Accepting returned items in a transaction
Accepting returned items in a transaction
Once you have verified that the items you received from the buyer are what you expected and in the condition you expected, you mark the items as accepted. This allows us to go ahead and return the funds to the buyer.
If the API call is successful, it will return the updated transaction object.
Marking all returned items as accepted
Accepting the items in a transaction allows us to return the funds to the buyer in the transaction. Accepting or rejecting the items must happen before the inspection period for the transaction completes as Cryptoexchange.com will automatically accept the goods on the sellers behalf if the inspection period lapses.
This action must be performed by the seller in the transaction. A partner cannot perform this action on behalf of the seller.
curl "https://cryptoexchange.com/api/v1/escrow/partner/transactions/44165ddd-e469-415f-a7f0-e7f5a5c316e6" \
-X PATCH \
-H "Authorization:Bearer your-api-key" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '
{
"action": "seller_accept_returned_product"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/transactions/44165ddd-e469-415f-a7f0-e7f5a5c316e6',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => json_encode(
array(
'action' => 'seller_accept_returned_product',
)
)
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);