Channel: 26
Provider: Payvalida
Payment Method: Cash
Available Currencies
| Name | Code | Country |
|---|---|---|
| Guatemalan Quetzal | GTQ | Guatemala |
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
| Attribute | Mandatory | Data type | Description |
|---|---|---|---|
public_key | True | String (255) | Public key, unique value that identifies the commerce |
time | True | Datetime | Request data time |
channel | True | Integer | Payment Channel |
amount | True | Double | The amount of the transaction. Use 2 decimals. |
currency | True | String (3) | Transaction currency code |
trans_id | True | String (255) | Transaction id |
time_expired | True | String (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_ok | True | String (255) | URL where shopper will be redirected from the online banking if payment was successful (Must be Https) |
url_error | True | String (255) | URL where shopper will be redirected from the online banking if payment was wrong.(Must be Https) |
signature | True | String (255) | Signature hash256: Review signature calculation |
shopper_information | True | JSON String | JSON String Data: Review JSON index & format |
shopper_information JSON 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:
| Parameter | Mandatory | Data Type | Description |
|---|---|---|---|
name_shopper | True | String (255) | Shopper's name |
last_name_Shopper | True | String (255) | Shopper's last name |
type_doc_identi | True | String (3) | Identification document type [DPI] |
Num_doc_identi | True | String (12) | Identification document number (sin puntos ni guiones) |
email | True | String (255) | Shopper's email |
country_code | True | String (4) | Country's phone code [+502] |
Phone | True | String (12) | Shopper's phone number |
country | True | String (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
| Code | Response |
|---|---|
| 0001 | El id de Cliente no es válido |
| 0002 | El código no es válido |
| 0003 | El password indicado no es válido |
| 0004 | Aliado no registrado en Payvalida |
| 0005 | Aliado no autorizado |
| 0006 | Password incorrecto |
| 0007 | La Referencia no está registrada o no es válida |
| 0008 | Cliente inactivo |
| 0009 | Error en procesamiento |
| 0010 | ID de transacción no válido |
| 0011 | Error en el contenido |
| 0012 | Imposible completar el registro |
| 0013 | ID de transacción no existe |
| 0014 | La transacción ya fue anulada |
| 0015 | La transacción no puede ser anulada. Comuníquese con atención al cliente de Payvalida |
| 0016 | Los datos del cliente no corresponden con nuestros registros. Comuníquese con [email protected] |
| 0017 | El merchantID no es válido |
| 0018 | Comercio no registrado en Payvalida |
| 0019 | Comercio no autorizado |
| 0020 | Las órdenes recurrentes solo están disponibles para Colombia |
| 0021 | El monto no es válido |
| 0022 | Código del país no es válido |
| 0023 | La moneda no es válida |
| 0024 | El tiempo máximo de la orden debe estar entre 30m y 30d |
| 0025 | El checksum no es válido |
| 0026 | No puede crear una orden de compra en la moneda especificada para el país indicado |
| 0027 | El método de pago no es válido |
| 0028 | Ha ocurrido un error en la transacción, espere unos minutos e intente de nuevo |
| 0029 | La descripción no puede estar vacía |
| 0030 | Ocurrió un error al registrar la orden. Intente de nuevo. Si persiste el error, escriba a [email protected] |
| 0031 | La fecha de expiración no es válida. Debe indicar DDMMAAAA |
| 0032 | La fecha de expiración debe ser mayor a la fecha de hoy |
| 0033 | La fecha de expiración debe ser mayor a 24 horas |
| 0034 | La cantidad de pagos debe ser mayor a 1 |
| 0035 | La frecuencia de pagos debe ser mayor a un día |
| 0036 | Imposible registrar la compra con los datos proporcionados. Contacte a [email protected] |
| 0037 | Merchant no autorizado |
| 0038 | El cliente ya se encuentra vinculado |
| 0039 | Las cuentas no están vinculadas |
| 0040 | Los datos no coinciden |
| 0041 | La orden no está registrada o está APROBADA, VENCIDA o CANCELADA |
| 0042 | Ya existe una orden con el mismo PO_ID |
| 0043 | Ya existe una orden activa con la misma referencia de pago |
| 0044 | El 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) |
| 0045 | Debe indicar una referencia de pago |
| 0046 | La orden indicada no pertenece al comercio indicado |
| 0047 | Debe indicar el email |
| 0050 | Operación no definida |
| 0051 | Falta o no es válido el lifetime |
| 0052 | Falta o no es válido el lifetime |
| 0053 | Tiene una operación en proceso de pago |
| 0060 | Ha superado el límite de transacciones permitidas. Contáctenos para completar su inscripción |
| 0061 | El código de comercio no existe |
| 0062 | Debe indicar true o false en confirm |
| 0063 | La fecha de vencimiento no es válida |
| 0070 | Comercio no autoriza transacción |
| 0071 | Comercio no permite cancelar la transacción |
| 0090 | Error comunicación con comercio |
| 0400 | Couldn't get transaction limit |
| 0401 | Error getting transaction limits |
