Credit Card API

Credit Card Acceptance

This page outlines how to integrate WiPay into your website using an HTML form so customers can pay via Credit Card and you can have the money deposited to your bank account.

Step 1

Step 1.1: Sign Up for a WiPay Business account 

If you already have a WiPay Business Verified account, you can skip to Step 1.3: Update Merchant Key.

If you have a WiPay Business UnVerified account, you can find out on how to Upgrade to Verified [here].

If you do not have a WiPay Business account, you can find out how to begin the SignUp process [here].

 

Step 1.2: Update Bank Information

You need to update your banking info so that when people pay via credit card, the money goes to your linked back account. 

WiPay can wire transfer within FIVE (5) work-days to the following banks:

  • FirstCaribbean International
  • First Citizens Bank
  • Scotia Bank Trinidad
  • Republic Bank LTD
  • JMMB Bank
  • RBC Royal Bank Trinidad and Tobago
  • Citibank
  • Bank of Baroda

 

Step 1.3: Update Merchant Key

The Merchant Key will be used to verify each transaction. Every transaction produces a unique hash. The developer should verify this hash using their merchant key.
Please note that you do not need to Generate a New Merchant Key, if you already have one set.

Using our Test account

You can use our Test Business Verified account. You will need the following info in the following sections when testing:

Parameter SandBox Value
developer_id 1
merchant_key 123

 

Step 2: Initiate Transaction

Configuration

The configuration for the Credit Card API calls can be seen below.

All reporting features are disabled in the sandbox URL.

Upon form submission, your customers will be redirected to a Secure Checkout page where they would enter their Credit Card Information.

NOTE: When testing, please use the SANDBOX API URL. Testing on the live platform is strictly prohibited and Account will be banned

API URL (Live) https://wipayfinancial.com/v1/gateway_live
API URL (Sandbox) https://wipayfinancial.com/v1/gateway
HTTP Method POST

Parameters

Parameter Description  Notes  Required
total The total required to be paid by the customer. 1. This parameter represents the total with the Transaction Fees already applied. Yes
phone The customer’s phone number captured in the web form. Yes
email The customer’s email captured in the web form. Yes
name The customer’s name captured in the web form. Yes
order_id Your own custom ID for the order. Yes
return_url The URL of the webpage that your customers will be redirected to upon entering their Credit Card information. Yes
developer_id Your WiPay account number. Yes

Here’s an example form you can implement on your website

<form action="https://wipayfinancial.com/v1/gateway" method="post">
<input name="total" type="hidden" value="10"/>
<input name="phone" type="hidden" value="6890677"/>
<input name="email" type="hidden" value="customer@gmail.com"/>
<input name="name" type="hidden" value="John Doe"/>
<input name="order_id" type="hidden" value="4398"/>
<input name="return_url" type="hidden" value="http://example.com"/>
<input name="developer_id" type="hidden" value="1"/>
<button type="submit">Pay</button>
</form>

Upon form submission, your customers will be redirected to the following secure checkout page.

Below is a list of Sandbox test Credit Card numbers. You can use any Card CVV and any Expiry Date.

We recommend using the test Credit Card:

Card Number Card CVV Expiry Month Expiry Year
4111111111111111 123 01 25

Step 3: Process and Verify Transaction

When the transaction is complete, the user will be redirected to the specified return_url. From the URL, you can extract all relevant information and validate to see if the transaction was a “success” or “fail”.
Please note that a “fail”-ed response does not include the &hash parameter.


Status Success

http://your_return_url/?status=success
&name=John%20Doe
&email=customer@gmail.com
&hash=129c8b887ed83ec36523843afcd51caa
&order_id=4398
&transaction_id=100-1-4398-20170108100202
&reasonCode=1
&reasonDescription=Transaction%20is%20approved.
&responseCode=1
&total=10
&D=TT
&date=10%3A02%3A17pm

 

Status Fail

http://your_return_url/?status=failed
&name=John%20Doe
&email=customer@gmail.com

&order_id=4398
&transaction_id=100-1-4398-20170108100202

&reasonCode=2
&reasonDescription=Transaction%20Declined.
&responseCode=2

&total=10
&D=TT
&date=10%3A02%3A17pm

 

GET Parameters

The GET parameters can be easily retrieved using various languages (eg. PHP)

$status=$_GET['status'];
$OrderID=$_GET['order_id'];
//ETC

 

Verifying Hash

It is strongly recommended for each transaction to verify the &hash. The &hash can be computed as seen below:

$merchant_key=//pull from your server
$hash=md5($_GET['order_id'].$_GET['total'].$merchant_key);
if($hash == $_GET['hash']) {
    //Hash matched
}

 

Our Rates

3% + $5.00 TTD per transaction. These rates are automatically deducted in the dashboard.

 

How do you get the money to your bank?

Simply go to the Withdraw Tab and enter an amount to withdraw (the minimum that you can withdraw is $50.00 TTD).