Developers

Please click on a tab to expand it.

Integrate VoguePay Via Simple HTML Form

Integrate VoguePay Via Simple HTML Form

Follow the steps below to manually integrate VoguePay into your website. When you're done, you will have added a VoguePay button and supporting code to your website so that customers can click to place orders through VoguePay.

Create HTML FORM

Use the sample form below and the explanation that follows to create your own html form.

Sample HTML Form 1
<form method='POST' action='https://voguepay.com/pay/'>

<input type='hidden' name='v_merchant_id' value='qa331322179752' />
<input type='hidden' name='merchant_ref' value='234-567-890' />
<input type='hidden' name='memo' value='Bulk order from McAckney Web Shop' />

<input type='hidden' name='item_1' value='Face Cap' />
<input type='hidden' name='description_1' value='Blue Zizi facecap' />
<input type='hidden' name='price_1' value='2000' />

<input type='hidden' name='item_2' value='Laban T-shirt' />
<input type='hidden' name='description_2' value='Green XXL' />
<input type='hidden' name='price_2' value='3000' />

<input type='hidden' name='item_3' value='Black Noni Shoe' />
<input type='hidden' name='description_3' value='Size 42' />
<input type='hidden' name='price_3' value='8000' />

<input type='hidden' name='developer_code' value='pq7778ehh9YbZ' />
<input type='hidden' name='store_id' value='25' />

<input type='hidden' name='total' value='13000' />

<input type='image' src='http://voguepay.com/images/buttons/buynow_blue.png' alt='Submit' />

</form>


Sample HTML Form 2
<form method='POST' action='https://voguepay.com/pay/'>

<input type='hidden' name='v_merchant_id' value='qa331322179752' />
<input type='hidden' name='merchant_ref' value='234-567-890' />
<input type='hidden' name='memo' value='Membership subscription for music club' />

<input type='hidden' name='recurrent' value='true' />
<input type='hidden' name='interval' value='30' />

<input type='hidden' name='developer_code' value='pq7778ehh9YbZ' />
<input type='hidden' name='store_id' value='25' />

<input type='hidden' name='total' value='13000' />

<input type='image' src='http://voguepay.com/images/buttons/buynow_blue.png' alt='Submit' />

</form>


Sample HTML Form 3
<form method='POST' action='https://voguepay.com/pay/'>

<input type='hidden' name='v_merchant_id' value='qa331322179752' />
<input type='hidden' name='merchant_ref' value='234-567-890' />
<input type='hidden' name='memo' value='Bulk order from McAckney Web Shop' />

<input type='hidden' name='notify_url' value='http://www.mydomain.com/notification.php' />
<input type='hidden' name='success_url' value='http://www.mydomain.com/thank_you.html' />
<input type='hidden' name='fail_url' value='http://www.mydomain.com/failed.html' />

<input type='hidden' name='developer_code' value='pq7778ehh9YbZ' />
<input type='hidden' name='store_id' value='25' />

<input type='hidden' name='total' value='13000' />

<input type='image' src='http://voguepay.com/images/buttons/buynow_blue.png' alt='Submit' />

</form>

Form Explanation

Attributes:
AttributesValueExplanation
method POSTOnly the POST method is accepted.
action* https://voguepay.com/pay/ Form must submit to this url for production environment


