Overview
Brief description
- This section describes the parameters that need to be prepared before integrating with the Colombia interface.
Trader number
- The sandbox account information is provided by the operator, please contact the operator.
- The official environment account will be opened after the sandbox environment is integrated. The following account-related information can be obtained from the dashboard.
| Parameter | Description |
|---|---|
| Merchant Dashboard | Please contact the business development officer |
| Merchant NO | A 10-digit merchant ID (Example: 0000000001) |
| Merchant Dashboard Account | Usually logs in via email |
| Merchant dashboard Password | Check the designated email for the password; it is recommended to change it after logging in |
| Merchant Key | Can be obtained from the homepage after logging into the system |
API Request Address
- Sandbox URL๏ผhttps://sandbox-api.paypro.tech/col-pay
- Sandbox merchant number:
Please contact the business development officer - Sandbox key:
Please contact the business development officer - Production environment address:
Provided during production onboarding
When processing the API response, first check whether the first layer indicates a successful request.
Only if the request is successful should you proceed to examine the second layer for the transaction result.
Signature Logic
Signature values shown in request examples are illustrative. Merchants must recalculate the signature using their own Merchant Key and the actual request parameters.
- 1๏ผThe API request must include the sign parameter, following the signing logic. Step 1: Exclude
signand empty values, sort the remaining request parameters by their complete parameter names in ascending lexicographical order, and concatenate them in the formatkey1=value1key2=value2....
List<String> keys = Lists.newArrayList(map.keySet());
Collections.sort(keys);
StringBuilder request = new StringBuilder();
for (String key : keys) {
Object value = map.get(key);
if (!"sign".equals(key) && value != null && StrUtil.isNotEmpty(String.valueOf(value))) {
request.append(key).append("=").append(value);
}
}
Step2๏ผUse the app secret as a salt to perform MD5 encryption. SIGN_TYPE๏ผMD5 CHARSET_NAME๏ผUTF-8 salt๏ผMerchant Key
try {
MessageDigest md5 = MessageDigest.getInstance(SIGN_TYPE);
md5.update((str + salt).getBytes(CHARSET_NAME));
return byte2hex(md5.digest());
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("md5 cryptographic anomaly", e);
}
}
return "";
public static String byte2hex(byte\[\] bytes) {
StringBuilder sign = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(bytes\[i\] & 0xFF);
if (hex.length() == 1) {
sign.append("0");
}
sign.append(hex.toLowerCase());
}
return sign.toString();
}
- 2๏ผThe requested merchant number is required to be added in the header submission.
- 3: IP whitelist needs to be added during the testing process, please contact paypro business for this operation.
Request Timestamp
Use a 13-digit Unix timestamp in milliseconds.
public static Long getMilliByTime(LocalDateTime time) {
return time.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
}
