LET'S GET STARTED

Integration of whitelabel is seamless and easy. Integration to your platform can be done by following the step by step documentation of the block of code below.

SAMPLE CODE
                        
                    <?php
                      //set variables
                      $api = 'https://voguepay.com/api/';
                      $ref = time();
                      $task = 'card';
                      $merchant_id = '9944-00274134';
                      $my_username = 'username';
                      $merchant_email_on_voguepay = '[email protected]';
                      $ref = time().mt_rand(0,9999999);
                      $command_api_token = 'sdjhsdjysd78df6sdhjsdgfdhdfs';
                      $hash = hash('sha512',$command_api_token.$task.$merchant_email_on_voguepay.$ref);

                      $fields['task'] = $task;
                      $fields['merchant'] = $merchant_id;
                      $fields['ref'] = $ref;
                      $fields['hash'] = $hash;

                      //Compulsory fields
                      $fields['total'] = 10.00; //rounded to two decimals
                      $fields['email'] = '[email protected]'; //Email address of card owner
                      $fields['merchant_ref'] = '12345-009902'; // this will be returned to you on transaction requery
                      $fields['currency'] = 'GBP'; //supported currencies NGN, USD, GBP, EUR, ZAR, GHS, - more currencies to come
                      $fields['memo'] = 'Hotel+room+payment'; // description of transaction (Must be encoded)
                      $fields['referral_url'] = 'http://domain.com/checkout'; //The referrer is the webpage that sends visitors to your site using a link. In other words, it's the webpage that a person was on right before they landed on your page.
                      $fields['response_url'] = urlencode("http://domain.com/notification"); // Transaction ID is posted to this url (Must be encoded)
                      $fields['redirect_url'] = urlencode("http://domain.com/redirect"); // Where users will be redirected to after payment (Must be encoded)
                      $fields['card']['name'] ='Steven French';
                      $fields['card']['pan'] = '5339050000023811'; //pan of card to be debited
                      $fields['card']['month'] = '01'; //expiry month of card to be debited
                      $fields['card']['year'] = '18'; //expiry year of card to be debited
                      $fields['card']['cvv'] = '000'; //cvv of card to be debited


                      //Optional fields
                      $fields['demo']=true;
                      $fields['phone']='08011111111'; //Phone number of card owner

                      //Descriptor Information (Optional)
                      $fields['company']="Buyers Market"; //Company name (MAX 100 characters)
                      $fields['city']="Ikeja"; //Company city (MAX 100 characters)
                      $fields['street']="No 6, Broadstreet Avenue"; //Company street address (MAX 100 characters)
                      $fields['country']='NGA'; // The 3 letter ISO standard alpha country code of the address (MAX 3 characters)


                      $fields_string = 'json='.urlencode(json_encode($fields));

                      //open curl connection
                      $ch = curl_init();
                      curl_setopt($ch,CURLOPT_URL, $api);
                      curl_setopt($ch,CURLOPT_HEADER, false); //we dont need the headers
                      curl_setopt($ch, CURLOPT_POST, 1);
                      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);// data coming back is put into a string
                      curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
                      curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE);
                      curl_setopt($ch,CURLOPT_MAXREDIRS,2);
                      $reply_from_voguepay = curl_exec($ch);//execute post
                      curl_close($ch);//close connection
                      //Result is json string so we convert into array
                      $reply_array = substr($reply_from_voguepay, 3);
                      //Result is json string so we convert into array
                      $reply_array = json_decode($reply_array,true);
                    ?>
                    
                  
Where

