/canceltransaction
This function allows you to cancel transactions.
- Endpoint: https://app.fideljet.com/rest/canceltransaction
- Type: Post
apikey | API KEY | You can get it from your profil https://app.Fideljet.com/profil then apikey section | transaction_id | Transaction id | Transaction id, mandatory if external_id value is empty |
external_id | External transaction Id | External transaction Id, mandatory if transaction_id value is empty |
Here is a PHP exemple:
<?php $curl = curl_init(); $apikey = "YOUR_API_KEY"; $transaction_id = "_Transaction_id_"; // Transaction Id $external_id = '_External_id_';// External id curl_setopt_array($curl, array( CURLOPT_URL => "https://app.fideljet.com/rest/canceltransaction", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{ \"apikey\":\"$apikey\",\"transaction_id\":\"$transaction_id\",\"external_id\":\"$external_id\"}", CURLOPT_HTTPHEADER => array( "accept: application/json", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> /* Exemple result { "message":"Success", "success":true } */