DEVELOPERS


Click on a tab to expand it.

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='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='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='total' value='13000' />

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

</form>

Form Explanation

Attributes:
AttributeValueExplanation
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 ID.Can 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 in Nigerian NairaThe price of the product being purchased. x corresponds to the number in item_x.
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:

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

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

http://voguepay.com/images/buttons/checkout_blue.png
http://voguepay.com/images/buttons/checkout_red.png
http://voguepay.com/images/buttons/checkout_green.png
http://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

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

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 keyValue
merchant_idMerchant ID of 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

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¬ify_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 number of days between each recurrent billing if recurrent is set to true.
nnn is the Url to send payment notification to
sss is the Url to send buyer back to if payment is successful
fff is the Url to send buyer back to if payment is unsuccessful

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

You can query our database for a comma separated list of transaction ids which can subsequently be processed with the notification API.
The Command API is intended for server-to-server communication.
The Command API comes in the following format:

https://voguepay.com/?merchant=xxxx&token=tttt&type=plain&query=zzzz

Where xxxx is your merchant ID
tttt is your command API token that can the generated on the API settings page under "ACCOUNT INFORMATION" menu.
plain, json or xml is the type of response expected. Acceptable values are json, xml or plain
zzzz is the query

The separator for the query is _sep_ .
Your query should conform to the format specified below.

FeatureQueryExample
Fetch the last few transactions on your accountlast_sep_quantitylast_sep_1 or last_sep_3 or last_sep_10
Fetch the last few successful transactions on your accountpass_sep_quantitypass_sep_1 or pass_sep_5 or pass_sep_12
Fetch the last few failed transactions on your accountfail_sep_quantityfail_sep_1 or fail_sep_6 or fail_sep_9
Fetch the last few invoice payment on your accountinvoice_sep_quantityinvoice_sep_4
Fetch the last few payment via interswitch on your accountinterswitch_sep_quantityinterswitch_sep_23
Fetch the last few payment via etranzact on your accountetranzact_sep_quantityetranzact_sep_7
Fetch the last few payment via VoguePay on accountvoguepay_sep_quantityvoguepay_sep_3
Fetch the last few payment by a particular buyerbuyer email_sep_quantityclient@clientdomain.com_sep_6
Transfer money to another memberamount_sep_seller email1500_sep_seller@sellerdomain.com
Withdraw money from your wallet into one of your pre-configured bank accountswithdraw_sep_amount_sep_account short namewithdraw_sep_251000_sep_My GTB account
Get transaction ID from merchant_refmerchant_ref_sep_your referencemerchant_ref_sep_q12w2234
Fetch all transactions for the last few minutesminute_sep_durationminute_sep_30
Fetch all transactions for the last few hourshour_sep_durationhour_sep_3
Fetch all transactions for the last few weeksweek_sep_durationweek_sep_2
Fetch all transactions for the last few monthsmonth_sep_durationmonth_sep_1


The command APi will respond with any of the following strings for the plain type:

StringExampleMeaning
Transaction IDs separated by comma12345e678,67433h566,998y7765Transaction IDs matching the requested query
OKOKCommand executed successfully
-100-100Query returned an empty result
-1 to -99-11An error occurred. See explanation below.
-1 = Unable to process command
-2 = Merchant id/password incorect
-10 = Query is empty
-11 = Recipient not exist
-12 = Insufficient balance
-13 = Merchant and recipient are the same
-14 = Invalid amount
-15 = Bank account does not exist


Sample responses:


Command API:

https://voguepay.com/?merchant=xxxx-xx&token=1234567890&query=last_sep_3&type=plain

VoguePay Response:

55093q12199,55089q48363,55079q61923

OR

-2


Command API:

https://voguepay.com/?merchant=xxxx-xx&token=1234567890&query=last_sep_3&type=json

VoguePay Response:

{"status":"OK","response":"55093q12199,55089q48363,55079q61923","query":"last_sep_3","time":"2012-10-03 12:14:09"}

OR

{"status":"ERROR","response":"-2","query":"last_sep_3","time":"2012-10-03 12:14:09"}


Command API:

https://voguepay.com/?merchant=xxxx-xx&token=1234567890&query=last_sep_3&type=xml

VoguePay Response:

<voguepay>
<status>OK</status>
<response>55093q12199,55089q48363,55079q61923</response>
<query>last_sep_3</query>
<time>2012-10-03 12:15:22</time>
</voguepay>

OR

<voguepay>
<status>ERROR</status>
<response>-2</response>
<query>last_sep_3</query>
<time>2012-10-03 12:15:22</time>
</voguepay>


Sample PHP script for JSON implementation of Command API to pay multiple people

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



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.