26 - Payvalida - GTQ

Channel: 26

Provider: Payvalida

Payment Method: Cash

Available Currencies

NameCodeCountry
Guatemalan QuetzalGTQGuatemala

Request example

curl --location 'http://localhost/justpay/check-out/SecurePayment.php' \
--form 'public_key="zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks"' \
--form 'time="2024-07-17 16:33:11"' \
--form 'amount="5"' \
--form 'currency="GTQ"' \
--form 'trans_id="1"' \
--form 'time_expired="120"' \
--form 'url_ok="https://bit.ly/3S4I7iR"' \
--form 'url_error="https://bit.ly/3S5aOwc"' \
--form 'channel="26"' \
--form 'signature="31872a94a2c727d817d5f2a1433a10df944f530f0cc02c2aad57391519b13108"' \
--form 'shopper_information="{
      \"Phone\": \"41234567\", 
      \"email\": \"[email protected]\", 
      \"country_code\": \"+502\", 
      \"name_shopper\": \"Fulano\", 
      \"Num_doc_identi\": \"1234567890123\", 
      \"type_doc_identi\": \"DPI\", 
      \"last_name_Shopper\": \"Da Silva\",
      \"country\":\"GTM\"}"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://localhost/justpay/check-out/SecurePayment.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('public_key' => 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks','time' => '2024-07-17 16:33:11','amount' => '5','currency' => 'GTQ','trans_id' => '1','time_expired' => '120','url_ok' => 'https://bit.ly/3S4I7iR','url_error' => 'https://bit.ly/3S5aOwc','channel' => '26','signature' => '31872a94a2c727d817d5f2a1433a10df944f530f0cc02c2aad57391519b13108','shopper_information' => '{
      "Phone": "41234567", 
      "email": "[email protected]", 
      "country_code": "+502", 
      "name_shopper": "Fulano", 
      "Num_doc_identi": "1234567890123", 
      "type_doc_identi": "DPI", 
      "last_name_Shopper": "Da Silva",
      "country":"GTM"}'),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "http://localhost/justpay/check-out/SecurePayment.php"

payload = {'public_key': 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks',
'time': '2024-07-17 16:33:11',
'amount': '5',
'currency': 'GTQ',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'https://bit.ly/3S4I7iR',
'url_error': 'https://bit.ly/3S5aOwc',
'channel': '26',
'signature': '31872a94a2c727d817d5f2a1433a10df944f530f0cc02c2aad57391519b13108',
'shopper_information': '{
      "Phone": "41234567", 
      "email": "[email protected]", 
      "country_code": "+502", 
      "name_shopper": "Fulano", 
      "Num_doc_identi": "1234567890123", 
      "type_doc_identi": "DPI", 
      "last_name_Shopper": "Da Silva",
      "country":"GTM"}'}
