Unregister a BLIK Recurring Payments alias
Use Unregister BLIK alias to unregister the alias associated with a transaction:
Example request
<?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
$payload = ["sign" => sha1($orderId . $secretPhrase)];
$url = $mainUrl . "/blik/alias/" . rawurlencode($shopId)
. "/" . rawurlencode($orderId) . "/unregister";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode($payload)
]);
$responseBody = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 204) {
echo "Alias successfully unregistered";
} else {
$response = json_decode($responseBody);
echo "Error: " . ($response->errorMessage ?? $responseBody);
}
Response statuses
| HTTP status | Description from OpenAPI |
|---|---|
204 | The alias was successfully unregistered. No response body. |
Alias unregistration notification
You will receive an asynchronous notification when the alias is unregistered.