Channel: 8

Provider: iPag

Payment Method: Debit / Credit Card

Available Currencies

NameCodeCountry
Brazilian realBRLBrazil

Request example

curl --request POST \
  --url http://paymentscert.alps.cl/justpay/check-out/SecurePayment \
  --data public_key=zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks \
  --data time=2022-10-13T14:39:09 \
  --data channel=8 \
  --data amount=100 \
  --data currency=BRL \
  --data trans_id=1 \
  --data time_expired=120 \
  --data url_ok=https://bit.ly/3S4I7iR \
  --data url_error=https://bit.ly/3S5aOwc \
  --data signature=e22ef7fd3b7a7fa155f39dd966098b17cf7106b41e38544383487de0124e6208 \
  --data 'shopper_information={"Phone": "11995588222","email": "[email protected]","country_code": "BRL","name_shopper": "Jhon","Num_doc_identi": "44227766880","type_doc_identi": "CPF","last_name_Shopper": "Snow","address": {"zipcode": "01156060","street": "Rua Júlio Gonzalez","number": "1044","district": "Barra Funda","complement": "Sala 01","city": "São Paulo","state": "SP"}}'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "http://paymentscert.alps.cl/justpay/check-out/SecurePayment",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "public_key=zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks&time=2022-10-13T14%3A39%3A09&channel=8&amount=1.01&currency=BRL&trans_id=1&time_expired=120&url_ok=https%3A%2F%2Fbit.ly%2F3S4I7iR&url_error=https%3A%2F%2Fbit.ly%2F3S5aOwc&signature=e22ef7fd3b7a7fa155f39dd966098b17cf7106b41e38544383487de0124e6208&shopper_information=%7B%22Phone%22%3A%20%2211995588222%22%2C%22email%22%3A%20%22no-reply%40alps.cl%22%2C%22country_code%22%3A%20%22BRL%22%2C%22name_shopper%22%3A%20%22Jhon%22%2C%22Num_doc_identi%22%3A%20%2244227766880%22%2C%22type_doc_identi%22%3A%20%22CPF%22%2C%22last_name_Shopper%22%3A%20%22Snow%22%2C%22address%22%3A%20%7B%22zipcode%22%3A%20%2201156060%22%2C%22street%22%3A%20%22Rua%20J%C3%BAlio%20Gonzalez%22%2C%22number%22%3A%20%221044%22%2C%22district%22%3A%20%22Barra%20Funda%22%2C%22complement%22%3A%20%22Sala%2001%22%2C%22city%22%3A%20%22S%C3%A3o%20Paulo%22%2C%22state%22%3A%20%22SP%22%7D%7D",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "http://paymentscert.alps.cl/justpay/check-out/SecurePayment"

payload = "public_key=zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks&time=2022-10-13T14%3A39%3A09&channel=8&amount=1.01&currency=BRL&trans_id=1&time_expired=120&url_ok=https%3A%2F%2Fbit.ly%2F3S4I7iR&url_error=https%3A%2F%2Fbit.ly%2F3S5aOwc&signature=e22ef7fd3b7a7fa155f39dd966098b17cf7106b41e38544383487de0124e6208&shopper_information=%7B%22Phone%22%3A%20%2211995588222%22%2C%22email%22%3A%20%22no-reply%40alps.cl%22%2C%22country_code%22%3A%20%22BRL%22%2C%22name_shopper%22%3A%20%22Jhon%22%2C%22Num_doc_identi%22%3A%20%2244227766880%22%2C%22type_doc_identi%22%3A%20%22CPF%22%2C%22last_name_Shopper%22%3A%20%22Snow%22%2C%22address%22%3A%20%7B%22zipcode%22%3A%20%2201156060%22%2C%22street%22%3A%20%22Rua%20J%C3%BAlio%20Gonzalez%22%2C%22number%22%3A%20%221044%22%2C%22district%22%3A%20%22Barra%20Funda%22%2C%22complement%22%3A%20%22Sala%2001%22%2C%22city%22%3A%20%22S%C3%A3o%20Paulo%22%2C%22state%22%3A%20%22SP%22%7D%7D"
response = requests.request("POST", url, data=payload)

print(response.text)
const qs = require("querystring");
const http = require("http");

const options = {
  "method": "POST",
  "hostname": "paymentscert.alps.cl",
  "port": null,
  "path": "/justpay/check-out/SecurePayment",
  "headers": {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({
  public_key: 'zyssglikvtltbd2se2hudwl50jjomil2uytp7tpvjtxyfdw469jagk8yvnex9jks',
  time: '2022-10-13T14:39:09',
  channel: '8',
  amount: '1.01',
  currency: 'BRL',
  trans_id: '1',
  time_expired: '120',
  url_ok: 'https://bit.ly/3S4I7iR',
  url_error: 'https://bit.ly/3S5aOwc',
  signature: 'e22ef7fd3b7a7fa155f39dd966098b17cf7106b41e38544383487de0124e6208',
  shopper_information: '{"Phone": "11995588222","email": "[email protected]","country_code": "BRL","name_shopper": "Jhon","Num_doc_identi": "44227766880","type_doc_identi": "CPF","last_name_Shopper": "Snow","address": {"zipcode": "01156060","street": "Rua Júlio Gonzalez","number": "1044","district": "Barra Funda","complement": "Sala 01","city": "São Paulo","state": "SP"}}'
}));
req.end();

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": "11995588222","email": "[email protected]","country_code": "BRL","name_shopper": "Jhon","Num_doc_identi": "44227766880","type_doc_identi": "CPF","last_name_Shopper": "Snow","address": {"zipcode": "01156060","street": "Rua Júlio Gonzalez","number": "1044","district": "Barra Funda","complement": "Sala 01","city": "São Paulo","state": "SP"}}'

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 [DNI, CPF]
Num_doc_identiTrueString (12)Identification document number
emailTrueString (255)Shopper's e-mail
country_codeTrueString (4)Country's phone code (Ex. +57)
PhoneTrueString (12)Shopper's phone number
countryTrueString (3)Country ISO code
addressTrueString (255)JSON format for shopper's address

address JSON format

ParameterMandatoryData TypeDescriptionExample
zipcodeTrueString (8)Shopper's address zipcode01156060
streetTrueString (255)Shopper's address streetRua Júlio Gonzalez
numberTrueString (20)Shopper's address number1023
districtFalseString (140)Shopper's address districtBarra Funda
complementFalseString (140)Shopper's address complementSala 02
cityTrueString (140)Shopper's address citySão Paulo
stateTrueString (2)Shopper's address state codeSP

Test Transactions

Simulate payments

Testing cards

BrandNumberExpiration dateCVVStatus
Visa4111 1111 1111 111101/25123approved
Visa4916 5733 8093 796212/28123rejected
Mastercard5353 2766 5962 946102/25123approved
Mastercard5289 0946 0544 432612/28123rejected
Elo4514 1674 2628 114101/25123approved
Elo4389 3556 6853 358212/28123rejected