Elements:
NameValueExplanation
v_merchant_id*Your Voguepay Merchant IDCan be found on the top right hand side after you login.
merchant_ref (optional)Any value provided by merchantThis 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 wishess to retrieve later with the transaction details.
memo (optional)Provided by merchantThe transaction summary that will show on your transaction history page when you login to VoguePay
item_xName of productThe name of the product being purchased. x is a value starting from 1. If there are more than 1 products, you can have item_1, item_2, item_3... as shown in the Sample HTML Form. Each item_x has a corresponding description_x and price_x
description_xShort description of productThe short description of the product being purchased. x corresponds to the number in item_x.
price_xPrice of product.The price of the product being purchased. x corresponds to the number in item_x.
developer_codeA code unique to every developer. Using this code earns the developer a commission on every successful transaction made through any selected integration methods.This optional field serves as a check for the form. Can be ommited. If included, will be used instead of the sum of all the prices.
store_idA unique store identifier which identifies a particular store a transaction was made.
totalTotal of all the prices (price_1 + price_2 + price_3...)This optional field serves as a check for the form. Can be ommited. If included, will be used instead of the sum of all the prices.
recurrenttrueAllows you to bill a customer repeatedly at a specified interval.
intervalIntegerNo of days between each recurrent billing if recurrent is set to true.
notify_urlURLUrl to send payment notification to. If set, this will be used instead of the notification url on your account.
success_urlURLUrl to send buyer back to if payment is successful. If set, this will be used instead of the Success Return URL on your account.
fail_urlURLUrl to send buyer back to if payment is unsuccessful. If set, this will be used instead of the Failure Return URL on your account.
Submit Imagehttp://voguepay.com/images/buttons/buynow_blue.pngThe image to use for submit button. You are free to use any image. We recommend that you use one of the VoguePay buttons from the urls listed below:

https://voguepay.com/images/buttons/buynow_blue.png
https://voguepay.com/images/buttons/buynow_red.png
https://voguepay.com/images/buttons/buynow_green.png
https://voguepay.com/images/buttons/buynow_grey.png

https://voguepay.com/images/buttons/addtocart_blue.png
https://voguepay.com/images/buttons/addtocart_red.png
https://voguepay.com/images/buttons/addtocart_green.png
https://voguepay.com/images/buttons/addtocart_grey.png

https://voguepay.com/images/buttons/checkout_blue.png
https://voguepay.com/images/buttons/checkout_red.png
https://voguepay.com/images/buttons/checkout_green.png
https://voguepay.com/images/buttons/checkout_grey.png

http://voguepay.com/images/buttons/donate_blue.png
http://voguepay.com/images/buttons/donate_red.png
http://voguepay.com/images/buttons/donate_green.png
http://voguepay.com/images/buttons/donate_grey.png

http://voguepay.com/images/buttons/subscribe_blue.png
http://voguepay.com/images/buttons/subscribe_red.png
http://voguepay.com/images/buttons/subscribe_green.png
http://voguepay.com/images/buttons/subscribe_grey.png

http://voguepay.com/images/buttons/make_payment_blue.png
http://voguepay.com/images/buttons/make_payment_red.png
http://voguepay.com/images/buttons/make_payment_green.png
http://voguepay.com/images/buttons/make_payment_grey.png

Notification/Order processing API

Notification/Order processing API

VoguePay sends a transaction id to the notification URL provided in your account for every transaction on that account.

To recieve a transaction id on your success or failure URL, you must set Send Transaction ID to Success and Failure Return URL to Yes on your account preferences page.


The transaction ID is sent as a HTTP POST variable (transaction_id) e.g:
If your notification URL is http://mydomain.com/n.php
then notification will be sent to :

http://mydomain.com/n.php
You can retrieve it as a POST variable e.g $_POST['transaction_id'] for PHP.

You can confirm the status and details of a transaction anytime using our REST(ful) API below:

https://voguepay.com/

The api accepts parameters as a GET request. Below is a sample api call.

https://voguepay.com/?v_transaction_id=11111&type=xml

For demo transactions, use:
https://voguepay.com/?v_transaction_id=11111&type=xml&demo=true

Explanation

VariableAcceptable ValuesDefaultDetails
v_transaction_idtransaction idThe transaction id of the transaction to be queried. See sample code below on how to get the transaction id.
typexml, jsonxmlFormat for the expected data

Sample XML Response

<voguepay>

<merchant_id>qa331322179752</merchant_id>

<transaction_id>11111</transaction_id>

<email>mii@mydomain.com</email>

<total>500</total>

<total_paid_by_buyer>507.61</total_paid_by_buyer>

