32 - Refacil (COP)

Channel: 32

Provider: Refacil

Payment Method: Wallet

Available Currencies

NameCodeCountry
Colombian pesoCOPColombia

Request example

curl --location 'http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php' \
--form 'public_key="zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks"' \
--form 'time="2024-07-17 16:33:11"' \
--form 'amount="2000"' \
--form 'currency="COP"' \
--form 'trans_id="1"' \
--form 'time_expired="120"' \
--form 'url_ok="https://bit.ly/3S4I7iR"' \
--form 'url_error="https://bit.ly/3S5aOwc"' \
--form 'channel="32"' \
--form 'signature="b675263f58700018e7e61f94b254b676ff0a33ab952b3f76b02c2204c6152f12"' \
--form 'shopper_information="{
        \"Phone\": \"3123456789\", 
        \"email\": \"[email protected]\",  
        \"name_shopper\": \"Fulano\", 
        \"Num_doc_identi\": \"112345678\", 
        \"type_doc_identi\": \"ce\", 
        \"last_name_Shopper\": \"Da Silva\",
        \"country\":\"COL\",
        \"country_code\":\"+57\"

       }"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://uat-payments.alps.cl/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' => '50','currency' => 'ARS','trans_id' => '1','time_expired' => '120','url_ok' => 'https://bit.ly/3S4I7iR','url_error' => 'https://bit.ly/3S5aOwc','channel' => '31','signature' => '5c6ebb4dced3dab4e101448a47f4ca1c3fb3776114ea181ac5ef515ed365ffd2','shopper_information' => '{
            "Phone": "1123456789", 
            "email": "[email protected]", 
            "country_code": "+54", 
            "name_shopper": "Fulanito", 
            "Num_doc_identi": "20123456", 
            "type_doc_identi": "DNI",
            "last_name_Shopper": "Pérez",                                                  
            "country": "ARG"

       }'),
));

$response = curl_exec($curl);

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

url = "http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php"

payload = {'public_key': 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks',
'time': '2024-07-17 16:33:11',
'amount': '50',
'currency': 'ARS',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'https://bit.ly/3S4I7iR',
'url_error': 'https://bit.ly/3S5aOwc',
'channel': '31',
'signature': '5c6ebb4dced3dab4e101448a47f4ca1c3fb3776114ea181ac5ef515ed365ffd2',
'shopper_information': '{
            "Phone": "1123456789", 
            "email": "[email protected]", 
            "country_code": "+54", 
            "name_shopper": "Fulanito", 
            "Num_doc_identi": "20123456", 
            "type_doc_identi": "DNI",
            "last_name_Shopper": "Pérez",                                                  
            "country": "ARG"

       }'}
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://uat-payments.alps.cl/justpay/check-out/SecurePayment.php',
  'headers': {
  },
  formData: {
    'public_key': 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks',
    'time': '2024-07-17 16:33:11',
    'amount': '50',
    'currency': 'ARS',
    'trans_id': '1',
    'time_expired': '120',
    'url_ok': 'https://bit.ly/3S4I7iR',
    'url_error': 'https://bit.ly/3S5aOwc',
    'channel': '31',
    'signature': '5c6ebb4dced3dab4e101448a47f4ca1c3fb3776114ea181ac5ef515ed365ffd2',
    'shopper_information': '{\n            "Phone": "1123456789", \n            "email": "[email protected]", \n            "country_code": "+54", \n            "name_shopper": "Fulanito", \n            "Num_doc_identi": "20123456", \n            "type_doc_identi": "DNI",\n            "last_name_Shopper": "Pérez",                                                  \n            "country": "ARG"\n\n       }'
  }
};
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. Min amount: 1000
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": "3123456789", 
        "email": "[email protected]",  
        "name_shopper": "Fulano", 
        "Num_doc_identi": "112345678", 
        "type_doc_identi": "ce", 
        "last_name_Shopper": "Da Silva",
        "country":"COL",
        "country_code":"+57"
}

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 (255)Identification document
Num_doc_identiTrueString (255)Identification document number
emailTrueString (255)Shopper's e-mail
country_codeTrueString (10)Country's phone code (Ex. +57)
PhoneTrueString (20)Shopper's phone number
countryTruestring (20)Shopper's country