API Reference

Here you can find sample integration code for php

$url = "https://dashboard.unpe.in/tech/api/utility/pay"

$header = [  
    'accept: application/json',  
    'api-key: XdWCmd0NF1ZVklnVPegOdL59WkFM7o4h91UYPAt1',  
    'content-type: application/json',  
];

$parameter = [  
    'partner_id' => '2'  
    'operator'   => "1",  
    'amount'     => 10  
    'number'     => '1234567890'  
];

$data = json_encode($parameter, JSON_UNESCAPED_SLASHES);  
$ciphertext_raw = openssl_encrypt($data, "AES-256-CBC",  "IyhFuFclpHIThji3e2DZqo7ZzWCI90mK" , OPENSSL_RAW_DATA, "YGWUOPKRo6acmYrx");  
$encryptedBody =  bin2hex($ciphertext_raw);

$body = json_encode([ "body" => $encryptedBody]);

$curl = curl_init();

curl_setopt_array($curl, array(  
  CURLOPT_URL => $url,  
  CURLOPT_RETURNTRANSFER => true,  
  CURLOPT_ENCODING => '',  
  CURLOPT_MAXREDIRS => 10,  
  CURLOPT_TIMEOUT => 0,  
  CURLOPT_FOLLOWLOCATION => true,  
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,  
  CURLOPT_CUSTOMREQUEST => 'POST',  
  CURLOPT_POSTFIELDS    => $body,  
  CURLOPT_HTTPHEADER => $header  
));

$response = curl_exec($curl);

curl_close($curl);  
echo $response;