200 The execution returns a JSON following this structure:
Copiar {
"CODE" : "0000" ,
"DESC" : "OK" ,
"DATA" : {
"CURRENCY" : "COP" ,
"NOTIFICATION_RESPONSE" : "Error al procesar los datos" ,
"UDPATE_DATE" : "2022-02-07 10:48:21" ,
"CREATION_DATE" : "2022-02-07 10:45:57" ,
"STATE" : "APROBADA" ,
"PAYMNENT_METHOD" : "PSE" ,
"EMAIL" : "someone@example.com" ,
"LIFE_TIME" : "445h" ,
"ORDER" : "prue303459" ,
"CODE" : 2202776 ,
"AMOUNT" : "120.00" ,
"DESCRIPTION" : "prueb040" ,
"REFERENCE" : "80011572" ,
"checkout" : "sandbox-checkout.payvalida.com?token=tokencheckout" ,
"TRANSACTION" : {} ,
"ADITIONAL_INFO" : {
"CUS" : "2539443"
}
}
}
Copiar curl --location --request GET 'https://api-test.payvalida.com/api/v3/porders/prue303459?merchant=kuanto&checksum=cheksuminvalido&aditionalinfo=cuspse' The commerce (merchant) id and the FIXED_HASH are provided when you create an account in our platform.
Copiar package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main () {
url := "https://api-test.payvalida.com/api/v3/porders/9022932?merchant=kuanto&checksum=7CA708050F7F5B3EB5B9FD271D375DCEFCA71BDEFDF91C96A4C38F906EFA133E95675D332279C89F999B1909ECF2EBCA7EC177ACED6EA56D1A72244145E377B7"
method := "GET"
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/9022932?merchant=kuanto&checksum=7CA708050F7F5B3EB5B9FD271D375DCEFCA71BDEFDF91C96A4C38F906EFA133E95675D332279C89F999B1909ECF2EBCA7EC177ACED6EA56D1A72244145E377B7" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Copiar OkHttpClient client = new OkHttpClient() . newBuilder ()
. build ();
Request request = new Request . Builder ()
. url ( "https://api-test.payvalida.com/api/v3/porders/9022932?merchant=kuanto&checksum=7CA708050F7F5B3EB5B9FD271D375DCEFCA71BDEFDF91C96A4C38F906EFA133E95675D332279C89F999B1909ECF2EBCA7EC177ACED6EA56D1A72244145E377B7" )
. method ( "GET" , null )
. build ();
Response response = client . newCall (request) . execute ();
Copiar import http . client
import mimetypes
conn = http . client . HTTPSConnection ( "api-test.payvalida.com" )
payload = ''
headers = {}
conn . request ( "GET" , "/api/v3/porders/9022932?merchant=kuanto&checksum=7CA708050F7F5B3EB5B9FD271D375DCEFCA71BDEFDF91C96A4C38F906EFA133E95675D332279C89F999B1909ECF2EBCA7EC177ACED6EA56D1A72244145E377B7" , payload, headers)
res = conn . getresponse ()
data = res . read ()
print (data. decode ( "utf-8" ))
Copiar var myHeaders = new Headers ();
var requestOptions = {
method : 'GET' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://api-test.payvalida.com/api/v3/porders/9022932?merchant=kuanto&checksum=7CA708050F7F5B3EB5B9FD271D375DCEFCA71BDEFDF91C96A4C38F906EFA133E95675D332279C89F999B1909ECF2EBCA7EC177ACED6EA56D1A72244145E377B7" , requestOptions)
.then (response => response .text ())
.then (result => console .log (result))
.catch (error => console .log ( 'error' , error));