<total_credited_to_merchant>495.00</total_credited_to_merchant>

<extra_charges_by_merchant>0.00</extra_charges_by_merchant>

<merchant_ref>2f093e72</merchant_ref>

<memo>1000 SMS units at &#8358;1.20 each on www.bulksms.com</memo>

<status>Approved</status>

<date>2012-01-09 18:56:23</date>

<referrer>http://www.afrisoft.net/viewinvoice.php?id=2012</referrer>

<method>Interswitch</method>

<fund_maturity>2012-01-11</fund_maturity>

</voguepay>

Sample JSON Response

{"merchant_id":"qa331322179752","transaction_id":"11111","email":"mii@mydomain.com","total":500,"total_paid_by_buyer":"507.61","total_credited_to_merchant":"495.00","extra_charges_by_merchant":"0.00","merchant_ref":"2f093e72","memo":"1000 SMS units at &amp;#8358;1.20 each on www.bulksms.com","status":"Approved","date":"2012-01-09 18:56:23","referrer":"http://www.afrisoft.net/viewinvoice.php?id=2012","method":"Interswitch","fund_maturity":"2012-01-11"}

Explanation of responses

Response Key/th>Value
merchant_idMerchant ID Of The Seller
transaction_idTransaction ID of the transaction
emailemail address of buyer
totalTotal price of products being paid for
total_paid_by_buyerTotal amount paid by buyer including any other charges
total_credited_to_merchantTotal amount creditable to the merchant's wallet
extra_charges_by_merchantExtra charges placed on buyer by merchant such as taxes e.t.c
merchant_refmerchant_ref value sent with the html form by the merchant
memoTransaction memo that describes the transaction
statusApproved or Pending or Failed or Disputed
dateDate of transaction in the format yyyy-mm-dd hh:ii:ss e.g 2012-01-09 18:56:23
referrerThe merchant page from which the transaction form was sent to VoguePay e.g http://www.afrisoft.net/viewinvoice.php?id=2012
methodMethod/gateway used for payment e.g Interswitch, voguePay e.t.c
fund_maturityThe date that the merchant will be able to withdraw or spend the amount credited to his/her wallet as a result of this transaction

Sample PHP script for XML notification

Download a sample php script below to see a very simple XML implementation of the notification/REST api.
CLICK HERE TO DOWNLOAD

Sample PHP script for JSON notification

Download a sample php script below to see a very simple JSON implementation of the notification/REST api.
CLICK HERE TO DOWNLOAD

Use the form below to test a valid transaction ID to see the response.

transaction id
Select notification type
 

Mobile/Server-to-server API

Mobile/Server-to-server API

To use voguePay on mobile or via server-to-server connection, you can get a link token for payment by sending your merchant ID and other necessary parameters in the format: https://voguepay.com/?p=linkToken&v_merchant_id=aaa&memo=mmm&total=ttt&merchant_ref=rrr&recurrent=ccc&interval=iii&notify_url=nnn&success_url=sss&fail_url=fff
where:
aaa is the Merchant ID
mmm is the Memo
ttt is the Total Cost
rrr is the Merchant Reference (Any value provided by merchant. his 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 wishess to retrieve later with the transaction details.)
ccc is the Recurrent Billing status (true/false)
iii is the No of days between each recurrent billing if recurrent is set to true.
nnn is the Url to send payment notification to. If set, this will be used instead of the notification url on your account.
sss is the Url to send buyer back to if payment is successful. If set, this will be used instead of the Success Return URL on your account.
fff is the Url to send buyer back to if payment is unsuccessful. If set, this will be used instead of the Failure Return URL on your account.