files=[

]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'http://localhost/justpay/check-out/SecurePayment.php',
  'headers': {
  },
  formData: {
    'public_key': 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks',
    'time': '2024-07-17 16:33:11',
    'amount': '5',
    'currency': 'GTQ',
    'trans_id': '1',
    'time_expired': '120',
    'url_ok': 'https://bit.ly/3S4I7iR',
    'url_error': 'https://bit.ly/3S5aOwc',
    'channel': '26',
    'signature': '31872a94a2c727d817d5f2a1433a10df944f530f0cc02c2aad57391519b13108',
    'shopper_information': '{\n      "Phone": "41234567", \n      "email": "[email protected]", \n      "country_code": "+502", \n      "name_shopper": "Fulano", \n      "Num_doc_identi": "1234567890123", \n      "type_doc_identi": "DPI", \n      "last_name_Shopper": "Da Silva",\n      "country":"GTM"}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Mandatory Data

AttributeMandatoryData typeDescription
public_keyTrueString (255)Public key, unique value that identifies the commerce
timeTrueDatetimeRequest data time
channelTrueIntegerPayment Channel
amountTrueDoubleThe amount of the transaction. Use 2 decimals.
currencyTrueString (3)Transaction currency code
trans_idTrueString (255)Transaction id
time_expiredTrueString (255)Time in minutes to expire the token. Value given in minutes. Minimum Suggested: Online: 30 minutes Cash: 2 hours For Brazil: Online: 2 hours Cash 24 hrs
url_okTrueString (255)URL where shopper will be redirected from the online banking if payment was successful (Must be Https)
url_errorTrueString (255)URL where shopper will be redirected from the online banking if payment was wrong.(Must be Https)
signatureTrueString (255)Signature hash256: Review signature calculation
shopper_informationTrueJSON StringJSON String Data: Review JSON index & format

shopper_information JSON format

📘

Field shopper_information must be send in string format (JSON encode).

{"Phone": "41234567", "email": "[email protected]", "country_code": "+502", "name_shopper": "Fulano", "Num_doc_identi": "1234567890123", "type_doc_identi": "DPI", "last_name_Shopper": "Da Silva", "country":"GTM"}

The shopper_information field is a column corresponding to a json with the next keys:

ParameterMandatoryData TypeDescription
name_shopperTrueString (255)Shopper's name
last_name_ShopperTrueString (255)Shopper's last name
type_doc_identiTrueString (3)Identification document type [DPI]
Num_doc_identiTrueString (12)Identification document number (sin puntos ni guiones)
emailTrueString (255)Shopper's email
country_codeTrueString (4)Country's phone code [+502]
PhoneTrueString (12)Shopper's phone number
countryTrueString (3)Country ISO code [QTM

Errors

To better error handling, we'll return the errors in the response body using the following fields:

{
  "error":{
    "code":"UNAUTHORIZED_RESOURCE",
    "message":"Resource being accessed is unauthorized."
  }
}

Excepcions

CodeResponse
0001El id de Cliente no es válido
0002El código no es válido
0003El password indicado no es válido
0004Aliado no registrado en Payvalida
0005Aliado no autorizado
0006Password incorrecto
0007La Referencia no está registrada o no es válida
0008Cliente inactivo
0009Error en procesamiento
0010ID de transacción no válido
0011Error en el contenido
0012Imposible completar el registro
0013ID de transacción no existe
0014La transacción ya fue anulada
0015La transacción no puede ser anulada. Comuníquese con atención al cliente de Payvalida
0016Los datos del cliente no corresponden con nuestros registros. Comuníquese con [email protected]
0017El merchantID no es válido
0018Comercio no registrado en Payvalida
0019Comercio no autorizado
0020Las órdenes recurrentes solo están disponibles para Colombia
0021El monto no es válido
0022Código del país no es válido
0023La moneda no es válida
0024El tiempo máximo de la orden debe estar entre 30m y 30d
0025El checksum no es válido
0026No puede crear una orden de compra en la moneda especificada para el país indicado
0027El método de pago no es válido
0028Ha ocurrido un error en la transacción, espere unos minutos e intente de nuevo
0029La descripción no puede estar vacía
0030Ocurrió un error al registrar la orden. Intente de nuevo. Si persiste el error, escriba a [email protected]
0031La fecha de expiración no es válida. Debe indicar DDMMAAAA
0032La fecha de expiración debe ser mayor a la fecha de hoy
0033La fecha de expiración debe ser mayor a 24 horas
0034La cantidad de pagos debe ser mayor a 1
0035La frecuencia de pagos debe ser mayor a un día
0036Imposible registrar la compra con los datos proporcionados. Contacte a [email protected]
0037Merchant no autorizado
0038El cliente ya se encuentra vinculado
0039Las cuentas no están vinculadas
0040Los datos no coinciden
0041La orden no está registrada o está APROBADA, VENCIDA o CANCELADA
0042Ya existe una orden con el mismo PO_ID
0043Ya existe una orden activa con la misma referencia de pago
0044El tiempo de vida no es válido. Debe tener formato NNNX, donde NNN es un número y X una letra (m, h o d)
0045Debe indicar una referencia de pago
0046La orden indicada no pertenece al comercio indicado
0047Debe indicar el email
0050Operación no definida
0051Falta o no es válido el lifetime
0052Falta o no es válido el lifetime
0053Tiene una operación en proceso de pago
0060Ha superado el límite de transacciones permitidas. Contáctenos para completar su inscripción
0061El código de comercio no existe
0062Debe indicar true o false en confirm
0063La fecha de vencimiento no es válida
0070Comercio no autoriza transacción
0071Comercio no permite cancelar la transacción
0090Error comunicación con comercio
0400Couldn't get transaction limit
0401Error getting transaction limits