Receive payment with our inline script. To initialize the transaction, you'll need to pass information such as email, first name, last name amount, transaction reference, etc. Here is the full list of parameters you can pass
Parameter
Required
Description
v_merchant_id
Yes
Merchant ID
total
Yes
Total Amount to be paid
notify_url
Yes
Link to Send Transaction status/details to
cur
Yes
Currency code. e.g NGN
merchant_ref
No
Merchant Reference or Transaction Reference. Can be any value provided by merchant.
memo
Yes
Transaction Memo
developer_code
No
A code unique given to every developer.
items
No
An object containing all items to be paid for
customer
Yes
An Object containing customer's details.
closed
No
Function that runs when payment window is closed without completing payment.
success
No
Function that runs when payment is successful.
failed
No
Function that runs when payment is fails
In this, notice how:
The Voguepay inline javascript is included using a script tag. This is how you import Voguepay into your code.
The amount here can be hardcoded if you want to charge a specific amount.
The Pay for shirt and Pay for shoe buttons has been tied to an onClick function called pay. This is the action that causes the Voguepay popup to load.
HTML:
<h3>Inline Payment Demo</h3>
<button type="button" onclick="pay('shirt',500)"> Pay for shirt </button>
<button type="button" onclick="pay('shoe',10000)"> Pay for shoe </button>
<script src="https://pay.voguepay.com/js/voguepay.js"></script>