Verify a registered BLIK Recurring Payments alias
Use Retrieve additional transaction data to check the alias associated with a transaction:
The endpoint returns HTTP 200 with additional transaction data.
Example request and responses
- Request
- Response (Success)
- Response (Alias Not Found)
<?php
$shopId = ""; // Payment Point ID
$secretPhrase = ""; // Payment Point Secret
$mainUrl = "https://pay.cashbill.pl/ws/rest";
$orderId = ""; // ID of the transaction associated with the alias
$sign = sha1($orderId . $secretPhrase);
$url = $mainUrl . "/additionaldata/" . rawurlencode($shopId)
. "/" . rawurlencode($orderId)
. "?" . http_build_query(["sign" => $sign]);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Accept: application/json"]
]);
$response = json_decode(curl_exec($ch));
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode != 200) {
echo "Error: " . $response->errorMessage;
} else {
echo json_encode($response, JSON_PRETTY_PRINT);
}
{
"alias": {
"scope": {
"acqId": 7517,
"merchId": "string"
},
"value": "string",
"valueType": "string",
"usage": "string"
},
"paramAliasList": {
"paramAlias": [
{
"key": "string",
"value": "string"
}
]
}
}
{
"errorMessage": "Blik error: [ER_ALIAS_NOT_FOUND] The alias was not found for the given parameters"
}
If the alias is not found, the error response contains errorMessage as shown above.