Consult

Get the details of a registered order

Consult

GET https://api.payvalida.com/api/v3/porders/{order}

Sandbox URL: https://api-test.payvalida.com/api/v3/porders/{order} This method retrieves all the details of a specific order registered in our system.

Path Parameters

NameTypeDescription

order*

string

Order ID. Max. 200 characters.

Query Parameters

NameTypeDescription

merchant*

string

ID of the commerce in Payvalida. Max. 50 characters.

checksum*

string

Checksum encoded in SHA512 (order + merchant + FIXED_HASH). 512 characters.

aditionalinfo

string

ADITIONAL_INFO DATA. You can send "cuspse"

{
  "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"
    }
  }
}

Example

  • Request

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.
  • 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