Parameters Sample Value Expected Value
$api https://voguepay.com/api/ https://voguepay.com/api/
$ref time() time()
$task card card
$merchant_id 9944-00274134 Merchant ID (Required)
$my_username username Merchant Username (Required)
$merchant_email_on_voguepay [email protected] Merchant's email address registered on Voguepay
$ref time().mt_rand(0,9999999) time().mt_rand(0,9999999)
$command_api_token sdjhsdjysd78df6sdhjsdgfdhdfs This is the value gotten from merchant's account settings
$hash hash('sha512',$command_api_token.$task.$merchant_email_on_voguepay.$ref) This is a required Security code generated by the concantenation of the command api token, merchant's email on voguepay, specified reference and passing the result through a sha512 encryption
Compulsory Fields
$fields['task'] $task $task
$fields['merchant'] $merchant_id $merchant_id
$fields['ref'] $ref $ref
$fields['hash'] $hash $hash
$fields['total'] 10.00 This is the total amount rounded off to 2 decimal places
$fields['email'] [email protected] The email address of the card owner is required here
$fields['merchant_ref'] 12345-009902 Merchant Reference (This is a value provided by the merchant. This value will be returned with the confirmation results from the confirmation api. VoguePay doesnt need this value, it is used by the merchant to store any data he/she wishes to retrieve later with the transaction details.)
$fields['currency'] GBP This value is any voguepay supported currency like NGN, USD, GBP, EUR, ZAR, GHS etc
$fields['memo'] Hotel+room+payment This is a description of transaction (This value must be encoded like the sample value)
$fields['response_url'] urlencode("http://domain.com/notification") Transaction ID is posted to this url (Must be encoded)
$fields['card']['name'] Steven French Card owner's name
$fields['card']['pan'] 4714150600052726 This is the card number to be debited
$fields['card']['month'] 06 The expiry month of card to be debited in numeric form to two digits
$fields['card']['year'] 22 This is the expiry year of card to be debited
$fields['card']['cvv'] 202 This is the cvv of card to be debited(The Card Verification Value (CVV) is the extra code printed on your debit or credit card. CVV for Visa, MasterCard and Diners is the final three digits of the number printed on the signature strip on the back of your card.)
$fields['demo'] (Optional) true Demo card details can be found in the documentation page
$fields['phone'] (Optional) 08011111111 Phone number of card owner
Descriptors Information
$fields['company'] Buyers Market LTD Company name (MAX 100 characters)
$fields['city'] Ikeja Company city (MAX 100 characters)
$fields['street'] No 6, Broadstreet Avenue Company street address (MAX 100 characters)
$fields['country'] NGA The 3 letter ISO standard alpha country code of the address (MAX 3 characters)
$fields_string 'json='.urlencode(json_encode($fields)) 'json='.urlencode(json_encode($fields))
$ch curl_init();
curl_setopt($ch,CURLOPT_URL, $api);
curl_setopt($ch,CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE);
curl_setopt($ch,CURLOPT_MAXREDIRS,2);
$reply_from_voguepay = curl_exec($ch);
curl_close($ch);
curl_init();
curl_setopt($ch,CURLOPT_URL, $api);
curl_setopt($ch,CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE);
curl_setopt($ch,CURLOPT_MAXREDIRS,2);
$reply_from_voguepay = curl_exec($ch);
curl_close($ch);
$reply_array substr($reply_from_voguepay, 3) substr($reply_from_voguepay, 3)
$reply_array json_decode($reply_array,true) json_decode($reply_array,true)
Sample Response
Successful Request Array
(
  [id] =>
  [merchant_ref] => 12345-009902
  [status] => OK
  [response] => WL3D
  [message] => 3D Authorization required
  [reference] => 5b7318d1e1b44
  [redirect_url] => https://voguepay.com/?p=vpgate&ref=czoxMzoiNWI3MzE4ZDFlMWI0MiI7
  [salt] => 5b7318d1df6b1
  [hash] => 9420cc1b6855e995dd21bf974ba78f4e37xxxxdd0a7e1187
  aab85ef86524e4452b2f402b86caf7757a7c2622aa7a6d77b53d2ee1507fc6a2677772619ab9431d4d24
  [username] => test
)
Redirect URL: The URL you redirect your merchants in order to complete 3D verification
Failed Request Array
(
  [id] =>
  [merchant_ref] => 12345-009902
  [field] => Card Month
  [message] => Invalid card expiry month
  [status] => ERROR
  [response] => WL002
  [salt] => 5b7318d1df6b1
  [hash] => 9420cc1b6855e995dd21bf974ba78f4e37xxxxdd0a7e1187
  aab85ef86524e4452b2f402b86caf7757a7c2622aa7a6d77b53d2ee1507fc6a2677772619ab9431d4d24
  [username] => test
)