Your merchant id, memo and total cost are required. All other fields are optional.
Response:
For a successful request, the api returns a url. Visting the url brings up VogiuePay payment page that can be used for payment based on the parameters supplied. The returned URL is valid for up to 24 hrs.
For failed requests, one of the following is returned:
-1 = Unable to process command
-3 = Empty Merchant ID
-4 = Memo is empty
-14 = invalid merchant id
-100 = No result
Example:
https://voguepay.com/?p=linkToken&v_merchant_id=qa331322179752&merchant_ref=234-567-890&memo=Bulk+order+from+McAckney+Web+Shop&total=13000&
notify_url=http%3A%2F%2Fwww.example.com%2Fnotification.php&
success_url=http%3A%2F%2Fwww.example.com%2Fthank_you.html&fail_url=http%3A%2F%2Fwww.example.com%2Ffailed.html

Command API

Command API

The command API allows you to directly perfom several actions on VoguePay from your application.
The command API is in beta
With command API, you can:

fetch: Query our database for a list of transaction ids which can subsequently be processed with the notification API.
withdraw: You can make withdrawals to one or several bank accounts.
pay: You can transfer money to other VoguePay members.
create: You can create voguepay accounts for your members.

The Command API works for server-to-server communication.
The Command API can be consumed with the secure url:

https://voguepay.com/api

The command API accepts json, xml, yaml or ini formated parameter via HTTP POST to https://voguepay.com/api. Your query should conform to the format specified below.

Fixed key/value pairs:
KeyValuePHP Example
taskfetch or pay or withdraw or create (Required)$field['task'] = 'fetch';
merchantYour VoguePay Merchant ID (Required)$field['merchant'] = '1234-5678';
refUnique id for each request (Required)$field['ref'] = time().mt_rand(0,999999999);
hashRequired Security code generated by concatenating the following and passing the result through a sha512 encryption
your command api token
task specified above
your voguepay email
ref specified above
$field['hash'] = hash('sha512',$command_api_token.$field['task'].$my_voguepay_email.$field['ref']);
listUsed as a parent container for non-fixed key/value pairs where multiple requests are made in a single callSee example files
idunique ID for each item in a list if multiple requests are made in a single callSee example files

Non-fixed Key/value pairs for task: fetch

KeyValuePHP Example
quantityNumber of records to fetch (Optional)$field['quantity'] = 10;
statusThe status of the transactions to fetch(optional).
example: Approved or Pending or Failed
$field['status'] = 'Approved';
channelThe channel of payment to fetch(optional)
example: interswitch or visa or etranzact or mastercard or voguepay
$field['channel'] = 'interswitch';
buyerThe email of the buyer to be fetched(optional)$fetch['buyer'] = 'customer@example.com';
timeLimits the result to only the transactions that occurred in the specified lenth of time(optional).
Measured in minutes
$api['time'] = 30;//transactions for the last 30 minutes

Non-fixed Key/value pairs for task: withdraw

You can make withdrawals to bank accounts with the withdraw task.
KeyValuePHP Example
amountAmount to withdraw (Required)$field['amount'] = 150000.00;
bank_nameName of the bank to withdraw into (Required)$field['bank_name'] = 'Sample Bank PLC';
bank_acct_nameName of the account holder(Required)$field['bank_acct_name'] = 'Linda Drogba';
bank_account_numberAccount Number for the account(Required)$fetch['bank_account_number'] = '1000100010';
bank_currencyCurrency of the account(optional)$field['bank_currency'] = 'US Dollars';
bank_countryCountry of the account(optional)$field['bank_country'] = 'Nigeria';
bank_addressAddress of the bank branch(optional)$field['bank_address'] = '17 example street, Lagos State';
bank_swiftSwift Code(optional)$field['bank_swift'] = '508664';
bank_ibanIban Number(optional)$field['bank_iban'] = '58415596258';
bank_sortSort Code(optional)$field['bank_sort'] = '2081';
bank_routingRouting Number(optional)$field['bank_routing'] = '65678976';

Non-fixed Key/value pairs for task: pay

You can transfer money to other VoguePay members with the pay task.
KeyValuePHP Example
amountAmount to pay (Required)$field['amount'] = 150000.00;
sellerEmail or username of the beneficiary (Required)$field['seller'] = 'private_school@example.com';
memoDescription of the transaction(Required)$field['memo'] = 'Payment of 3rd grade school fess for whitney Barlotelli';

