200 The execution returns a JSON following this structure:
Copiar {
"CODE":"0000",
"DATA":{
"Reference":"3102292330",
"Amount":"0.0",
"Operation":"DELETED",
"OrderID":"1496953766724_6",
"PVOrderID":"95585"
},
"DESC":"OK"
}
Eliminating an order doesn't mean that is not available anymore.
You can't register a new order with the same order number of an eliminated one. The order number is unique regardless of its state.
The commerce (merchant) id and the FIXED_HASH are provided when you create an account in our platform.
Copiar curl --location --request DELETE 'https://api-test.payvalida.com/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6'
Copiar package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-test.payvalida.com/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6"
method := "DELETE"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Copiar <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api-test.payvalida.com/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => array(
"Cookie: __cfduid=db2ca6d84048cb8569438db5fe37b82a01606749049"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Copiar import http.client
import mimetypes
conn = http.client.HTTPSConnection("api-test.payvalida.com")
payload = ''
headers = {}
conn.request("DELETE", "/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Copiar OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api-test.payvalida.com/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6")
.method("DELETE", body)
.build();
Response response = client.newCall(request).execute();
Copiar var myHeaders = new Headers();
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api-test.payvalida.com/api/v3/porders/test11031?merchant=kuanto&checksum=9D96D9213893F3070C77215FC460E6432AA2052FC1B72375983B5A38D1FBC4BB98C21F8D81EAB1A35534D977A2C19171E44C949C4B508645402C3EB8BD7F7BF6", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));