API Dashboard
Escrow API
Escrow Pay
CryptoExchange API :: Agree to a transaction
Agree to a transaction
When the transaction is created, the terms of the transaction are automatically agreed to by the initiating party. However, it is required that the other parties in the transaction agree to the transaction before the transaction can move ahead.
Agreeing to a transaction is done by calling the transaction endpoint with action set to approved.
If the API call is successful, it will return the updated transaction object.
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": "approved"
}'
$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' => 'approved',
)
)
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);
Once you have agreed to the transaction, you can select your payment method and fund the transaction.
Example Response
{
"id": "44165ddd-e469-415f-a7f0-e7f5a5c316e6"
}