Non-fixed Key/value pairs for task: create

You can create voguepay accounts for your members. This task is only available for partner merchants and can be requested by sending email to VoguePay Support.
KeyValuePHP Example
usernameUsername of the new account (Required)$field['username'] = 'johnny247';
passwordPassword of the new account (Required)$field['password'] = 'gT5%43HGtXx4_?';
emailEmail of the new account (Required)$field['email'] = 'new_user@example.com';
firstnameFirstname of the new account (Required)$field['firstname'] = 'John';
lastnameLastname of the new account (Required)$field['lastname'] = 'Clinton';
phoneMobile phone of the new account (Required)$field['phone'] = '+2348011111111';
referrerUsername or email of the referrer(Required)$field['referrer'] = 'my_username';


Return values

Command API returns the result as key/pair values in the format that it receives them (json, xml, yaml or ini).
The fields returned as explained below.
KeyValuePHP Example
idThe original ID submitted for each item in a list of multiple items$out['id']
usernameUsername of the merchant on voguepay is returned$out['username']
saltString used for calculating the returned hash code$out['salt']
hashSecurity code for verifying the authenticity of the result.
Generated by concatenating the following and passing the result through a sha512 encryption
your command api token
your voguepay email
salt specified above
$out['hash']
listUsed as a parent container for status, response, values and description where multiple requests are made in a single callSee example files
statusOK for successful operations or
FAIL for unsuccessful operations
$out['status']
responseOK = successful operation
X001 = Invalid Merchant ID
X002 = Invalid Reference
X003 = Invalid hash
X004 = Invalid task
X005 = Invalid Merchant ID
X006 = Invalid hash
C001 = Unauthorised access
C002 = Invalid Email
C003 = Invalid username
C004 = Invalid phone number
C005 = Invalid firstname
C006 = Invalid lastname
C007 = Invalid country
C008 = Unable to create member
C009 = Unable to create member
W001 = Invalid amount
W002 = Operation Failed.
W003 = Amount is below minimum allowed
W004 = Insufficient balance
W005 = Withdrawal failed
W006 = Withdrawal failed
P001 = Invalid amount
P002 = Operation Failed.
P003 = Seller and buyer are one and the same
P004 = Invalid beneficiary
P005 = Invalid memo
P006 = payment amount is below minimum allowed
P007 = payment amount exceeds maximum allowed
P008 = Insufficient balance for payment
P009 = Payment failed
P010 = Payment failed
P011 = Payment failed
$out['response']
valuesComma separated transaction IDs$out['values']
descriptionDescription of the response$out['description']


Download sample PHP files for command API implementation below:
JSON Samples
CLICK HERE TO DOWNLOAD
XML Samples
CLICK HERE TO DOWNLOAD
YAML Samples
CLICK HERE TO DOWNLOAD
INI Samples
CLICK HERE TO DOWNLOAD




Test/Demo Accounts

Test/Demo Accounts

While integrating VoguePay, you may need a test account. We have provided a simple solution to test your integration.

Use demo as your merchant ID in test environment.

Once "demo" is used as your merchant ID, you can use any email and password to make payment.

To simulate a Failed transaction, use failed@anydomain.com with any password to pay for the transaction e.g: failed@ivoryserver.com or failed@trashmail.com.

To simulate a successful transaction, use any email and any password to pay for the transaction. You may use your real email since a notification will be sent to the email address you use for the transaction.

The transaction ID will be sent to the notify_url parameter submitted by your form e.g:
<input type="hidden" name="notify_url" value="http://www.mydomain.com/notification.php" />
You may then call the notification/order processing API from there.
For demo transactions, use add demo=true to the notification API as shown below:
https://voguepay.com/?v_transaction_id=11111&type=xml&demo=true

 


!-- Start Alexa Certify Javascript -->