Skip to main content

Authentication

All requests to Trinex Pay must include a valid merchant_key and a secure hash. The hash is generated using HMAC SHA-256 over sorted request parameters and a shared merchant_secret.

Example:

$merchant_key = 'your_merchant_key';
$merchant_secret = 'your_merchant_secret';
$params = ['order_id' => '1234', 'amount' => '100.00'];
ksort($params);
$message = implode('|', array_values($params));
$hash = hash_hmac('sha256', $message, $merchant_secret, false);