Channel: 17
Provider: Cobre
Payment Method: Debit / Credit Card
Available Currencies
Name | Code | Country |
---|---|---|
Colombian Pesos | COP | Colombia |
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=17 \
--data amount=100 \
--data currency=COP \
--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={"name_shopper": "Test","last_name_Shopper": "User","type_doc_identi": "RUT","Num_doc_identi": "12345678901","email": "[email protected]", "country_code": "593","Phone": "123763456", "country": "MEX"}
--data filter_by = pse, nequi
<?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' => '500','currency' => 'COP','trans_id' => '1','time_expired' => '120','url_ok' => 'http://127.0.0.1/justpay/url_ok','url_error' => 'http://127.0.0.1/justpay/url_error','channel' => '17','signature' => '64e16565131fd801cf999f64c21c12683ae54d20907bee8cabb773bf5e945262','shopper_information' => '{
"Phone": "3123456789",
"email": "[email protected]",
"name_shopper": "Fulano",
"Num_doc_identi": "234112345678",
"type_doc_identi": "cc",
"last_name_Shopper": "Da Silva",
"country":"COL",
"country_code":"+57"}','filter_by' => 'pse, nequi'),
));
$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': '500',
'currency': 'COP',
'trans_id': '1',
'time_expired': '120',
'url_ok': 'http://127.0.0.1/justpay/url_ok',
'url_error': 'http://127.0.0.1/justpay/url_error',
'channel': '17',
'signature': '64e16565131fd801cf999f64c21c12683ae54d20907bee8cabb773bf5e945262',
'shopper_information': '{
"Phone": "3123456789",
"email": "[email protected]",
"name_shopper": "Fulano",
"Num_doc_identi": "234112345678",
"type_doc_identi": "cc",
"last_name_Shopper": "Da Silva",
"country":"COL",
"country_code":"+57"}',
'filter_by': 'pse, nequi'}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
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: '17',
amount: '100',
currency: 'COP',
trans_id: '1',
time_expired: '120',
url_ok: 'https://bit.ly/3S4I7iR',
url_error: 'https://bit.ly/3S5aOwc',
signature: 'e22ef7fd3b7a7fa155f39dd966098b17cf7106b41e38544383487de0124e6208',
shopper_information: '{"name_shopper": "Test","last_name_Shopper": "User","type_doc_identi": "RUT","Num_doc_identi": "12345678901","email": "[email protected]", "country_code": "55","Phone": "123763456", "country": "COL"}',
filter_by = pse, nequi
}));
req.end();
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 |
filter_by | True | String (21) | Payment Method |
shopper_information
JSON format
shopper_information
JSON formatField shopper_information must be send in string format (JSON encode).
'{"name_shopper": "Test","last_name_Shopper": "User","type_doc_identi": "RUT","Num_doc_identi": "12345678901","email": "[email protected]", "country_code": "593","Phone": "123763456", "country": "MEX"}'
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 [CPF, CNPJ ] |
Num_doc_identi | True | String (12) | Identification document number |
email | True | String (255) | Shopper's email |
country_code | True | String (4) | Country's phone code [+57 ] |
Phone | True | String (12) | Shopper's phone number |
country | True | String (3) | Country ISO code [MEX ] |
Filters
Using the parameter filter_by
you may filter to show only the desire APM. If the filter_by
parameter is not provided or left empty, the three payment methods will be automatically selected: pse
, nequi
and bancolombia
.
Currency | APM | filter_by | Note |
---|---|---|---|
COP | PSE | pse | Only one method can be used |
COP | Nequi | nequi | Only one method can be used |
COP | Bancolombia | bancolombia | Only one method can be used |
COP | Nequi, PSE | nequi, pse | Two methods can be used |
COP | Bancolombia, PSE | bancolombia, pse | Two methods can be used |
COP | Nequi, Bancolombia | nequi, bancolombia | Two methods can be used |
COP | PSE, Nequi, Bancolombia | pse, nequi, bancolombia | Three methods can be used |
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."
}
}
Error Codes
This section contains a list of error codes:
Category | Code | Description |
---|---|---|
General | G001 | General error. Please try again. |
General | G002 | The processing has failed as an invalid parameter has been added. Please remove the $parameter$ and try again. |
General | G003 | The selected page does not exist. You have requested a page that is out of bounds for the list. Please provide a page_number that is within the size of the list. |
General | G004 | The format of some of the parameters are not correct. The $paramenter$ should be of type $type$. Correct the format and try again. |
Category | Code | Description |
---|---|---|
Authentication | AU001 | The authentication process failed as no user_id was added in the request. Please add the user_id to authenticate correctly. |
Authentication | AU002 | The authentication process failed as no secret was added in the request. Please add the secret to authenticate correctly. |
Authentication | AU003 | The authentication process failed as an additional field $field$ was found in the request. Please remove the $field$ field to authenticate correctly. |
Authentication | AU004 | The authentication process failed as the request JSON body is malformed. Please validate the JSON structure sent and try again. |
Category | Code | Description |
---|---|---|
Accounts | ACC000 | Please verify the request to correctly send the petition again. |
Accounts | ACC001 | Account connection failed. The provided metadata does not meet the requirements for provider $provided id$ and action $action$ . Please verify the request to correctly send the petition again. |
Accounts | ACC002 | Account connection failed. The given $provided id$ is incorrect. Please verify the request to correctly send the petition again. |
Accounts | ACC003 | Account connection failed. The provided $account_type$ is incorrect. Please make sure the account type is valid and exists. |
Category | Code | Description |
---|---|---|
Move Money | MM000 | The Money Movement request failed. |
Move Money | MM001 | The Money Movement request failed as no $parameter$ was added in the request. Please add the $parameter$ parameter to initiate the money movement operation correctly. |
Move Money | MM002 | The money movement request failed. The given $destination_id$ is invalid. Please make sure the destination_id is valid and exists. |
Move Money | MM005 | The Money Movement request has failed. The amount entered cannot be negative or smaller than zero. Please add an amount equal or greater to 1 to process the money movement correctly. |
Move Money | MM006 | The Money Movement request has failed. The destination object of type CLABE is not correctly formatted. The destination object of type CLABE should include the following parameters: Account_type, account_number, counterparty_fullname, counterparty_id_type, counterparty_id_number. |
Move Money | MM007 | The Money Movement request has failed. The destination object of type $TYPE_OF_CP$ is not correctly formatted. The account number should have a $TYPE_OF_CP$ format of $#_of_digits$ digits. |
Move Money | MM008 | The Money Movement request has failed. The source and destination parameters cannot be the same. Initiate a new Money Movement request with different source and destination parameters. |
Move Money | MM009 | The Money Movement request has failed. The provided idempotency parameter does not have the required length. Please provide an idempotency value of 9 or more characters. |
Move Money | MM010 | The Money Movement request has failed. The provided source and destination should be a valid combination. Please add a valid combination of source and destination. |
Move Money | MM011 | The Money Movement request has failed. The provided description in the metadata exceeds the size of the field. Please add a valid description. |
Move Money | MM012 | The Money Movement request has failed. The provided destination_id is not valid or does not exist. Please add a valid destination. |
Move Money | MM013 | The Money Movement request has failed. The provided reference in the metadata exceeds the size of the field. Please add a valid reference. |
Move Money | MM015 | The Money Movement request failed. The URL provided is invalid. Please make sure that the link starts with "https://" or "http://". |
Move Money | MM016 | The Money Movement request failed. One or more r2p methods are incorrect or missing. Please make sure that the r2p methods are valid and try again. |
Move Money | MM017 | The Money Movement request failed. The provided expiration_date is incorrect. Please ensure that the expiration_date is in the correct format (YYYY-MM-DDTHH:MM) and that it is set to a future date and time. |
Move Money | MM018 | The Money Movement request failed. The fx_quote provided is expired. |
Move Money | MM019 | The Money Movement request failed. The pse_bank_code provided is not valid. Please make sure pse_bank_code is valid and exists. |
Move Money | MM020 | The Money Movement request failed. There was a problem creating the r2p_link. Please try again. |
Move Money | MM021 | The money movement request failed. The given $source_id$ is invalid. Please make sure the source_id is valid and exists. |
Move Money | MM022 | The money movement request failed. The account $account_id$ is not authorized to debit the counterparty $counterparty_id$ . Please make sure the registration is completed and try again. |
Category | Code | Description |
---|---|---|
Subscriptions | SUB000 | Error while processing the subscription. Please try again. |
Subscriptions | SUB001 | Error processing the subscription. One or many of the provided events are not valid. Please provide a valid list of events and try again. |
Subscriptions | SUB002 | Error processing the subscription. The provided description exceeds the maximum size of 256 chars. Please provide a valid description and try again. |
Subscriptions | SUB003 | Error processing the subscription. The provided request object is missing the $parameter$ . Please provide all the required parameters to correctly create the subscription. |
Subscriptions | SUB004 | The subscription was not created. The URL provided does not have the right format. Please review the provided URL and try again. |
Category | Code | Description |
---|---|---|
Reports | REP000 | The processing of the report failed. Please try again. |
Reports | REP001 | The request to process a report has failed. Please add the $parameter$ parameter to the request body. |
Reports | REP002 | The request to generate a download link has failed. An invalid report id has been found in the request body. Please fix the requested array of reports and try again. |
Reports | REP003 | The request to generate a report has failed. An invalid combination of resource and type has been requested. Please review the request and try again. |
Category | Code | Description |
---|---|---|
Counterparties | CP000 | Could not create counterparty. Please try again. |
Counterparties | CP001 | The Counterparty was not created. The type of the counterparty is not valid. Please review the type of the counterparty and try again. |
Counterparties | CP002 | The Counterparty was not created. One or many of the provided fields for the type $type$ are not valid or are missing. Please make sure all the required fields are included and valid. |
Counterparties | CP003 | The Counterparty was not created. The account number provided is not valid. The account number should have a $TYPE_OF_CP$ format of $#_of_digits$ digits. |
Counterparties | CP004 | The Counterparty was not created. The provided card number is not valid. The card should have a $TYPE_OF_CP$ format of $#_of_digits$ digits. |
Counterparties | CP005 | The Counterparty was not created. The $TYPE_OF_CP$ counterparty type does not allow the identification $CP_ID_TYPE$ . Please use an allowed value and try again. |
Counterparties | CP006 | The Counterparty was not created. The counterparty_id_expiration_date does not have the correct format. Please make sure the date format is YYYY-MM-DD and try again. |
Counterparties | CP007 | The Counterparty was not created. The $CP_BENIFICIARY_INSTITUTION$ provided is not valid. Please make sure the beneficiary institution is allowed and try again. |
Category | Code | Description |
---|---|---|
MM Approval | MMA000 | The money movement decision failed. Please try again. |
MM Approval | MMA001 | Could not create a money movement decision. One or more fields are missing. Please make sure all the required fields are included and valid. |
MM Approval | MMA002 | Could not create a money movement decision. The provided decision is not allowed. Please provide a valid decision and try again. |
MM Approval | MMA003 | Could not create a money movement decision. The provided description exceeds the maximum size of 256 chars. Please provide a valid description and try again. |
MM Approval | MMA004 | Could not create a money movement decision. There is already a decision for this money movement. |
Category | Code | Description |
---|---|---|
Bulk MM | BMM000 | Could not create the bulk money movement process, please try again. |
Category | Code | Description |
---|---|---|
FX Quotes | QU000 | Could not create the requested quote. Please try again. |
FX Quotes | QU001 | Could not create quote. The pair requested is not valid. Please make sure the pair is valid and exists. |
FX Quotes | QU002 | The quote was not created. The $missing_parameter$ is missing in the request body. Please provide a valid $missing_parameter$ . |
FX Quotes | QU003 | Could not create quote. The market is currently closed. Please try again during regular market hours. |
FX Quotes | QU004 | Could not create quote. The pair requested is not configured. Please contact your Key Account Manager for currency pair activation. |
Category | Code | Description |
---|---|---|
Cross Border MM | CBMM000 | Could not create Cross Border Money Movement. Please try again. |
Cross Border MM | CBMM001 | Could not create Cross Border Money Movement. The $quote_id$ does not exist or expired. Please make sure the quote id is valid and try again. |
Cross Border MM | CBMM002 | The Cross Border Money Movement request failed as no $parameter$ was added in the request. Please add the $parameter$ parameter to initiate the money movement operation correctly. |
Cross Border MM | CBMM003 | The Cross Border Money Movement request has failed. The provided idempotency parameter does not have the required length. Please provide an idempotency value of 9 or more characters. |
Cross Border MM | CBMM004 | The Cross Border Money Movement request has failed. The provided description in the metadata exceeds the size of the field. Please add a valid description. |
Cross Border MM | CBMM005 | The Cross Border Money Movement request has failed. The provided $destination_id$ is not valid or does not exist. Please add a valid destination. |
Category | Code | Description |
---|---|---|
Money Movement Scheduler | MMS000 | Error while processing the money movement scheduler. Please try again. |
Money Movement Scheduler | MMS001 | Could not create the money movement scheduler. The $missing_parameter$ is missing in the request body. Please provide a valid $missing_parameter$ . |
Money Movement Scheduler | MMS002 | Could not create the money movement scheduler. The schedule pattern $schedule_pattern$ is incorrect. Make sure the cron expression is defined correctly. |
Money Movement Scheduler | MMS003 | Could not create the money movement scheduler. One or more accounts are incorrect. Make sure the provided accounts are valid and exist. |
Money Movement Scheduler | MMS004 | Could not create the money movement scheduler. One or more declared accounts are not Saldo Cobre accounts. Please make sure all the provided accounts are Saldo Cobre accounts. |
Money Movement Scheduler | MMS005 | Could not create the money movement scheduler. The counterparty id $counterparty_id$ is not valid. Make sure the counterparty declared is valid and exists. |
Money Movement Scheduler | MMS006 | Could not create the money movement scheduler. The provided description exceeds the maximum size of 50 chars. Please provide a valid description and try again. |
Money Movement Scheduler | MMS007 | Could not create the money movement scheduler. The amount entered cannot be negative. Please add an amount equal or greater to 0 to process the money movement scheduler correctly. |
Money Movement Scheduler | MMS008 | Could not create the money movement scheduler. The provided alias exceeds the maximum size of 256 chars. Please provide a valid alias and try again. |