ID: 41 - Bank Transfer (MXN)

Channel: 41

Provider: Monato

Payment Method: Bank Transfer (SPEI)


Available Currencies

NameCodeCountry
Mexican pesoMXNMexico

Request example

curl --location 'http://uat-payments.alps.cl/justpay/check-out/SecurePayment.php' \
--form 'public_key="{YOUR_PUBLIC_KEY}"' \
--form 'time="2024-07-17 16:33:11"' \
--form 'amount="1250.50"' \
--form 'currency="MXN"' \
--form 'trans_id="1"' \
--form 'time_expired="120"' \
--form 'url_ok="https://bit.ly/3S4I7iR"' \
--form 'url_error="https://bit.ly/3S5aOwc"' \
--form 'channel="41"' \
--form 'signature="{YOUR_SIGNATURE}"' \
--form 'shopper_information="{\"name_shopper\":\"Juan\",\"last_name_Shopper\":\"Pérez López\",\"type_doc_identi\":\"RFC\",\"Num_doc_identi\":\"MAL180222MS6\",\"email\":\"[email protected]\",\"country_code\":\"+52\",\"Phone\":\"9876543210\",\"country\":\"MEX\"}"'
<?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' => '{YOUR_PUBLIC_KEY}','time' => '2024-07-17 16:33:11','amount' => '1250.50','currency' => 'MXN','trans_id' => '1','time_expired' => '120','url_ok' => 'https://bit.ly/3S4I7iR','url_error' => 'https://bit.ly/3S5aOwc','channel' => '41','signature' => '{YOUR_SIGNATURE}','shopper_information' => '{"name_shopper":"Juan","last_name_Shopper":"Pérez López","type_doc_identi":"RFC","Num_doc_identi":"MAL180222MS6","email":"[email protected]","country_code":"+52","Phone":"9876543210","country":"MEX"}'),
));

$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': '{YOUR_PUBLIC_KEY}',
'time': '2024-07-17 16:33:11',
'amount': '1250.50',
'currency': 'MXN',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'https://bit.ly/3S4I7iR',
'url_error': 'https://bit.ly/3S5aOwc',
'channel': '41',
'signature': '{YOUR_SIGNATURE}',
'shopper_information': '{"name_shopper":"Juan","last_name_Shopper":"Pérez López","type_doc_identi":"RFC","Num_doc_identi":"MAL180222MS6","email":"[email protected]","country_code":"+52","Phone":"9876543210","country":"MEX"}'}
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': '{YOUR_PUBLIC_KEY}',
    'time': '2024-07-17 16:33:11',
    'amount': '1250.50',
    'currency': 'MXN',
    'trans_id': '1',
    'time_expired': '120',
    'url_ok': 'https://bit.ly/3S4I7iR',
    'url_error': 'https://bit.ly/3S5aOwc',
    'channel': '41',
    'signature': '{YOUR_SIGNATURE}',
    'shopper_information': '{"name_shopper":"Juan","last_name_Shopper":"Pérez López","type_doc_identi":"RFC","Num_doc_identi":"MAL180222MS6","email":"[email protected]","country_code":"+52","Phone":"9876543210","country":"MEX"}'
  }
};
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. Use 41
amountTrueDoubleThe amount of the transaction. Use 2 decimals. The shopper must transfer this exact amount, including cents
currencyTrueString (3)Transaction currency code. Use MXN
trans_idTrueString (255)Transaction id
time_expiredTrueString (255)Time in minutes to expire the token. Value given in minutes. Minimum Suggested: 120 minutes, so the shopper has time to make the bank transfer
url_okTrueString (255)URL where shopper will be redirected from the payment page once the payment is confirmed (Must be Https)
url_errorTrueString (255)URL where shopper will be redirected from the payment page if the payment is cancelled, expires or is rejected (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).

{
  "name_shopper":"Juan",
  "last_name_Shopper":"Pérez López",
  "type_doc_identi":"RFC",
  "Num_doc_identi":"MAL180222MS6",
  "email":"[email protected]",
  "country_code":"+52",
  "Phone":"9876543210",
  "country":"MEX"
}

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 [RFC]. See Document ID types
Num_doc_identiTrueString (255)Shopper's RFC: 13 characters for individuals, 12 for companies. Send it without spaces, hyphens or other separators. It must be the RFC of the holder of the account that makes the transfer
emailTrueString (255)Shopper's e-mail
country_codeTrueString (10)Country's phone code (Ex. +52)
PhoneTrueString (20)Shopper's phone number
countryTrueString (3)Country ISO code [MEX]

Payment flow

In this channel the shopper does not pay inside an online banking session. The payment page shows the bank details and the shopper makes an SPEI transfer from their own bank.

  1. Redirect the shopper to the checkout URL returned by the request. In this channel the response is always the checkout URL; the direct_integration parameter has no effect.
  2. The payment page shows the CLABE, the receiving bank (when available), the account holder (your business name) and the amount, each with a copy button. It also shows the remaining time to pay and step-by-step SPEI instructions.
  3. The shopper makes an SPEI transfer for the exact amount from their bank's app or online banking.
  4. When the transfer is received and matched to the operation, the operation is confirmed and you receive the success payment notification.
  5. The payment page checks the operation status periodically. It redirects the shopper to url_ok when the payment is confirmed, or to url_error if the operation is cancelled, expires or is rejected.

The shopper can also cancel from the payment page. This cancels the operation and redirects the shopper to url_error.

Note: The redirect to url_ok is not a payment confirmation, because the shopper may close the page before it happens. Use the payment notification as the only source of truth.

Payment reconciliation

The CLABE shown to the shopper belongs to your account and is the same for all of your operations. Each incoming transfer is matched to an operation using:

  • the shopper's RFC, which must match the Num_doc_identi sent in shopper_information, and
  • the exact amount of the operation, including cents.
🚧

Transfers that do not match are not applied

  • Send the RFC without spaces, hyphens or any other separator (for example MAL180222MS6). An RFC with separators is accepted when the operation is created, but the incoming transfer will not be matched to it.
  • A transfer made from an account whose holder has a different RFC, or for a different amount, is not applied to the operation.
  • If the same shopper has more than one pending operation for the same amount, the transfer is applied to the oldest one. Avoid creating duplicate pending operations for the same shopper and amount.
  • Once an operation is cancelled or has expired, a later transfer is not applied to it. Set time_expired so the shopper has enough time to make the transfer.

Errors

This payment integration only sends notifications for successfully completed transactions. This means that error messages will not be generated for failed transactions. Transfers that cannot be matched to an operation do not generate notifications either.