Skip to main content

Verify registered alias for transaction

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​

<?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);
}

In the response above, "uuid" is a placeholder for the actual UUID. If the alias is not found, the error response contains errorMessage as shown above.