Consultar

Consulta los detalles de una orden registrada.

Si el campo aditionalinfo no es enviado en el request, no aparecerá el campo ADITIONAL_INFO en el response. Si este campo es enviado, llegará vacío junto con el campo CUS dentro de éste por defecto, a excepción de un pago exitoso con PSE en el cual se enviará el número del cus.

La identificación del comercio (merchant) y FIXED_HASH, se proporcionan al momento de crear una cuenta en nuestra plataforma.

Ejemplos

  • GO

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))
}
  • PHP

<?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;
  • Java

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();
  • Python

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"))
  • JavaScript

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));

Última actualización