Base URL: https://checkout-sandbox.payway.com.kh/Copy to clipboard
POST

This API allows you to retrieve the details of a payment link that has already been created.

Request

Header Params
stringrequired

Example: application/json

Body Params application/json

stringrequired

Request date and time in UTC format as YYYYMMDDHHmmss.

stringrequired

A unique merchant key provided by ABA Bank.

stringrequired

A JSON string representing a JSON object, encrypted using OpenSSL with an RSA public key.

PHP Sample Code

function opensslEncryption($source, $publicKey)
{
    $maxlength = 117;
    $output = '';
    while (!empty($source)) {
        $input = substr($source, 0, $maxlength);
        openssl_public_encrypt($input, $encrypted, $publicKey);
        $output .= $encrypted;
        $source = substr($source, $maxlength);
    }
    return base64_encode($output);
}
$merchantAuth = json_encode([
    "mc_id" => $merchant_id,
    "id":"hEbr4***xQbpGQ=="
]);
$rsaPublicKey = "RSA PUBLIC KEY PROVIDED BY ABA BANK";
$merchantAuthEnc = opensslEncryption($merchantAuth, $rsaPublicKey);
stringrequired

Base64-encoded HMAC SHA-512 hash of the concatenated values: request_time, merchant_id, and merchant_auth with public_key.

PHP Sample Code

// public key provided by ABA Bank
$api_key = "API KEY PROVIDED BY ABA BANK";

// Prepare the data for hashing
$b4hash = $request_time . $merchant_id . $merchant_auth;

// Generate the HMAC hash using SHA-512 and encode it in Base64
$hash = base64_encode(hash_hmac('sha512', $b4hash, $api_key, true));

Example

{
    "request_time": "",
    "merchant_id": "",
    "merchant_auth": "",
    "hash": ""
}
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R

Responses